transform/shader_io: Generate a wrapper function

This is a major reworking of this transform. The old transform code
was getting unwieldy, with part of the complication coming from the
handling of multiple return statements. By generating a wrapper
function instead, we can avoid a lot of this complexity.

The original entry point function is stripped of all shader IO
attributes (as well as `stage` and `workgroup_size`), but the body is
left unmodified. A new entry point wrapper function is introduced
which calls the original function, packing/unpacking the shader inputs
as necessary, and propagates the result to the corresponding shader
outputs.

The new code has been refactored to use a state object with the
different parts of the transform split into separate functions, which
makes it much more manageable.

Fixed: tint:1076
Bug: tint:920
Change-Id: I3490a0ea7a3509a4e198ce730e476516649d8d96
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60521
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/transform/canonicalize_entry_point_io.cc b/src/transform/canonicalize_entry_point_io.cc
index 921ae6b..4eee792 100644
--- a/src/transform/canonicalize_entry_point_io.cc
+++ b/src/transform/canonicalize_entry_point_io.cc
@@ -16,14 +16,12 @@
 
 #include <algorithm>
 #include <string>
+#include <unordered_set>
 #include <utility>
+#include <vector>
 
 #include "src/program_builder.h"
-#include "src/sem/block_statement.h"
 #include "src/sem/function.h"
-#include "src/sem/statement.h"
-#include "src/sem/struct.h"
-#include "src/sem/variable.h"
 
 TINT_INSTANTIATE_TYPEINFO(tint::transform::CanonicalizeEntryPointIO);
 TINT_INSTANTIATE_TYPEINFO(tint::transform::CanonicalizeEntryPointIO::Config);
@@ -62,8 +60,396 @@
   }
 }
 
+// Returns true if `deco` is a shader IO decoration.
+bool IsShaderIODecoration(const ast::Decoration* deco) {
+  return deco->IsAnyOf<ast::BuiltinDecoration, ast::InterpolateDecoration,
+                       ast::InvariantDecoration, ast::LocationDecoration>();
+}
+
 }  // namespace
 
+/// State holds the current transform state for a single entry point.
+struct CanonicalizeEntryPointIO::State {
+  /// OutputValue represents a shader result that the wrapper function produces.
+  struct OutputValue {
+    /// The name of the output value.
+    std::string name;
+    /// The type of the output value.
+    ast::Type* type;
+    /// The shader IO attributes.
+    ast::DecorationList attributes;
+    /// The value itself.
+    ast::Expression* value;
+  };
+
+  /// The clone context.
+  CloneContext& ctx;
+  /// The transform config.
+  CanonicalizeEntryPointIO::Config const cfg;
+  /// The entry point function (AST).
+  ast::Function* func_ast;
+  /// The entry point function (SEM).
+  sem::Function const* func_sem;
+
+  /// The new entry point wrapper function's parameters.
+  ast::VariableList wrapper_ep_parameters;
+  /// The members of the wrapper function's struct parameter.
+  ast::StructMemberList wrapper_struct_param_members;
+  /// The name of the wrapper function's struct parameter.
+  Symbol wrapper_struct_param_name;
+  /// The parameters that will be passed to the original function.
+  ast::ExpressionList inner_call_parameters;
+  /// The members of the wrapper function's struct return type.
+  ast::StructMemberList wrapper_struct_output_members;
+  /// The wrapper function output values.
+  std::vector<OutputValue> wrapper_output_values;
+  /// The body of the wrapper function.
+  ast::StatementList wrapper_body;
+
+  /// Constructor
+  /// @param context the clone context
+  /// @param config the transform config
+  /// @param function the entry point function
+  State(CloneContext& context,
+        const CanonicalizeEntryPointIO::Config& config,
+        ast::Function* function)
+      : ctx(context),
+        cfg(config),
+        func_ast(function),
+        func_sem(ctx.src->Sem().Get(function)) {}
+
+  /// Clones the shader IO decorations from `src`.
+  /// @param src the decorations to clone
+  /// @return the cloned decorations
+  ast::DecorationList CloneShaderIOAttributes(const ast::DecorationList& src) {
+    ast::DecorationList new_decorations;
+    for (auto* deco : src) {
+      if (IsShaderIODecoration(deco)) {
+        new_decorations.push_back(ctx.Clone(deco));
+      }
+    }
+    return new_decorations;
+  }
+
+  /// Create or return a symbol for the wrapper function's struct parameter.
+  /// @returns the symbol for the struct parameter
+  Symbol InputStructSymbol() {
+    if (!wrapper_struct_param_name.IsValid()) {
+      wrapper_struct_param_name = ctx.dst->Sym();
+    }
+    return wrapper_struct_param_name;
+  }
+
+  /// Add a shader input to the entry point.
+  /// @param name the name of the shader input
+  /// @param type the type of the shader input
+  /// @param attributes the attributes to apply to the shader input
+  /// @returns an expression which evaluates to the value of the shader input
+  ast::Expression* AddInput(std::string name,
+                            ast::Type* type,
+                            ast::DecorationList attributes) {
+    if (cfg.builtin_style == BuiltinStyle::kParameter &&
+        ast::HasDecoration<ast::BuiltinDecoration>(attributes)) {
+      // If this input is a builtin and we are emitting those as parameters,
+      // then add it to the parameter list and pass it directly to the inner
+      // function.
+      wrapper_ep_parameters.push_back(
+          ctx.dst->Param(name, type, std::move(attributes)));
+      return ctx.dst->Expr(name);
+    } else {
+      // Otherwise, move it to the new structure member list.
+      wrapper_struct_param_members.push_back(
+          ctx.dst->Member(name, type, std::move(attributes)));
+      return ctx.dst->MemberAccessor(InputStructSymbol(), name);
+    }
+  }
+
+  /// Add a shader output to the entry point.
+  /// @param name the name of the shader output
+  /// @param type the type of the shader output
+  /// @param attributes the attributes to apply to the shader output
+  /// @param value the value of the shader output
+  void AddOutput(std::string name,
+                 ast::Type* type,
+                 ast::DecorationList attributes,
+                 ast::Expression* value) {
+    OutputValue output;
+    output.name = name;
+    output.type = type;
+    output.attributes = std::move(attributes);
+    output.value = value;
+    wrapper_output_values.push_back(output);
+  }
+
+  /// Process a non-struct parameter.
+  /// This creates a new object for the shader input, moving the shader IO
+  /// attributes to it. It also adds an expression to the list of parameters
+  /// that will be passed to the original function.
+  /// @param param the original function parameter
+  void ProcessNonStructParameter(const sem::Parameter* param) {
+    // Remove the shader IO attributes from the inner function parameter, and
+    // attach them to the new object instead.
+    ast::DecorationList attributes;
+    for (auto* deco : param->Declaration()->decorations()) {
+      if (IsShaderIODecoration(deco)) {
+        ctx.Remove(param->Declaration()->decorations(), deco);
+        attributes.push_back(ctx.Clone(deco));
+      }
+    }
+
+    auto name = ctx.src->Symbols().NameFor(param->Declaration()->symbol());
+    auto* type = ctx.Clone(param->Declaration()->type());
+    auto* input_expr = AddInput(name, type, std::move(attributes));
+    inner_call_parameters.push_back(input_expr);
+  }
+
+  /// Process a struct parameter.
+  /// This creates new objects for each struct member, moving the shader IO
+  /// attributes to them. It also creates the structure that will be passed to
+  /// the original function.
+  /// @param param the original function parameter
+  void ProcessStructParameter(const sem::Parameter* param) {
+    auto* str = param->Type()->As<sem::Struct>();
+
+    // Recreate struct members in the outer entry point and build an initializer
+    // list to pass them through to the inner function.
+    ast::ExpressionList inner_struct_values;
+    for (auto* member : str->Members()) {
+      if (member->Type()->Is<sem::Struct>()) {
+        TINT_ICE(Transform, ctx.dst->Diagnostics()) << "nested IO struct";
+        continue;
+      }
+
+      auto* member_ast = member->Declaration();
+      auto name = ctx.src->Symbols().NameFor(member_ast->symbol());
+      auto* type = ctx.Clone(member_ast->type());
+      auto attributes = CloneShaderIOAttributes(member_ast->decorations());
+      auto* input_expr = AddInput(name, type, std::move(attributes));
+      inner_struct_values.push_back(input_expr);
+    }
+
+    // Construct the original structure using the new shader input objects.
+    inner_call_parameters.push_back(ctx.dst->Construct(
+        ctx.Clone(param->Declaration()->type()), inner_struct_values));
+  }
+
+  /// Process the entry point return type.
+  /// This generates a list of output values that are returned by the original
+  /// function.
+  /// @param inner_ret_type the original function return type
+  /// @param original_result the result object produced by the original function
+  void ProcessReturnType(const sem::Type* inner_ret_type,
+                         Symbol original_result) {
+    if (auto* str = inner_ret_type->As<sem::Struct>()) {
+      for (auto* member : str->Members()) {
+        if (member->Type()->Is<sem::Struct>()) {
+          TINT_ICE(Transform, ctx.dst->Diagnostics()) << "nested IO struct";
+          continue;
+        }
+
+        auto* member_ast = member->Declaration();
+        auto name = ctx.src->Symbols().NameFor(member_ast->symbol());
+        auto* type = ctx.Clone(member_ast->type());
+        auto attributes = CloneShaderIOAttributes(member_ast->decorations());
+
+        // Extract the original structure member.
+        AddOutput(name, type, std::move(attributes),
+                  ctx.dst->MemberAccessor(original_result, name));
+      }
+    } else if (!inner_ret_type->Is<sem::Void>()) {
+      auto* type = ctx.Clone(func_ast->return_type());
+      auto attributes =
+          CloneShaderIOAttributes(func_ast->return_type_decorations());
+
+      // Propagate the non-struct return value as is.
+      AddOutput("value", type, std::move(attributes),
+                ctx.dst->Expr(original_result));
+    }
+  }
+
+  /// Add a fixed sample mask to the wrapper function output.
+  /// If there is already a sample mask, bitwise-and it with the fixed mask.
+  /// Otherwise, create a new output value from the fixed mask.
+  void AddFixedSampleMask() {
+    // Check the existing output values for a sample mask builtin.
+    for (auto& outval : wrapper_output_values) {
+      auto* builtin =
+          ast::GetDecoration<ast::BuiltinDecoration>(outval.attributes);
+      if (builtin && builtin->value() == ast::Builtin::kSampleMask) {
+        // Combine the authored sample mask with the fixed mask.
+        outval.value = ctx.dst->And(outval.value, cfg.fixed_sample_mask);
+        return;
+      }
+    }
+
+    // No existing sample mask builtin was found, so create a new output value
+    // using the fixed sample mask.
+    AddOutput("fixed_sample_mask", ctx.dst->ty.u32(),
+              {ctx.dst->Builtin(ast::Builtin::kSampleMask)},
+              ctx.dst->Expr(cfg.fixed_sample_mask));
+  }
+
+  /// Create the wrapper function's struct parameter and type objects.
+  void CreateInputStruct() {
+    // Sort the struct members to satisfy HLSL interfacing matching rules.
+    std::sort(wrapper_struct_param_members.begin(),
+              wrapper_struct_param_members.end(), StructMemberComparator);
+
+    // Create the new struct type.
+    auto struct_name = ctx.dst->Sym();
+    auto* in_struct = ctx.dst->create<ast::Struct>(
+        struct_name, wrapper_struct_param_members, ast::DecorationList{});
+    ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast, in_struct);
+
+    // Create a new function parameter using this struct type.
+    auto* param =
+        ctx.dst->Param(InputStructSymbol(), ctx.dst->ty.type_name(struct_name));
+    wrapper_ep_parameters.push_back(param);
+  }
+
+  /// Create and return the wrapper function's struct result object.
+  /// @returns the struct type
+  ast::Struct* CreateOutputStruct() {
+    ast::StatementList assignments;
+
+    auto wrapper_result = ctx.dst->Symbols().New("wrapper_result");
+
+    // Create the struct members and their corresponding assignment statements.
+    std::unordered_set<std::string> member_names;
+    for (auto& outval : wrapper_output_values) {
+      // Use the original output name, unless that is already taken.
+      Symbol name;
+      if (member_names.count(outval.name)) {
+        name = ctx.dst->Symbols().New(outval.name);
+      } else {
+        name = ctx.dst->Symbols().Register(outval.name);
+      }
+      member_names.insert(ctx.dst->Symbols().NameFor(name));
+
+      wrapper_struct_output_members.push_back(
+          ctx.dst->Member(name, outval.type, std::move(outval.attributes)));
+      assignments.push_back(ctx.dst->Assign(
+          ctx.dst->MemberAccessor(wrapper_result, name), outval.value));
+    }
+
+    // Sort the struct members to satisfy HLSL interfacing matching rules.
+    std::sort(wrapper_struct_output_members.begin(),
+              wrapper_struct_output_members.end(), StructMemberComparator);
+
+    // Create the new struct type.
+    auto* out_struct = ctx.dst->create<ast::Struct>(
+        ctx.dst->Sym(), wrapper_struct_output_members, ast::DecorationList{});
+    ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast, out_struct);
+
+    // Create the output struct object, assign its members, and return it.
+    auto* result_object =
+        ctx.dst->Var(wrapper_result, ctx.dst->ty.type_name(out_struct->name()));
+    wrapper_body.push_back(ctx.dst->Decl(result_object));
+    wrapper_body.insert(wrapper_body.end(), assignments.begin(),
+                        assignments.end());
+    wrapper_body.push_back(ctx.dst->Return(wrapper_result));
+
+    return out_struct;
+  }
+
+  // Recreate the original function without entry point attributes and call it.
+  /// @returns the inner function call expression
+  ast::CallExpression* CallInnerFunction() {
+    // Add a suffix to the function name, as the wrapper function will take the
+    // original entry point name.
+    auto ep_name = ctx.src->Symbols().NameFor(func_ast->symbol());
+    auto inner_name = ctx.dst->Symbols().New(ep_name + "_inner");
+
+    // Clone everything, dropping the function and return type attributes.
+    // The parameter attributes will have already been stripped during
+    // processing.
+    auto* inner_function = ctx.dst->create<ast::Function>(
+        inner_name, ctx.Clone(func_ast->params()),
+        ctx.Clone(func_ast->return_type()), ctx.Clone(func_ast->body()),
+        ast::DecorationList{}, ast::DecorationList{});
+    ctx.Replace(func_ast, inner_function);
+
+    // Call the function.
+    return ctx.dst->Call(inner_function->symbol(), inner_call_parameters);
+  }
+
+  /// Process the entry point function.
+  void Process() {
+    bool needs_fixed_sample_mask = false;
+    if (func_ast->pipeline_stage() == ast::PipelineStage::kFragment &&
+        cfg.fixed_sample_mask != 0xFFFFFFFF) {
+      needs_fixed_sample_mask = true;
+    }
+
+    // Exit early if there is no shader IO to handle.
+    if (func_sem->Parameters().size() == 0 &&
+        func_sem->ReturnType()->Is<sem::Void>() && !needs_fixed_sample_mask) {
+      return;
+    }
+
+    // Process the entry point parameters, collecting those that need to be
+    // aggregated into a single structure.
+    if (!func_sem->Parameters().empty()) {
+      for (auto* param : func_sem->Parameters()) {
+        if (param->Type()->Is<sem::Struct>()) {
+          ProcessStructParameter(param);
+        } else {
+          ProcessNonStructParameter(param);
+        }
+      }
+
+      // Create a structure parameter for the outer entry point if necessary.
+      if (!wrapper_struct_param_members.empty()) {
+        CreateInputStruct();
+      }
+    }
+
+    // Recreate the original function and call it.
+    auto* call_inner = CallInnerFunction();
+
+    // Process the return type, and start building the wrapper function body.
+    std::function<ast::Type*()> wrapper_ret_type = [&] {
+      return ctx.dst->ty.void_();
+    };
+    if (func_sem->ReturnType()->Is<sem::Void>()) {
+      // The function call is just a statement with no result.
+      wrapper_body.push_back(ctx.dst->create<ast::CallStatement>(call_inner));
+    } else {
+      // Capture the result of calling the original function.
+      auto* inner_result = ctx.dst->Const(
+          ctx.dst->Symbols().New("inner_result"), nullptr, call_inner);
+      wrapper_body.push_back(ctx.dst->Decl(inner_result));
+
+      // Process the original return type to determine the outputs that the
+      // outer function needs to produce.
+      ProcessReturnType(func_sem->ReturnType(), inner_result->symbol());
+    }
+
+    // Add a fixed sample mask, if necessary.
+    if (needs_fixed_sample_mask) {
+      AddFixedSampleMask();
+    }
+
+    // Produce the entry point outputs, if necessary.
+    if (!wrapper_output_values.empty()) {
+      auto* output_struct = CreateOutputStruct();
+      wrapper_ret_type = [&, output_struct] {
+        return ctx.dst->ty.type_name(output_struct->name());
+      };
+    }
+
+    // Create the wrapper entry point function.
+    // Take the name of the original entry point function.
+    auto name = ctx.Clone(func_ast->symbol());
+    auto* wrapper_func = ctx.dst->create<ast::Function>(
+        name, wrapper_ep_parameters, wrapper_ret_type(),
+        ctx.dst->Block(wrapper_body), ctx.Clone(func_ast->decorations()),
+        ast::DecorationList{});
+    ctx.InsertAfter(ctx.src->AST().GlobalDeclarations(), func_ast,
+                    wrapper_func);
+  }
+};
+
 void CanonicalizeEntryPointIO::Run(CloneContext& ctx,
                                    const DataMap& inputs,
                                    DataMap&) {
@@ -75,302 +461,27 @@
     return;
   }
 
-  // Strip entry point IO decorations from struct declarations.
-  // TODO(jrprice): This code is duplicated with the SPIR-V transform.
+  // Remove entry point IO attributes from struct declarations.
+  // New structures will be created for each entry point, as necessary.
   for (auto* ty : ctx.src->AST().TypeDecls()) {
     if (auto* struct_ty = ty->As<ast::Struct>()) {
-      // Build new list of struct members without entry point IO decorations.
-      ast::StructMemberList new_struct_members;
       for (auto* member : struct_ty->members()) {
-        ast::DecorationList new_decorations = RemoveDecorations(
-            ctx, member->decorations(), [](const ast::Decoration* deco) {
-              return deco->IsAnyOf<
-                  ast::BuiltinDecoration, ast::InterpolateDecoration,
-                  ast::InvariantDecoration, ast::LocationDecoration>();
-            });
-        new_struct_members.push_back(
-            ctx.dst->Member(ctx.Clone(member->symbol()),
-                            ctx.Clone(member->type()), new_decorations));
+        for (auto* deco : member->decorations()) {
+          if (IsShaderIODecoration(deco)) {
+            ctx.Remove(member->decorations(), deco);
+          }
+        }
       }
-
-      // Redeclare the struct.
-      auto new_struct_name = ctx.Clone(struct_ty->name());
-      auto* new_struct =
-          ctx.dst->create<ast::Struct>(new_struct_name, new_struct_members,
-                                       ctx.Clone(struct_ty->decorations()));
-      ctx.Replace(struct_ty, new_struct);
     }
   }
 
-  // Returns true if `decos` contains a `sample_mask` builtin.
-  auto has_sample_mask_builtin = [](const ast::DecorationList& decos) {
-    if (auto* builtin = ast::GetDecoration<ast::BuiltinDecoration>(decos)) {
-      return builtin->value() == ast::Builtin::kSampleMask;
-    }
-    return false;
-  };
-
   for (auto* func_ast : ctx.src->AST().Functions()) {
     if (!func_ast->IsEntryPoint()) {
       continue;
     }
 
-    auto* func = ctx.src->Sem().Get(func_ast);
-
-    bool needs_fixed_sample_mask =
-        func_ast->pipeline_stage() == ast::PipelineStage::kFragment &&
-        cfg->fixed_sample_mask != 0xFFFFFFFF;
-
-    ast::VariableList new_parameters;
-
-    if (!func->Parameters().empty()) {
-      // Collect all parameters and build a list of new struct members.
-      auto new_struct_param_symbol = ctx.dst->Sym();
-      ast::StructMemberList new_struct_members;
-      for (auto* param : func->Parameters()) {
-        if (cfg->builtin_style == BuiltinStyle::kParameter &&
-            ast::HasDecoration<ast::BuiltinDecoration>(
-                param->Declaration()->decorations())) {
-          // If this parameter is a builtin and we are emitting those as
-          // parameters, then just clone it as is.
-          new_parameters.push_back(
-              ctx.Clone(const_cast<ast::Variable*>(param->Declaration())));
-          continue;
-        }
-
-        auto param_name = ctx.Clone(param->Declaration()->symbol());
-        auto* param_ty = param->Type();
-        auto* param_declared_ty = param->Declaration()->type();
-
-        ast::Expression* func_const_initializer = nullptr;
-
-        if (auto* str = param_ty->As<sem::Struct>()) {
-          // Pull out all struct members and build initializer list.
-          ast::ExpressionList init_values;
-          for (auto* member : str->Members()) {
-            if (member->Type()->Is<sem::Struct>()) {
-              TINT_ICE(Transform, ctx.dst->Diagnostics())
-                  << "nested pipeline IO struct";
-            }
-
-            ast::DecorationList new_decorations = RemoveDecorations(
-                ctx, member->Declaration()->decorations(),
-                [](const ast::Decoration* deco) {
-                  return !deco->IsAnyOf<
-                      ast::BuiltinDecoration, ast::InterpolateDecoration,
-                      ast::InvariantDecoration, ast::LocationDecoration>();
-                });
-
-            if (cfg->builtin_style == BuiltinStyle::kParameter &&
-                ast::HasDecoration<ast::BuiltinDecoration>(
-                    member->Declaration()->decorations())) {
-              // If this struct member is a builtin and we are emitting those as
-              // parameters, then move it to the parameter list.
-              auto* member_ty = CreateASTTypeFor(ctx, member->Type());
-              auto new_param_name = ctx.dst->Sym();
-              new_parameters.push_back(
-                  ctx.dst->Param(new_param_name, member_ty, new_decorations));
-              init_values.push_back(ctx.dst->Expr(new_param_name));
-              continue;
-            }
-
-            auto member_name = ctx.Clone(member->Declaration()->symbol());
-            auto* member_type = ctx.Clone(member->Declaration()->type());
-            new_struct_members.push_back(
-                ctx.dst->Member(member_name, member_type, new_decorations));
-            init_values.push_back(
-                ctx.dst->MemberAccessor(new_struct_param_symbol, member_name));
-          }
-
-          func_const_initializer =
-              ctx.dst->Construct(ctx.Clone(param_declared_ty), init_values);
-        } else {
-          new_struct_members.push_back(
-              ctx.dst->Member(param_name, ctx.Clone(param_declared_ty),
-                              ctx.Clone(param->Declaration()->decorations())));
-          func_const_initializer =
-              ctx.dst->MemberAccessor(new_struct_param_symbol, param_name);
-        }
-
-        // Create a function-scope const to replace the parameter.
-        // Initialize it with the value extracted from the new struct parameter.
-        auto* func_const = ctx.dst->Const(
-            param_name, ctx.Clone(param_declared_ty), func_const_initializer);
-        ctx.InsertFront(func_ast->body()->statements(),
-                        ctx.dst->WrapInStatement(func_const));
-
-        // Replace all uses of the function parameter with the function const.
-        for (auto* user : param->Users()) {
-          ctx.Replace<ast::Expression>(user->Declaration(),
-                                       ctx.dst->Expr(param_name));
-        }
-      }
-
-      if (!new_struct_members.empty()) {
-        // Sort struct members to satisfy HLSL interfacing matching rules.
-        std::sort(new_struct_members.begin(), new_struct_members.end(),
-                  StructMemberComparator);
-
-        // Create the new struct type.
-        auto in_struct_name = ctx.dst->Sym();
-        auto* in_struct = ctx.dst->create<ast::Struct>(
-            in_struct_name, new_struct_members, ast::DecorationList{});
-        ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast,
-                         in_struct);
-
-        // Create a new function parameter using this struct type.
-        auto* struct_param = ctx.dst->Param(
-            new_struct_param_symbol, ctx.dst->ty.type_name(in_struct_name));
-        new_parameters.push_back(struct_param);
-      }
-    }
-
-    // Handle return type.
-    auto* ret_type = func->ReturnType();
-    std::function<ast::Type*()> new_ret_type;
-    if (ret_type->Is<sem::Void>() && !needs_fixed_sample_mask) {
-      new_ret_type = [&ctx] { return ctx.dst->ty.void_(); };
-    } else {
-      ast::StructMemberList new_struct_members;
-
-      bool has_authored_sample_mask = false;
-
-      if (auto* str = ret_type->As<sem::Struct>()) {
-        // Rebuild struct with only the entry point IO attributes.
-        for (auto* member : str->Members()) {
-          if (member->Type()->Is<sem::Struct>()) {
-            TINT_ICE(Transform, ctx.dst->Diagnostics())
-                << "nested pipeline IO struct";
-          }
-
-          ast::DecorationList new_decorations = RemoveDecorations(
-              ctx, member->Declaration()->decorations(),
-              [](const ast::Decoration* deco) {
-                return !deco->IsAnyOf<
-                    ast::BuiltinDecoration, ast::InterpolateDecoration,
-                    ast::InvariantDecoration, ast::LocationDecoration>();
-              });
-          auto symbol = ctx.Clone(member->Declaration()->symbol());
-          auto* member_ty = ctx.Clone(member->Declaration()->type());
-          new_struct_members.push_back(
-              ctx.dst->Member(symbol, member_ty, new_decorations));
-
-          if (has_sample_mask_builtin(new_decorations)) {
-            has_authored_sample_mask = true;
-          }
-        }
-      } else if (!ret_type->Is<sem::Void>()) {
-        auto* member_ty = ctx.Clone(func->Declaration()->return_type());
-        auto decos = ctx.Clone(func_ast->return_type_decorations());
-        new_struct_members.push_back(
-            ctx.dst->Member("value", member_ty, std::move(decos)));
-
-        if (has_sample_mask_builtin(func_ast->return_type_decorations())) {
-          has_authored_sample_mask = true;
-        }
-      }
-
-      // If a sample mask builtin is required and the shader source did not
-      // contain one, create one now.
-      if (needs_fixed_sample_mask && !has_authored_sample_mask) {
-        new_struct_members.push_back(
-            ctx.dst->Member(ctx.dst->Sym(), ctx.dst->ty.u32(),
-                            {ctx.dst->Builtin(ast::Builtin::kSampleMask)}));
-      }
-
-      // Sort struct members to satisfy HLSL interfacing matching rules.
-      std::sort(new_struct_members.begin(), new_struct_members.end(),
-                StructMemberComparator);
-
-      // Create the new struct type.
-      auto out_struct_name = ctx.dst->Sym();
-      auto* out_struct = ctx.dst->create<ast::Struct>(
-          out_struct_name, new_struct_members, ast::DecorationList{});
-      ctx.InsertBefore(ctx.src->AST().GlobalDeclarations(), func_ast,
-                       out_struct);
-      new_ret_type = [out_struct_name, &ctx] {
-        return ctx.dst->ty.type_name(out_struct_name);
-      };
-
-      // Replace all return statements.
-      for (auto* ret : func->ReturnStatements()) {
-        auto* ret_sem = ctx.src->Sem().Get(ret);
-        // Reconstruct the return value using the newly created struct.
-        std::function<ast::Expression*()> new_ret_value = [&ctx, ret] {
-          return ctx.Clone(ret->value());
-        };
-
-        ast::ExpressionList ret_values;
-        if (ret_type->Is<sem::Struct>()) {
-          if (!ret->value()->Is<ast::IdentifierExpression>()) {
-            // Create a const to hold the return value expression to avoid
-            // re-evaluating it multiple times.
-            auto temp = ctx.dst->Sym();
-            auto* ty = CreateASTTypeFor(ctx, ret_type);
-            auto* temp_var =
-                ctx.dst->Decl(ctx.dst->Const(temp, ty, new_ret_value()));
-            ctx.InsertBefore(ret_sem->Block()->Declaration()->statements(), ret,
-                             temp_var);
-            new_ret_value = [&ctx, temp] { return ctx.dst->Expr(temp); };
-          }
-
-          for (auto* member : new_struct_members) {
-            ast::Expression* expr = nullptr;
-
-            if (needs_fixed_sample_mask &&
-                has_sample_mask_builtin(member->decorations())) {
-              // Use the fixed sample mask, combining it with the authored value
-              // if there is one.
-              expr = ctx.dst->Expr(cfg->fixed_sample_mask);
-              if (has_authored_sample_mask) {
-                expr = ctx.dst->And(
-                    ctx.dst->MemberAccessor(new_ret_value(), member->symbol()),
-                    expr);
-              }
-            } else {
-              expr = ctx.dst->MemberAccessor(new_ret_value(), member->symbol());
-            }
-            ret_values.push_back(expr);
-          }
-        } else {
-          if (!ret_type->Is<sem::Void>()) {
-            ret_values.push_back(new_ret_value());
-          }
-
-          if (needs_fixed_sample_mask) {
-            // If the original return value was a sample mask, `and` it with the
-            // fixed mask and return the result.
-            // Otherwise, append the fixed mask to the list of return values,
-            // since it will be the last element of the output struct.
-            if (has_authored_sample_mask) {
-              ret_values[0] =
-                  ctx.dst->And(ret_values[0], cfg->fixed_sample_mask);
-            } else {
-              ret_values.push_back(ctx.dst->Expr(cfg->fixed_sample_mask));
-            }
-          }
-        }
-
-        auto* new_ret =
-            ctx.dst->Return(ctx.dst->Construct(new_ret_type(), ret_values));
-        ctx.Replace(ret, new_ret);
-      }
-
-      if (needs_fixed_sample_mask && func->ReturnStatements().empty()) {
-        // There we no return statements but we need to return a fixed sample
-        // mask, so add a return statement that does this.
-        ctx.InsertBack(func_ast->body()->statements(),
-                       ctx.dst->Return(ctx.dst->Construct(
-                           new_ret_type(), cfg->fixed_sample_mask)));
-      }
-    }
-
-    // Rewrite the function header with the new parameters.
-    auto* new_func = ctx.dst->create<ast::Function>(
-        func_ast->source(), ctx.Clone(func_ast->symbol()), new_parameters,
-        new_ret_type(), ctx.Clone(func_ast->body()),
-        ctx.Clone(func_ast->decorations()), ast::DecorationList{});
-    ctx.Replace(func_ast, new_func);
+    State state(ctx, *cfg, func_ast);
+    state.Process();
   }
 
   ctx.Clone();
diff --git a/src/transform/canonicalize_entry_point_io.h b/src/transform/canonicalize_entry_point_io.h
index 5d9a47b..60a1584 100644
--- a/src/transform/canonicalize_entry_point_io.h
+++ b/src/transform/canonicalize_entry_point_io.h
@@ -21,10 +21,12 @@
 namespace transform {
 
 /// CanonicalizeEntryPointIO is a transform used to rewrite shader entry point
-/// interfaces into a form that the generators can handle. After the transform,
-/// an entry point's parameters will be aggregated into a single struct, and its
-/// return type will either be a struct or void. All structs in the module that
-/// have entry point IO decorations will have exactly one pipeline stage usage.
+/// interfaces into a form that the generators can handle. Each entry point
+/// function is stripped of all shader IO attributes and wrapped in a function
+/// that provides the shader interface.
+/// The transform config determines how shader IO parameters will be exposed.
+/// Entry point return values are always produced as a structure, and optionally
+/// include additional builtins as per the transform config.
 ///
 /// Before:
 /// ```
@@ -36,12 +38,15 @@
 /// [[stage(fragment)]]
 /// fn frag_main([[builtin(position)]] coord : vec4<f32>,
 ///              locations : Locations) -> [[location(0)]] f32 {
+///   if (coord.w > 1.0) {
+///     return 0.0;
+///   }
 ///   var col : f32 = (coord.x * locations.loc1);
 ///   return col;
 /// }
 /// ```
 ///
-/// After:
+/// After (using structures for all parameters):
 /// ```
 /// struct Locations{
 ///   loc1 : f32;
@@ -58,14 +63,21 @@
 ///   [[location(0)]] loc0 : f32;
 /// };
 ///
+/// fn frag_main_inner(coord : vec4<f32>,
+///                    locations : Locations) -> f32 {
+///   if (coord.w > 1.0) {
+///     return 0.0;
+///   }
+///   var col : f32 = (coord.x * locations.loc1);
+///   return col;
+/// }
+///
 /// [[stage(fragment)]]
 /// fn frag_main(in : frag_main_in) -> frag_main_out {
-///   const coord = in.coord;
-///   const locations = Locations(in.loc1, in.loc2);
-///   var col : f32 = (coord.x * locations.loc1);
-///   var retval : frag_main_out;
-///   retval.loc0 = col;
-///   return retval;
+///   let inner_retval = frag_main_inner(in.coord, Locations(in.loc1, in.loc2));
+///   var wrapper_result : frag_main_out;
+///   wrapper_result.loc0 = inner_retval;
+///   return wrapper_result;
 /// }
 /// ```
 class CanonicalizeEntryPointIO
@@ -111,6 +123,8 @@
   /// @param inputs optional extra transform-specific input data
   /// @param outputs optional extra transform-specific output data
   void Run(CloneContext& ctx, const DataMap& inputs, DataMap& outputs) override;
+
+  struct State;
 };
 
 }  // namespace transform
diff --git a/src/transform/canonicalize_entry_point_io_test.cc b/src/transform/canonicalize_entry_point_io_test.cc
index 1f12d40..504d60d 100644
--- a/src/transform/canonicalize_entry_point_io_test.cc
+++ b/src/transform/canonicalize_entry_point_io_test.cc
@@ -34,6 +34,29 @@
   EXPECT_EQ(expect, str(got));
 }
 
+TEST_F(CanonicalizeEntryPointIOTest, NoShaderIO) {
+  // Test that we do not introduce wrapper functions when there is no shader IO
+  // to process.
+  auto* src = R"(
+[[stage(fragment)]]
+fn frag_main() {
+}
+
+[[stage(compute), workgroup_size(1)]]
+fn comp_main() {
+}
+)";
+
+  auto* expect = src;
+
+  DataMap data;
+  data.Add<CanonicalizeEntryPointIO::Config>(
+      CanonicalizeEntryPointIO::BuiltinStyle::kParameter);
+  auto got = Run<CanonicalizeEntryPointIO>(src, data);
+
+  EXPECT_EQ(expect, str(got));
+}
+
 TEST_F(CanonicalizeEntryPointIOTest, Parameters_BuiltinsAsParameters) {
   auto* src = R"(
 [[stage(fragment)]]
@@ -52,11 +75,13 @@
   loc2 : vec4<u32>;
 };
 
+fn frag_main_inner(loc1 : f32, loc2 : vec4<u32>, coord : vec4<f32>) {
+  var col : f32 = (coord.x * loc1);
+}
+
 [[stage(fragment)]]
 fn frag_main([[builtin(position)]] coord : vec4<f32>, tint_symbol : tint_symbol_1) {
-  let loc1 : f32 = tint_symbol.loc1;
-  let loc2 : vec4<u32> = tint_symbol.loc2;
-  var col : f32 = (coord.x * loc1);
+  frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, coord);
 }
 )";
 
@@ -88,12 +113,13 @@
   coord : vec4<f32>;
 };
 
+fn frag_main_inner(loc1 : f32, loc2 : vec4<u32>, coord : vec4<f32>) {
+  var col : f32 = (coord.x * loc1);
+}
+
 [[stage(fragment)]]
 fn frag_main(tint_symbol : tint_symbol_1) {
-  let loc1 : f32 = tint_symbol.loc1;
-  let loc2 : vec4<u32> = tint_symbol.loc2;
-  let coord : vec4<f32> = tint_symbol.coord;
-  var col : f32 = (coord.x * loc1);
+  frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, tint_symbol.coord);
 }
 )";
 
@@ -123,10 +149,13 @@
   loc1 : myf32;
 };
 
+fn frag_main_inner(loc1 : myf32) {
+  var x : myf32 = loc1;
+}
+
 [[stage(fragment)]]
 fn frag_main(tint_symbol : tint_symbol_1) {
-  let loc1 : myf32 = tint_symbol.loc1;
-  var x : myf32 = loc1;
+  frag_main_inner(tint_symbol.loc1);
 }
 )";
 
@@ -156,10 +185,12 @@
   loc2 : vec4<u32>;
 };
 
+fn frag_main_inner(loc1 : f32, loc2 : vec4<u32>, coord : vec4<f32>) {
+}
+
 [[stage(fragment)]]
 fn frag_main([[builtin(position)]] coord : vec4<f32>, tint_symbol : tint_symbol_1) {
-  let loc1 : f32 = tint_symbol.loc1;
-  let loc2 : vec4<u32> = tint_symbol.loc2;
+  frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, coord);
 }
 )";
 
@@ -191,11 +222,12 @@
   coord : vec4<f32>;
 };
 
+fn frag_main_inner(loc1 : f32, loc2 : vec4<u32>, coord : vec4<f32>) {
+}
+
 [[stage(fragment)]]
 fn frag_main(tint_symbol : tint_symbol_1) {
-  let loc1 : f32 = tint_symbol.loc1;
-  let loc2 : vec4<u32> = tint_symbol.loc2;
-  let coord : vec4<f32> = tint_symbol.coord;
+  frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, tint_symbol.coord);
 }
 )";
 
@@ -235,7 +267,7 @@
   loc2 : vec4<u32>;
 };
 
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   [[location(0)]]
   loc0 : f32;
   [[location(1)]]
@@ -244,13 +276,14 @@
   loc2 : vec4<u32>;
 };
 
-[[stage(fragment)]]
-fn frag_main([[builtin(position)]] tint_symbol_1 : vec4<f32>, tint_symbol : tint_symbol_2) {
-  let loc0 : f32 = tint_symbol.loc0;
-  let locations : FragLocations = FragLocations(tint_symbol.loc1, tint_symbol.loc2);
-  let builtins : FragBuiltins = FragBuiltins(tint_symbol_1);
+fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltins) {
   var col : f32 = ((builtins.coord.x * locations.loc1) + loc0);
 }
+
+[[stage(fragment)]]
+fn frag_main([[builtin(position)]] coord : vec4<f32>, tint_symbol : tint_symbol_1) {
+  frag_main_inner(tint_symbol.loc0, FragLocations(tint_symbol.loc1, tint_symbol.loc2), FragBuiltins(coord));
+}
 )";
 
   DataMap data;
@@ -300,12 +333,13 @@
   coord : vec4<f32>;
 };
 
+fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltins) {
+  var col : f32 = ((builtins.coord.x * locations.loc1) + loc0);
+}
+
 [[stage(fragment)]]
 fn frag_main(tint_symbol : tint_symbol_1) {
-  let loc0 : f32 = tint_symbol.loc0;
-  let locations : FragLocations = FragLocations(tint_symbol.loc1, tint_symbol.loc2);
-  let builtins : FragBuiltins = FragBuiltins(tint_symbol.coord);
-  var col : f32 = ((builtins.coord.x * locations.loc1) + loc0);
+  frag_main_inner(tint_symbol.loc0, FragLocations(tint_symbol.loc1, tint_symbol.loc2), FragBuiltins(tint_symbol.coord));
 }
 )";
 
@@ -331,9 +365,16 @@
   value : f32;
 };
 
+fn frag_main_inner() -> f32 {
+  return 1.0;
+}
+
 [[stage(fragment)]]
 fn frag_main() -> tint_symbol {
-  return tint_symbol(1.0);
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 )";
 
@@ -379,13 +420,22 @@
   mask : u32;
 };
 
-[[stage(fragment)]]
-fn frag_main() -> tint_symbol {
+fn frag_main_inner() -> FragOutput {
   var output : FragOutput;
   output.depth = 1.0;
   output.mask = 7u;
   output.color = vec4<f32>(0.5, 0.5, 0.5, 1.0);
-  return tint_symbol(output.color, output.depth, output.mask);
+  return output;
+}
+
+[[stage(fragment)]]
+fn frag_main() -> tint_symbol {
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.color = inner_result.color;
+  wrapper_result.depth = inner_result.depth;
+  wrapper_result.mask = inner_result.mask;
+  return wrapper_result;
 }
 )";
 
@@ -436,10 +486,13 @@
   mul : f32;
 };
 
+fn frag_main1_inner(inputs : FragmentInput) {
+  var x : f32 = foo(inputs);
+}
+
 [[stage(fragment)]]
 fn frag_main1(tint_symbol : tint_symbol_1) {
-  let inputs : FragmentInput = FragmentInput(tint_symbol.value, tint_symbol.mul);
-  var x : f32 = foo(inputs);
+  frag_main1_inner(FragmentInput(tint_symbol.value, tint_symbol.mul));
 }
 
 struct tint_symbol_3 {
@@ -449,10 +502,13 @@
   mul : f32;
 };
 
+fn frag_main2_inner(inputs : FragmentInput) {
+  var x : f32 = foo(inputs);
+}
+
 [[stage(fragment)]]
 fn frag_main2(tint_symbol_2 : tint_symbol_3) {
-  let inputs : FragmentInput = FragmentInput(tint_symbol_2.value, tint_symbol_2.mul);
-  var x : f32 = foo(inputs);
+  frag_main2_inner(FragmentInput(tint_symbol_2.value, tint_symbol_2.mul));
 }
 )";
 
@@ -512,13 +568,16 @@
   col2 : f32;
 };
 
-[[stage(fragment)]]
-fn frag_main1(tint_symbol : tint_symbol_1) {
-  let inputs : FragmentInput = FragmentInput(tint_symbol.col1, tint_symbol.col2);
+fn frag_main1_inner(inputs : FragmentInput) {
   global_inputs = inputs;
   var r : f32 = foo();
   var g : f32 = bar();
 }
+
+[[stage(fragment)]]
+fn frag_main1(tint_symbol : tint_symbol_1) {
+  frag_main1_inner(FragmentInput(tint_symbol.col1, tint_symbol.col2));
+}
 )";
 
   DataMap data;
@@ -593,12 +652,18 @@
   col2 : myf32;
 };
 
+fn frag_main_inner(inputs : MyFragmentInput) -> MyFragmentOutput {
+  var x : myf32 = foo(inputs);
+  return MyFragmentOutput(x, inputs.col2);
+}
+
 [[stage(fragment)]]
 fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 {
-  let inputs : MyFragmentInput = MyFragmentInput(tint_symbol.col1, tint_symbol.col2);
-  var x : myf32 = foo(inputs);
-  let tint_symbol_3 : FragmentOutput = MyFragmentOutput(x, inputs.col2);
-  return tint_symbol_2(tint_symbol_3.col1, tint_symbol_3.col2);
+  let inner_result = frag_main_inner(MyFragmentInput(tint_symbol.col1, tint_symbol.col2));
+  var wrapper_result : tint_symbol_2;
+  wrapper_result.col1 = inner_result.col1;
+  wrapper_result.col2 = inner_result.col2;
+  return wrapper_result;
 }
 )";
 
@@ -660,13 +725,22 @@
   pos : vec4<f32>;
 };
 
-[[stage(vertex)]]
-fn vert_main() -> tint_symbol {
-  let tint_symbol_1 : VertexOut = VertexOut();
-  return tint_symbol(tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3, tint_symbol_1.pos);
+fn vert_main_inner() -> VertexOut {
+  return VertexOut();
 }
 
-struct tint_symbol_3 {
+[[stage(vertex)]]
+fn vert_main() -> tint_symbol {
+  let inner_result = vert_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.loc3 = inner_result.loc3;
+  return wrapper_result;
+}
+
+struct tint_symbol_2 {
   [[location(1), interpolate(flat)]]
   loc1 : f32;
   [[location(2), interpolate(linear, sample)]]
@@ -675,12 +749,14 @@
   loc3 : f32;
 };
 
-[[stage(fragment)]]
-fn frag_main(tint_symbol_2 : tint_symbol_3) {
-  let inputs : FragmentIn = FragmentIn(tint_symbol_2.loc1, tint_symbol_2.loc2);
-  let loc3 : f32 = tint_symbol_2.loc3;
+fn frag_main_inner(inputs : FragmentIn, loc3 : f32) {
   let x = ((inputs.loc1 + inputs.loc2) + loc3);
 }
+
+[[stage(fragment)]]
+fn frag_main(tint_symbol_1 : tint_symbol_2) {
+  frag_main_inner(FragmentIn(tint_symbol_1.loc1, tint_symbol_1.loc2), tint_symbol_1.loc3);
+}
 )";
 
   DataMap data;
@@ -718,20 +794,33 @@
   pos : vec4<f32>;
 };
 
-[[stage(vertex)]]
-fn main1() -> tint_symbol {
-  let tint_symbol_1 : VertexOut = VertexOut();
-  return tint_symbol(tint_symbol_1.pos);
+fn main1_inner() -> VertexOut {
+  return VertexOut();
 }
 
-struct tint_symbol_2 {
+[[stage(vertex)]]
+fn main1() -> tint_symbol {
+  let inner_result = main1_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+struct tint_symbol_1 {
   [[builtin(position), invariant]]
   value : vec4<f32>;
 };
 
+fn main2_inner() -> vec4<f32> {
+  return vec4<f32>();
+}
+
 [[stage(vertex)]]
-fn main2() -> tint_symbol_2 {
-  return tint_symbol_2(vec4<f32>());
+fn main2() -> tint_symbol_1 {
+  let inner_result_1 = main2_inner();
+  var wrapper_result_1 : tint_symbol_1;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 )";
 
@@ -792,11 +881,16 @@
   value : f32;
 };
 
+fn frag_main_inner(inputs : FragmentInput) -> FragmentOutput {
+  return FragmentOutput(((inputs.coord.x * inputs.value) + inputs.loc0));
+}
+
 [[stage(fragment)]]
 fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 {
-  let inputs : FragmentInput = FragmentInput(tint_symbol.value, tint_symbol.coord, tint_symbol.loc0);
-  let tint_symbol_3 : FragmentOutput = FragmentOutput(((inputs.coord.x * inputs.value) + inputs.loc0));
-  return tint_symbol_2(tint_symbol_3.value);
+  let inner_result = frag_main_inner(FragmentInput(tint_symbol.value, tint_symbol.coord, tint_symbol.loc0));
+  var wrapper_result : tint_symbol_2;
+  wrapper_result.value = inner_result.value;
+  return wrapper_result;
 }
 )";
 
@@ -865,13 +959,23 @@
   pos : vec4<f32>;
 };
 
-[[stage(vertex)]]
-fn vert_main() -> tint_symbol {
-  let tint_symbol_1 : VertexOutput = VertexOutput();
-  return tint_symbol(tint_symbol_1.a, tint_symbol_1.b, tint_symbol_1.c, tint_symbol_1.d, tint_symbol_1.pos);
+fn vert_main_inner() -> VertexOutput {
+  return VertexOutput();
 }
 
-struct tint_symbol_3 {
+[[stage(vertex)]]
+fn vert_main() -> tint_symbol {
+  let inner_result = vert_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.b = inner_result.b;
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.d = inner_result.d;
+  wrapper_result.a = inner_result.a;
+  wrapper_result.c = inner_result.c;
+  return wrapper_result;
+}
+
+struct tint_symbol_2 {
   [[location(0)]]
   a : f32;
   [[location(1)]]
@@ -886,12 +990,12 @@
   ff : bool;
 };
 
+fn frag_main_inner(ff : bool, c : i32, inputs : FragmentInputExtra, b : u32) {
+}
+
 [[stage(fragment)]]
-fn frag_main(tint_symbol_2 : tint_symbol_3) {
-  let ff : bool = tint_symbol_2.ff;
-  let c : i32 = tint_symbol_2.c;
-  let inputs : FragmentInputExtra = FragmentInputExtra(tint_symbol_2.d, tint_symbol_2.pos, tint_symbol_2.a);
-  let b : u32 = tint_symbol_2.b;
+fn frag_main(tint_symbol_1 : tint_symbol_2) {
+  frag_main_inner(tint_symbol_1.ff, tint_symbol_1.c, FragmentInputExtra(tint_symbol_1.d, tint_symbol_1.pos, tint_symbol_1.a), tint_symbol_1.b);
 }
 )";
 
@@ -916,9 +1020,12 @@
   col : f32;
 };
 
+fn tint_symbol_1_inner(col : f32) {
+}
+
 [[stage(fragment)]]
 fn tint_symbol_1(tint_symbol : tint_symbol_2) {
-  let col : f32 = tint_symbol.col;
+  tint_symbol_1_inner(tint_symbol.col);
 }
 )";
 
@@ -938,14 +1045,20 @@
 )";
 
   auto* expect = R"(
-struct tint_symbol_1 {
+struct tint_symbol {
   [[builtin(sample_mask)]]
-  tint_symbol : u32;
+  fixed_sample_mask : u32;
 };
 
+fn frag_main_inner() {
+}
+
 [[stage(fragment)]]
-fn frag_main() -> tint_symbol_1 {
-  return tint_symbol_1(3u);
+fn frag_main() -> tint_symbol {
+  frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.fixed_sample_mask = 3u;
+  return wrapper_result;
 }
 )";
 
@@ -966,14 +1079,21 @@
 )";
 
   auto* expect = R"(
-struct tint_symbol_1 {
+struct tint_symbol {
   [[builtin(sample_mask)]]
-  tint_symbol : u32;
+  fixed_sample_mask : u32;
 };
 
+fn frag_main_inner() {
+  return;
+}
+
 [[stage(fragment)]]
-fn frag_main() -> tint_symbol_1 {
-  return tint_symbol_1(3u);
+fn frag_main() -> tint_symbol {
+  frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.fixed_sample_mask = 3u;
+  return wrapper_result;
 }
 )";
 
@@ -999,9 +1119,16 @@
   value : u32;
 };
 
+fn frag_main_inner() -> u32 {
+  return 7u;
+}
+
 [[stage(fragment)]]
 fn frag_main() -> tint_symbol {
-  return tint_symbol((7u & 3u));
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.value = (inner_result & 3u);
+  return wrapper_result;
 }
 )";
 
@@ -1022,16 +1149,24 @@
 )";
 
   auto* expect = R"(
-struct tint_symbol_1 {
+struct tint_symbol {
   [[location(0)]]
   value : f32;
   [[builtin(sample_mask)]]
-  tint_symbol : u32;
+  fixed_sample_mask : u32;
 };
 
+fn frag_main_inner() -> f32 {
+  return 1.0;
+}
+
 [[stage(fragment)]]
-fn frag_main() -> tint_symbol_1 {
-  return tint_symbol_1(1.0, 3u);
+fn frag_main() -> tint_symbol {
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.value = inner_result;
+  wrapper_result.fixed_sample_mask = 3u;
+  return wrapper_result;
 }
 )";
 
@@ -1073,10 +1208,18 @@
   mask : u32;
 };
 
+fn frag_main_inner() -> Output {
+  return Output(0.5, 7u, 1.0);
+}
+
 [[stage(fragment)]]
 fn frag_main() -> tint_symbol {
-  let tint_symbol_1 : Output = Output(0.5, 7u, 1.0);
-  return tint_symbol(tint_symbol_1.value, tint_symbol_1.depth, (tint_symbol_1.mask & 3u));
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.depth = inner_result.depth;
+  wrapper_result.mask = (inner_result.mask & 3u);
+  wrapper_result.value = inner_result.value;
+  return wrapper_result;
 }
 )";
 
@@ -1108,19 +1251,27 @@
   value : f32;
 };
 
-struct tint_symbol_1 {
+struct tint_symbol {
   [[location(0)]]
   value : f32;
   [[builtin(frag_depth)]]
   depth : f32;
   [[builtin(sample_mask)]]
-  tint_symbol : u32;
+  fixed_sample_mask : u32;
 };
 
+fn frag_main_inner() -> Output {
+  return Output(0.5, 1.0);
+}
+
 [[stage(fragment)]]
-fn frag_main() -> tint_symbol_1 {
-  let tint_symbol_2 : Output = Output(0.5, 1.0);
-  return tint_symbol_1(tint_symbol_2.value, tint_symbol_2.depth, 3u);
+fn frag_main() -> tint_symbol {
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.depth = inner_result.depth;
+  wrapper_result.value = inner_result.value;
+  wrapper_result.fixed_sample_mask = 3u;
+  return wrapper_result;
 }
 )";
 
@@ -1160,31 +1311,53 @@
   value : u32;
 };
 
-[[stage(fragment)]]
-fn frag_main1() -> tint_symbol {
-  return tint_symbol((7u & 3u));
+fn frag_main1_inner() -> u32 {
+  return 7u;
 }
 
-struct tint_symbol_2 {
+[[stage(fragment)]]
+fn frag_main1() -> tint_symbol {
+  let inner_result = frag_main1_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.value = (inner_result & 3u);
+  return wrapper_result;
+}
+
+struct tint_symbol_1 {
   [[location(0)]]
   value : f32;
   [[builtin(sample_mask)]]
-  tint_symbol_1 : u32;
+  fixed_sample_mask : u32;
 };
 
-[[stage(fragment)]]
-fn frag_main2() -> tint_symbol_2 {
-  return tint_symbol_2(1.0, 3u);
+fn frag_main2_inner() -> f32 {
+  return 1.0;
 }
 
-struct tint_symbol_3 {
+[[stage(fragment)]]
+fn frag_main2() -> tint_symbol_1 {
+  let inner_result_1 = frag_main2_inner();
+  var wrapper_result_1 : tint_symbol_1;
+  wrapper_result_1.value = inner_result_1;
+  wrapper_result_1.fixed_sample_mask = 3u;
+  return wrapper_result_1;
+}
+
+struct tint_symbol_2 {
   [[builtin(position)]]
   value : vec4<f32>;
 };
 
+fn vert_main1_inner() -> vec4<f32> {
+  return vec4<f32>();
+}
+
 [[stage(vertex)]]
-fn vert_main1() -> tint_symbol_3 {
-  return tint_symbol_3(vec4<f32>());
+fn vert_main1() -> tint_symbol_2 {
+  let inner_result_2 = vert_main1_inner();
+  var wrapper_result_2 : tint_symbol_2;
+  wrapper_result_2.value = inner_result_2;
+  return wrapper_result_2;
 }
 
 [[stage(compute), workgroup_size(1)]]
@@ -1200,6 +1373,57 @@
   EXPECT_EQ(expect, str(got));
 }
 
+TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_AvoidNameClash) {
+  auto* src = R"(
+struct FragOut {
+  [[location(0)]] fixed_sample_mask : vec4<f32>;
+  [[location(1)]] fixed_sample_mask_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn frag_main() -> FragOut {
+  return FragOut();
+}
+)";
+
+  auto* expect = R"(
+struct FragOut {
+  fixed_sample_mask : vec4<f32>;
+  fixed_sample_mask_1 : vec4<f32>;
+};
+
+struct tint_symbol {
+  [[location(0)]]
+  fixed_sample_mask : vec4<f32>;
+  [[location(1)]]
+  fixed_sample_mask_1 : vec4<f32>;
+  [[builtin(sample_mask)]]
+  fixed_sample_mask_2 : u32;
+};
+
+fn frag_main_inner() -> FragOut {
+  return FragOut();
+}
+
+[[stage(fragment)]]
+fn frag_main() -> tint_symbol {
+  let inner_result = frag_main_inner();
+  var wrapper_result : tint_symbol;
+  wrapper_result.fixed_sample_mask = inner_result.fixed_sample_mask;
+  wrapper_result.fixed_sample_mask_1 = inner_result.fixed_sample_mask_1;
+  wrapper_result.fixed_sample_mask_2 = 3u;
+  return wrapper_result;
+}
+)";
+
+  DataMap data;
+  data.Add<CanonicalizeEntryPointIO::Config>(
+      CanonicalizeEntryPointIO::BuiltinStyle::kParameter, 0x03);
+  auto got = Run<CanonicalizeEntryPointIO>(src, data);
+
+  EXPECT_EQ(expect, str(got));
+}
+
 }  // namespace
 }  // namespace transform
 }  // namespace tint
diff --git a/src/transform/msl_test.cc b/src/transform/msl_test.cc
index 95f125d..ed4062b 100644
--- a/src/transform/msl_test.cc
+++ b/src/transform/msl_test.cc
@@ -34,15 +34,19 @@
 )";
 
   auto* expect = R"(
-[[stage(compute), workgroup_size(1)]]
-fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) {
-  [[internal(disable_validation__ignore_storage_class)]] var<workgroup> tint_symbol_1 : f32;
-  [[internal(disable_validation__ignore_storage_class)]] var<private> tint_symbol_2 : f32;
+fn main_inner(local_invocation_index : u32, tint_symbol : ptr<workgroup, f32>, tint_symbol_1 : ptr<private, f32>) {
   {
-    tint_symbol_1 = f32();
+    *(tint_symbol) = f32();
   }
   workgroupBarrier();
-  tint_symbol_1 = tint_symbol_2;
+  *(tint_symbol) = *(tint_symbol_1);
+}
+
+[[stage(compute), workgroup_size(1)]]
+fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) {
+  [[internal(disable_validation__ignore_storage_class)]] var<workgroup> tint_symbol_2 : f32;
+  [[internal(disable_validation__ignore_storage_class)]] var<private> tint_symbol_3 : f32;
+  main_inner(local_invocation_index, &(tint_symbol_2), &(tint_symbol_3));
 }
 )";
 
@@ -80,26 +84,30 @@
 fn no_uses() {
 }
 
-fn bar(a : f32, b : f32, tint_symbol_1 : ptr<private, f32>, tint_symbol_2 : ptr<workgroup, f32>) {
-  *(tint_symbol_1) = a;
-  *(tint_symbol_2) = b;
+fn bar(a : f32, b : f32, tint_symbol : ptr<private, f32>, tint_symbol_1 : ptr<workgroup, f32>) {
+  *(tint_symbol) = a;
+  *(tint_symbol_1) = b;
 }
 
-fn foo(a : f32, tint_symbol_3 : ptr<private, f32>, tint_symbol_4 : ptr<workgroup, f32>) {
+fn foo(a : f32, tint_symbol_2 : ptr<private, f32>, tint_symbol_3 : ptr<workgroup, f32>) {
   let b : f32 = 2.0;
-  bar(a, b, tint_symbol_3, tint_symbol_4);
+  bar(a, b, tint_symbol_2, tint_symbol_3);
   no_uses();
 }
 
+fn main_inner(local_invocation_index : u32, tint_symbol_4 : ptr<workgroup, f32>, tint_symbol_5 : ptr<private, f32>) {
+  {
+    *(tint_symbol_4) = f32();
+  }
+  workgroupBarrier();
+  foo(1.0, tint_symbol_5, tint_symbol_4);
+}
+
 [[stage(compute), workgroup_size(1)]]
 fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) {
-  [[internal(disable_validation__ignore_storage_class)]] var<workgroup> tint_symbol_5 : f32;
-  [[internal(disable_validation__ignore_storage_class)]] var<private> tint_symbol_6 : f32;
-  {
-    tint_symbol_5 = f32();
-  }
-  workgroupBarrier();
-  foo(1.0, &(tint_symbol_6), &(tint_symbol_5));
+  [[internal(disable_validation__ignore_storage_class)]] var<workgroup> tint_symbol_6 : f32;
+  [[internal(disable_validation__ignore_storage_class)]] var<private> tint_symbol_7 : f32;
+  main_inner(local_invocation_index, &(tint_symbol_6), &(tint_symbol_7));
 }
 )";
 
@@ -148,16 +156,20 @@
 )";
 
   auto* expect = R"(
-[[stage(compute), workgroup_size(1)]]
-fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) {
-  [[internal(disable_validation__ignore_storage_class)]] var<workgroup> tint_symbol_1 : f32;
-  [[internal(disable_validation__ignore_storage_class)]] var<private> tint_symbol_2 : f32;
+fn main_inner(local_invocation_index : u32, tint_symbol : ptr<workgroup, f32>, tint_symbol_1 : ptr<private, f32>) {
   {
-    tint_symbol_1 = f32();
+    *(tint_symbol) = f32();
   }
   workgroupBarrier();
-  let x : f32 = (tint_symbol_2 + tint_symbol_1);
-  tint_symbol_2 = x;
+  let x : f32 = (*(tint_symbol_1) + *(tint_symbol));
+  *(tint_symbol_1) = x;
+}
+
+[[stage(compute), workgroup_size(1)]]
+fn main([[builtin(local_invocation_index)]] local_invocation_index : u32) {
+  [[internal(disable_validation__ignore_storage_class)]] var<workgroup> tint_symbol_2 : f32;
+  [[internal(disable_validation__ignore_storage_class)]] var<private> tint_symbol_3 : f32;
+  main_inner(local_invocation_index, &(tint_symbol_2), &(tint_symbol_3));
 }
 )";
 
diff --git a/src/writer/hlsl/generator_impl_function_test.cc b/src/writer/hlsl/generator_impl_function_test.cc
index 59ea1e7..41b2294 100644
--- a/src/writer/hlsl/generator_impl_function_test.cc
+++ b/src/writer/hlsl/generator_impl_function_test.cc
@@ -130,10 +130,15 @@
   float value : SV_Target1;
 };
 
+float frag_main_inner(float foo) {
+  return foo;
+}
+
 tint_symbol_2 frag_main(tint_symbol_1 tint_symbol) {
-  const float foo = tint_symbol.foo;
-  const tint_symbol_2 tint_symbol_3 = {foo};
-  return tint_symbol_3;
+  const float inner_result = frag_main_inner(tint_symbol.foo);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 )");
 }
@@ -160,10 +165,15 @@
   float value : SV_Depth;
 };
 
+float frag_main_inner(float4 coord) {
+  return coord.x;
+}
+
 tint_symbol_2 frag_main(tint_symbol_1 tint_symbol) {
-  const float4 coord = tint_symbol.coord;
-  const tint_symbol_2 tint_symbol_3 = {coord.x};
-  return tint_symbol_3;
+  const float inner_result = frag_main_inner(tint_symbol.coord);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 )");
 }
@@ -218,23 +228,35 @@
   float4 pos : SV_Position;
 };
 
-tint_symbol vert_main() {
-  const Interface tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f), 0.5f, 0.25f};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.col1, tint_symbol_1.col2, tint_symbol_1.pos};
-  return tint_symbol_4;
+Interface vert_main_inner() {
+  const Interface tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f), 0.5f, 0.25f};
+  return tint_symbol_3;
 }
 
-struct tint_symbol_3 {
+tint_symbol vert_main() {
+  const Interface inner_result = vert_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.col1 = inner_result.col1;
+  wrapper_result.col2 = inner_result.col2;
+  return wrapper_result;
+}
+
+struct tint_symbol_2 {
   float col1 : TEXCOORD1;
   float col2 : TEXCOORD2;
   float4 pos : SV_Position;
 };
 
-void frag_main(tint_symbol_3 tint_symbol_2) {
-  const Interface inputs = {tint_symbol_2.pos, tint_symbol_2.col1, tint_symbol_2.col2};
+void frag_main_inner(Interface inputs) {
   const float r = inputs.col1;
   const float g = inputs.col2;
   const float4 p = inputs.pos;
+}
+
+void frag_main(tint_symbol_2 tint_symbol_1) {
+  const Interface tint_symbol_4 = {tint_symbol_1.pos, tint_symbol_1.col1, tint_symbol_1.col2};
+  frag_main_inner(tint_symbol_4);
   return;
 }
 )");
@@ -278,28 +300,38 @@
 };
 
 VertexOutput foo(float x) {
-  const VertexOutput tint_symbol_4 = {float4(x, x, x, 1.0f)};
-  return tint_symbol_4;
+  const VertexOutput tint_symbol_2 = {float4(x, x, x, 1.0f)};
+  return tint_symbol_2;
 }
 
 struct tint_symbol {
   float4 pos : SV_Position;
 };
 
-tint_symbol vert_main1() {
-  const VertexOutput tint_symbol_1 = foo(0.5f);
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.pos};
-  return tint_symbol_5;
+VertexOutput vert_main1_inner() {
+  return foo(0.5f);
 }
 
-struct tint_symbol_2 {
+tint_symbol vert_main1() {
+  const VertexOutput inner_result = vert_main1_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+struct tint_symbol_1 {
   float4 pos : SV_Position;
 };
 
-tint_symbol_2 vert_main2() {
-  const VertexOutput tint_symbol_3 = foo(0.25f);
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.pos};
-  return tint_symbol_6;
+VertexOutput vert_main2_inner() {
+  return foo(0.25f);
+}
+
+tint_symbol_1 vert_main2() {
+  const VertexOutput inner_result_1 = vert_main2_inner();
+  tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0;
+  wrapper_result_1.pos = inner_result_1.pos;
+  return wrapper_result_1;
 }
 )");
 }
diff --git a/src/writer/msl/generator_impl_function_test.cc b/src/writer/msl/generator_impl_function_test.cc
index 9ad9b82..226c53a 100644
--- a/src/writer/msl/generator_impl_function_test.cc
+++ b/src/writer/msl/generator_impl_function_test.cc
@@ -111,10 +111,15 @@
   float value [[color(1)]];
 };
 
+float frag_main_inner(float foo) {
+  return foo;
+}
+
 fragment tint_symbol_2 frag_main(tint_symbol_1 tint_symbol [[stage_in]]) {
-  float const foo = tint_symbol.foo;
-  tint_symbol_2 const tint_symbol_3 = {.value=foo};
-  return tint_symbol_3;
+  float const inner_result = frag_main_inner(tint_symbol.foo);
+  tint_symbol_2 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 )");
@@ -137,13 +142,19 @@
   EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_1 {
+struct tint_symbol {
   float value [[depth(any)]];
 };
 
-fragment tint_symbol_1 frag_main(float4 coord [[position]]) {
-  tint_symbol_1 const tint_symbol_2 = {.value=coord.x};
-  return tint_symbol_2;
+float frag_main_inner(float4 coord) {
+  return coord.x;
+}
+
+fragment tint_symbol frag_main(float4 coord [[position]]) {
+  float const inner_result = frag_main_inner(coord);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 )");
@@ -201,21 +212,33 @@
   float col2 [[user(locn2)]];
   float4 pos [[position]];
 };
-struct tint_symbol_4 {
+struct tint_symbol_2 {
   float col1 [[user(locn1)]];
   float col2 [[user(locn2)]];
 };
 
-vertex tint_symbol vert_main() {
-  Interface const tint_symbol_1 = {.col1=0.5f, .col2=0.25f, .pos=float4()};
-  tint_symbol const tint_symbol_5 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=tint_symbol_1.pos};
-  return tint_symbol_5;
+Interface vert_main_inner() {
+  Interface const tint_symbol_3 = {.col1=0.5f, .col2=0.25f, .pos=float4()};
+  return tint_symbol_3;
 }
 
-fragment void frag_main(float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]]) {
-  Interface const colors = {.col1=tint_symbol_2.col1, .col2=tint_symbol_2.col2, .pos=tint_symbol_3};
+vertex tint_symbol vert_main() {
+  Interface const inner_result = vert_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.col1 = inner_result.col1;
+  wrapper_result.col2 = inner_result.col2;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+void frag_main_inner(Interface colors) {
   float const r = colors.col1;
   float const g = colors.col2;
+}
+
+fragment void frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  Interface const tint_symbol_4 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=pos};
+  frag_main_inner(tint_symbol_4);
   return;
 }
 
@@ -265,25 +288,35 @@
 struct tint_symbol {
   float4 pos [[position]];
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 pos [[position]];
 };
 
 VertexOutput foo(float x) {
-  VertexOutput const tint_symbol_4 = {.pos=float4(x, x, x, 1.0f)};
-  return tint_symbol_4;
+  VertexOutput const tint_symbol_2 = {.pos=float4(x, x, x, 1.0f)};
+  return tint_symbol_2;
+}
+
+VertexOutput vert_main1_inner() {
+  return foo(0.5f);
 }
 
 vertex tint_symbol vert_main1() {
-  VertexOutput const tint_symbol_1 = foo(0.5f);
-  tint_symbol const tint_symbol_5 = {.pos=tint_symbol_1.pos};
-  return tint_symbol_5;
+  VertexOutput const inner_result = vert_main1_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
 }
 
-vertex tint_symbol_2 vert_main2() {
-  VertexOutput const tint_symbol_3 = foo(0.25f);
-  tint_symbol_2 const tint_symbol_6 = {.pos=tint_symbol_3.pos};
-  return tint_symbol_6;
+VertexOutput vert_main2_inner() {
+  return foo(0.25f);
+}
+
+vertex tint_symbol_1 vert_main2() {
+  VertexOutput const inner_result_1 = vert_main2_inner();
+  tint_symbol_1 wrapper_result_1 = {};
+  wrapper_result_1.pos = inner_result_1.pos;
+  return wrapper_result_1;
 }
 
 )");
diff --git a/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl b/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl
index 24312d1..789126b 100644
--- a/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl
+++ b/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl
@@ -23,9 +23,7 @@
   return arr_1;
 }
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint idx = tint_symbol.idx;
+void main_inner(uint idx) {
   const int3 a = asint(s.Load3((176u * idx)));
   const int b = asint(s.Load(((176u * idx) + 12u)));
   const uint3 c = s.Load3(((176u * idx) + 16u));
@@ -35,5 +33,10 @@
   const float2x3 g = tint_symbol_8(s, ((176u * idx) + 48u));
   const float3x2 h = tint_symbol_9(s, ((176u * idx) + 80u));
   const int4 i[4] = tint_symbol_11(s, ((176u * idx) + 112u));
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.idx);
   return;
 }
diff --git a/test/buffer/storage/dynamic_index/read.wgsl.expected.msl b/test/buffer/storage/dynamic_index/read.wgsl.expected.msl
index b9aa14f..6b40e48 100644
--- a/test/buffer/storage/dynamic_index/read.wgsl.expected.msl
+++ b/test/buffer/storage/dynamic_index/read.wgsl.expected.msl
@@ -20,7 +20,7 @@
   /* 0x0000 */ Inner arr[1];
 };
 
-kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S& s [[buffer(0)]]) {
+void tint_symbol_inner(const device S& s, uint idx) {
   int3 const a = s.arr[idx].a;
   int const b = s.arr[idx].b;
   uint3 const c = s.arr[idx].c;
@@ -30,6 +30,10 @@
   float2x3 const g = s.arr[idx].g;
   float3x2 const h = s.arr[idx].h;
   tint_array_wrapper const i = s.arr[idx].i;
+}
+
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S& s [[buffer(0)]]) {
+  tint_symbol_inner(s, idx);
   return;
 }
 
diff --git a/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl b/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl
index c18b7c6..d267673 100644
--- a/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl
+++ b/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl
@@ -24,9 +24,7 @@
   }
 }
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint idx = tint_symbol.idx;
+void main_inner(uint idx) {
   s.Store3((176u * idx), asuint(int3(0, 0, 0)));
   s.Store(((176u * idx) + 12u), asuint(0));
   s.Store3(((176u * idx) + 16u), asuint(uint3(0u, 0u, 0u)));
@@ -37,5 +35,10 @@
   tint_symbol_9(s, ((176u * idx) + 80u), float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
   const int4 tint_symbol_13[4] = (int4[4])0;
   tint_symbol_11(s, ((176u * idx) + 112u), tint_symbol_13);
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.idx);
   return;
 }
diff --git a/test/buffer/storage/dynamic_index/write.wgsl.expected.msl b/test/buffer/storage/dynamic_index/write.wgsl.expected.msl
index be0d4db..fcb9558 100644
--- a/test/buffer/storage/dynamic_index/write.wgsl.expected.msl
+++ b/test/buffer/storage/dynamic_index/write.wgsl.expected.msl
@@ -20,7 +20,7 @@
   /* 0x0000 */ Inner arr[1];
 };
 
-kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& s [[buffer(0)]]) {
+void tint_symbol_inner(device S& s, uint idx) {
   s.arr[idx].a = int3();
   s.arr[idx].b = int();
   s.arr[idx].c = uint3();
@@ -29,8 +29,12 @@
   s.arr[idx].f = float();
   s.arr[idx].g = float2x3();
   s.arr[idx].h = float3x2();
-  tint_array_wrapper const tint_symbol_2 = {.arr={}};
-  s.arr[idx].i = tint_symbol_2;
+  tint_array_wrapper const tint_symbol_1 = {.arr={}};
+  s.arr[idx].i = tint_symbol_1;
+}
+
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& s [[buffer(0)]]) {
+  tint_symbol_inner(s, idx);
   return;
 }
 
diff --git a/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl b/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl
index 22133cc..351446d 100644
--- a/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl
+++ b/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl
@@ -12,9 +12,7 @@
   return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
 }
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint idx = tint_symbol.idx;
+void main_inner(uint idx) {
   const uint scalar_offset_2 = ((192u * idx)) / 4;
   const int3 a = asint(s[scalar_offset_2 / 4].xyz);
   const uint scalar_offset_3 = (((192u * idx) + 12u)) / 4;
@@ -34,5 +32,10 @@
   uint4 ubo_load_1 = s[scalar_offset_9 / 4];
   const int2 h = asint(((scalar_offset_9 & 2) ? ubo_load_1.zw : ubo_load_1.xy));
   const float2x3 i = tint_symbol_9(s, ((192u * idx) + 64u));
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.idx);
   return;
 }
diff --git a/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl b/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl
index 08c4e7d..f33e9a7 100644
--- a/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl
+++ b/test/buffer/uniform/dynamic_index/read.wgsl.expected.msl
@@ -25,7 +25,7 @@
   /* 0x0000 */ tint_array_wrapper_1 arr;
 };
 
-kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], constant S& s [[buffer(0)]]) {
+void tint_symbol_inner(constant S& s, uint idx) {
   int3 const a = s.arr.arr[idx].a;
   int const b = s.arr.arr[idx].b;
   uint3 const c = s.arr.arr[idx].c;
@@ -35,6 +35,10 @@
   int2 const g = s.arr.arr[idx].g;
   int2 const h = s.arr.arr[idx].h;
   float2x3 const i = s.arr.arr[idx].i;
+}
+
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], constant S& s [[buffer(0)]]) {
+  tint_symbol_inner(s, idx);
   return;
 }
 
diff --git a/test/bug/dawn/947.wgsl.expected.hlsl b/test/bug/dawn/947.wgsl.expected.hlsl
index 56a4250..5c18116 100644
--- a/test/bug/dawn/947.wgsl.expected.hlsl
+++ b/test/bug/dawn/947.wgsl.expected.hlsl
@@ -14,8 +14,7 @@
   float4 position : SV_Position;
 };
 
-tint_symbol_2 vs_main(tint_symbol_1 tint_symbol) {
-  const uint VertexIndex = tint_symbol.VertexIndex;
+VertexOutputs vs_main_inner(uint VertexIndex) {
   float2 texcoord[3] = {float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)};
   VertexOutputs output = (VertexOutputs)0;
   output.position = float4(((texcoord[VertexIndex] * 2.0f) - float2(1.0f, 1.0f)), 0.0f, 1.0f);
@@ -25,8 +24,15 @@
   } else {
     output.texcoords = ((((texcoord[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * asfloat(uniforms[0].xy)) + asfloat(uniforms[0].zw));
   }
-  const tint_symbol_2 tint_symbol_8 = {output.texcoords, output.position};
-  return tint_symbol_8;
+  return output;
+}
+
+tint_symbol_2 vs_main(tint_symbol_1 tint_symbol) {
+  const VertexOutputs inner_result = vs_main_inner(tint_symbol.VertexIndex);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.texcoords = inner_result.texcoords;
+  wrapper_result.position = inner_result.position;
+  return wrapper_result;
 }
 
 SamplerState mySampler : register(s1, space0);
@@ -39,13 +45,18 @@
   float4 value : SV_Target0;
 };
 
-tint_symbol_5 fs_main(tint_symbol_4 tint_symbol_3) {
-  const float2 texcoord = tint_symbol_3.texcoord;
+float4 fs_main_inner(float2 texcoord) {
   float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f));
   if (!(all((clampedTexcoord == texcoord)))) {
     discard;
   }
   float4 srcColor = myTexture.Sample(mySampler, texcoord);
-  const tint_symbol_5 tint_symbol_9 = {srcColor};
-  return tint_symbol_9;
+  return srcColor;
+}
+
+tint_symbol_5 fs_main(tint_symbol_4 tint_symbol_3) {
+  const float4 inner_result_1 = fs_main_inner(tint_symbol_3.texcoord);
+  tint_symbol_5 wrapper_result_1 = (tint_symbol_5)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
diff --git a/test/bug/dawn/947.wgsl.expected.msl b/test/bug/dawn/947.wgsl.expected.msl
index 2ad00ea..4003d16 100644
--- a/test/bug/dawn/947.wgsl.expected.msl
+++ b/test/bug/dawn/947.wgsl.expected.msl
@@ -9,21 +9,21 @@
   float2 texcoords;
   float4 position;
 };
-struct tint_symbol_1 {
+struct tint_symbol {
   float2 texcoords [[user(locn0)]];
   float4 position [[position]];
 };
 struct tint_array_wrapper {
   float2 arr[3];
 };
-struct tint_symbol_3 {
+struct tint_symbol_2 {
   float2 texcoord [[user(locn0)]];
 };
-struct tint_symbol_4 {
+struct tint_symbol_3 {
   float4 value [[color(0)]];
 };
 
-vertex tint_symbol_1 vs_main(uint VertexIndex [[vertex_id]], constant Uniforms& uniforms [[buffer(0)]]) {
+VertexOutputs vs_main_inner(constant Uniforms& uniforms, uint VertexIndex) {
   tint_array_wrapper texcoord = {.arr={float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)}};
   VertexOutputs output = {};
   output.position = float4(((texcoord.arr[VertexIndex] * 2.0f) - float2(1.0f, 1.0f)), 0.0f, 1.0f);
@@ -33,18 +33,30 @@
   } else {
     output.texcoords = ((((texcoord.arr[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * uniforms.u_scale) + uniforms.u_offset);
   }
-  tint_symbol_1 const tint_symbol_5 = {.texcoords=output.texcoords, .position=output.position};
-  return tint_symbol_5;
+  return output;
 }
 
-fragment tint_symbol_4 fs_main(texture2d<float, access::sample> tint_symbol_7 [[texture(2)]], sampler tint_symbol_8 [[sampler(1)]], tint_symbol_3 tint_symbol_2 [[stage_in]]) {
-  float2 const texcoord = tint_symbol_2.texcoord;
+vertex tint_symbol vs_main(uint VertexIndex [[vertex_id]], constant Uniforms& uniforms [[buffer(0)]]) {
+  VertexOutputs const inner_result = vs_main_inner(uniforms, VertexIndex);
+  tint_symbol wrapper_result = {};
+  wrapper_result.texcoords = inner_result.texcoords;
+  wrapper_result.position = inner_result.position;
+  return wrapper_result;
+}
+
+float4 fs_main_inner(float2 texcoord, texture2d<float, access::sample> tint_symbol_4, sampler tint_symbol_5) {
   float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f));
   if (!(all((clampedTexcoord == texcoord)))) {
     discard_fragment();
   }
-  float4 srcColor = tint_symbol_7.sample(tint_symbol_8, texcoord);
-  tint_symbol_4 const tint_symbol_6 = {.value=srcColor};
-  return tint_symbol_6;
+  float4 srcColor = tint_symbol_4.sample(tint_symbol_5, texcoord);
+  return srcColor;
+}
+
+fragment tint_symbol_3 fs_main(texture2d<float, access::sample> tint_symbol_6 [[texture(2)]], sampler tint_symbol_7 [[sampler(1)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, tint_symbol_6, tint_symbol_7);
+  tint_symbol_3 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl
index 60d2831..0ea2ad6 100644
--- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl
+++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl
@@ -13,9 +13,7 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void f(tint_symbol_2 tint_symbol_1) {
-  const uint local_invocation_index = tint_symbol_1.local_invocation_index;
+void f_inner(uint local_invocation_index) {
   {
     for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) {
       const uint i = idx;
@@ -24,5 +22,10 @@
   }
   GroupMemoryBarrierWithGroupSync();
   result.Store(0u, asuint(s.data[asint(ubo[0].x)]));
+}
+
+[numthreads(1, 1, 1)]
+void f(tint_symbol_2 tint_symbol_1) {
+  f_inner(tint_symbol_1.local_invocation_index);
   return;
 }
diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl
index 0d586be..973bbf6 100644
--- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl
+++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.msl
@@ -14,14 +14,18 @@
   /* 0x0000 */ int out;
 };
 
-kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
-  threadgroup S tint_symbol_1;
+void f_inner(constant UBO& ubo, device Result& result, uint local_invocation_index, threadgroup S* const tint_symbol) {
   for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) {
     uint const i = idx;
-    tint_symbol_1.data.arr[i] = int();
+    (*(tint_symbol)).data.arr[i] = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  result.out = tint_symbol_1.data.arr[ubo.dynamic_idx];
+  result.out = (*(tint_symbol)).data.arr[ubo.dynamic_idx];
+}
+
+kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
+  threadgroup S tint_symbol_1;
+  f_inner(ubo, result, local_invocation_index, &(tint_symbol_1));
   return;
 }
 
diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl
index ba5fff9..1098254 100644
--- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl
+++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl
@@ -13,9 +13,7 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void f(tint_symbol_2 tint_symbol_1) {
-  const uint local_invocation_index = tint_symbol_1.local_invocation_index;
+void f_inner(uint local_invocation_index) {
   {
     for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) {
       const uint i = idx;
@@ -25,5 +23,10 @@
   GroupMemoryBarrierWithGroupSync();
   s.data[asint(ubo[0].x)] = 1;
   result.Store(0u, asuint(s.data[3]));
+}
+
+[numthreads(1, 1, 1)]
+void f(tint_symbol_2 tint_symbol_1) {
+  f_inner(tint_symbol_1.local_invocation_index);
   return;
 }
diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl
index a79848a..dd5b422 100644
--- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl
+++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.msl
@@ -14,15 +14,19 @@
   /* 0x0000 */ int out;
 };
 
-kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
-  threadgroup S tint_symbol_1;
+void f_inner(constant UBO& ubo, device Result& result, uint local_invocation_index, threadgroup S* const tint_symbol) {
   for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) {
     uint const i = idx;
-    tint_symbol_1.data.arr[i] = int();
+    (*(tint_symbol)).data.arr[i] = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  tint_symbol_1.data.arr[ubo.dynamic_idx] = 1;
-  result.out = tint_symbol_1.data.arr[3];
+  (*(tint_symbol)).data.arr[ubo.dynamic_idx] = 1;
+  result.out = (*(tint_symbol)).data.arr[3];
+}
+
+kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
+  threadgroup S tint_symbol_1;
+  f_inner(ubo, result, local_invocation_index, &(tint_symbol_1));
   return;
 }
 
diff --git a/test/bug/tint/1046.wgsl.expected.hlsl b/test/bug/tint/1046.wgsl.expected.hlsl
index fd700b1..d37918b 100644
--- a/test/bug/tint/1046.wgsl.expected.hlsl
+++ b/test/bug/tint/1046.wgsl.expected.hlsl
@@ -48,14 +48,20 @@
   float4 color : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const FragmentInput fragment = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color};
+FragmentOutput main_inner(FragmentInput fragment) {
   FragmentOutput output = (FragmentOutput)0;
   output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
   uniforms;
   mySampler;
   myTexture;
   pointLights;
-  const tint_symbol_2 tint_symbol_5 = {output.color};
-  return tint_symbol_5;
+  return output;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const FragmentInput tint_symbol_5 = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color};
+  const FragmentOutput inner_result = main_inner(tint_symbol_5);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.color = inner_result.color;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/1046.wgsl.expected.msl b/test/bug/tint/1046.wgsl.expected.msl
index 0de4fdf..77d314a 100644
--- a/test/bug/tint/1046.wgsl.expected.msl
+++ b/test/bug/tint/1046.wgsl.expected.msl
@@ -25,17 +25,17 @@
 struct FragmentOutput {
   float4 color;
 };
-struct tint_symbol_4 {
+struct tint_symbol_3 {
   float4 view_position [[user(locn0)]];
   float4 normal [[user(locn1)]];
   float2 uv [[user(locn2)]];
   float4 color [[user(locn3)]];
 };
-struct tint_symbol_5 {
+struct tint_symbol_4 {
   float4 color [[color(0)]];
 };
 
-float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2d<float, access::sample> tint_symbol_7, sampler tint_symbol_8) {
+float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
   float4 color = 0.0f;
   if ((uniforms.color_source == 0u)) {
     color = tint_symbol.color;
@@ -48,7 +48,7 @@
         color = uniforms.color;
       } else {
         if ((uniforms.color_source == 3u)) {
-          color = tint_symbol_7.sample(tint_symbol_8, tint_symbol.uv);
+          color = tint_symbol_6.sample(tint_symbol_7, tint_symbol.uv);
         }
       }
     }
@@ -56,15 +56,21 @@
   return color;
 }
 
-fragment tint_symbol_5 tint_symbol_1(sampler tint_symbol_9 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_10 [[texture(3)]], float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) {
-  FragmentInput const tint_symbol = {.position=tint_symbol_3, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color};
+FragmentOutput tint_symbol_1_inner(constant Uniforms& uniforms, const device PointLights& pointLights, FragmentInput tint_symbol, sampler tint_symbol_8, texture2d<float, access::sample> tint_symbol_9) {
   FragmentOutput output = {};
   output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
   (void) uniforms;
+  (void) tint_symbol_8;
   (void) tint_symbol_9;
-  (void) tint_symbol_10;
   (void) pointLights;
-  tint_symbol_5 const tint_symbol_6 = {.color=output.color};
-  return tint_symbol_6;
+  return output;
+}
+
+fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_11 [[texture(3)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) {
+  FragmentInput const tint_symbol_5 = {.position=position, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color};
+  FragmentOutput const inner_result = tint_symbol_1_inner(uniforms, pointLights, tint_symbol_5, tint_symbol_10, tint_symbol_11);
+  tint_symbol_4 wrapper_result = {};
+  wrapper_result.color = inner_result.color;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/1076.wgsl b/test/bug/tint/1076.wgsl
new file mode 100644
index 0000000..b854b18
--- /dev/null
+++ b/test/bug/tint/1076.wgsl
@@ -0,0 +1,12 @@
+struct FragIn {
+  [[location(0)]] a : f32;
+  [[builtin(sample_mask)]] mask : u32;
+};
+
+[[stage(fragment)]]
+fn main(in : FragIn, [[location(1)]] b : f32) -> FragIn {
+  if (in.mask == 0u) {
+    return in;
+  }
+  return FragIn(b, 1u);
+}
diff --git a/test/bug/tint/1076.wgsl.expected.hlsl b/test/bug/tint/1076.wgsl.expected.hlsl
new file mode 100644
index 0000000..868773b
--- /dev/null
+++ b/test/bug/tint/1076.wgsl.expected.hlsl
@@ -0,0 +1,30 @@
+struct FragIn {
+  float a;
+  uint mask;
+};
+struct tint_symbol_2 {
+  float a : TEXCOORD0;
+  float b : TEXCOORD1;
+  uint mask : SV_Coverage;
+};
+struct tint_symbol_3 {
+  float a : SV_Target0;
+  uint mask : SV_Coverage;
+};
+
+FragIn main_inner(FragIn tint_symbol, float b) {
+  if ((tint_symbol.mask == 0u)) {
+    return tint_symbol;
+  }
+  const FragIn tint_symbol_4 = {b, 1u};
+  return tint_symbol_4;
+}
+
+tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
+  const FragIn tint_symbol_5 = {tint_symbol_1.a, tint_symbol_1.mask};
+  const FragIn inner_result = main_inner(tint_symbol_5, tint_symbol_1.b);
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.a = inner_result.a;
+  wrapper_result.mask = inner_result.mask;
+  return wrapper_result;
+}
diff --git a/test/bug/tint/1076.wgsl.expected.msl b/test/bug/tint/1076.wgsl.expected.msl
new file mode 100644
index 0000000..e187033
--- /dev/null
+++ b/test/bug/tint/1076.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+struct FragIn {
+  float a;
+  uint mask;
+};
+struct tint_symbol_2 {
+  float a [[user(locn0)]];
+  float b [[user(locn1)]];
+};
+struct tint_symbol_3 {
+  float a [[color(0)]];
+  uint mask [[sample_mask]];
+};
+
+FragIn tint_symbol_inner(FragIn in, float b) {
+  if ((in.mask == 0u)) {
+    return in;
+  }
+  FragIn const tint_symbol_4 = {.a=b, .mask=1u};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_3 tint_symbol(uint mask [[sample_mask]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  FragIn const tint_symbol_5 = {.a=tint_symbol_1.a, .mask=mask};
+  FragIn const inner_result = tint_symbol_inner(tint_symbol_5, tint_symbol_1.b);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.a = inner_result.a;
+  wrapper_result.mask = inner_result.mask;
+  return wrapper_result;
+}
+
diff --git a/test/bug/tint/1076.wgsl.expected.spvasm b/test/bug/tint/1076.wgsl.expected.spvasm
new file mode 100644
index 0000000..09023fc
--- /dev/null
+++ b/test/bug/tint/1076.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_1 %tint_symbol_5 %tint_symbol_6 %tint_symbol_3
+               OpExecutionMode %main OriginUpperLeft
+               OpName %tint_symbol "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %tint_symbol_3 "tint_symbol_3"
+               OpName %tint_symbol_5 "tint_symbol_5"
+               OpName %tint_symbol_6 "tint_symbol_6"
+               OpName %FragIn "FragIn"
+               OpMemberName %FragIn 0 "a"
+               OpMemberName %FragIn 1 "mask"
+               OpName %tint_symbol_7 "tint_symbol_7"
+               OpName %tint_symbol_4 "tint_symbol_4"
+               OpName %main "main"
+               OpDecorate %tint_symbol Location 0
+               OpDecorate %_arr_uint_uint_1 ArrayStride 4
+               OpDecorate %tint_symbol_1 BuiltIn SampleMask
+               OpDecorate %tint_symbol_3 Location 1
+               OpDecorate %tint_symbol_5 Location 0
+               OpDecorate %tint_symbol_6 BuiltIn SampleMask
+               OpMemberDecorate %FragIn 0 Offset 0
+               OpMemberDecorate %FragIn 1 Offset 4
+      %float = OpTypeFloat 32
+%_ptr_Input_float = OpTypePointer Input %float
+%tint_symbol = OpVariable %_ptr_Input_float Input
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
+%_ptr_Input__arr_uint_uint_1 = OpTypePointer Input %_arr_uint_uint_1
+%tint_symbol_1 = OpVariable %_ptr_Input__arr_uint_uint_1 Input
+%tint_symbol_3 = OpVariable %_ptr_Input_float Input
+%_ptr_Output_float = OpTypePointer Output %float
+         %12 = OpConstantNull %float
+%tint_symbol_5 = OpVariable %_ptr_Output_float Output %12
+%_ptr_Output__arr_uint_uint_1 = OpTypePointer Output %_arr_uint_uint_1
+         %15 = OpConstantNull %_arr_uint_uint_1
+%tint_symbol_6 = OpVariable %_ptr_Output__arr_uint_uint_1 Output %15
+       %void = OpTypeVoid
+     %FragIn = OpTypeStruct %float %uint
+         %16 = OpTypeFunction %void %FragIn
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Output_uint = OpTypePointer Output %uint
+         %28 = OpTypeFunction %void
+%_ptr_Input_uint = OpTypePointer Input %uint
+     %uint_0 = OpConstant %uint 0
+       %bool = OpTypeBool
+%tint_symbol_7 = OpFunction %void None %16
+%tint_symbol_4 = OpFunctionParameter %FragIn
+         %21 = OpLabel
+         %22 = OpCompositeExtract %float %tint_symbol_4 0
+               OpStore %tint_symbol_5 %22
+         %26 = OpAccessChain %_ptr_Output_uint %tint_symbol_6 %int_0
+         %27 = OpCompositeExtract %uint %tint_symbol_4 1
+               OpStore %26 %27
+               OpReturn
+               OpFunctionEnd
+       %main = OpFunction %void None %28
+         %30 = OpLabel
+         %31 = OpLoad %float %tint_symbol
+         %33 = OpAccessChain %_ptr_Input_uint %tint_symbol_1 %int_0
+         %34 = OpLoad %uint %33
+         %35 = OpCompositeConstruct %FragIn %31 %34
+         %36 = OpCompositeExtract %uint %35 1
+         %38 = OpIEqual %bool %36 %uint_0
+               OpSelectionMerge %40 None
+               OpBranchConditional %38 %41 %40
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %tint_symbol_7 %35
+               OpReturn
+         %40 = OpLabel
+         %44 = OpLoad %float %tint_symbol_3
+         %45 = OpCompositeConstruct %FragIn %44 %uint_1
+         %43 = OpFunctionCall %void %tint_symbol_7 %45
+               OpReturn
+               OpFunctionEnd
diff --git a/test/bug/tint/1076.wgsl.expected.wgsl b/test/bug/tint/1076.wgsl.expected.wgsl
new file mode 100644
index 0000000..311d625
--- /dev/null
+++ b/test/bug/tint/1076.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+struct FragIn {
+  [[location(0)]]
+  a : f32;
+  [[builtin(sample_mask)]]
+  mask : u32;
+};
+
+[[stage(fragment)]]
+fn main(in : FragIn, [[location(1)]] b : f32) -> FragIn {
+  if ((in.mask == 0u)) {
+    return in;
+  }
+  return FragIn(b, 1u);
+}
diff --git a/test/bug/tint/292.wgsl.expected.hlsl b/test/bug/tint/292.wgsl.expected.hlsl
index fe6d7b6..37debae 100644
--- a/test/bug/tint/292.wgsl.expected.hlsl
+++ b/test/bug/tint/292.wgsl.expected.hlsl
@@ -2,9 +2,15 @@
   float4 value : SV_Position;
 };
 
-tint_symbol main() {
+float4 main_inner() {
   float3 light = float3(1.200000048f, 1.0f, 2.0f);
   float3 negative_light = -(light);
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol main() {
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/292.wgsl.expected.msl b/test/bug/tint/292.wgsl.expected.msl
index 8d10ef8..4874e05 100644
--- a/test/bug/tint/292.wgsl.expected.msl
+++ b/test/bug/tint/292.wgsl.expected.msl
@@ -5,10 +5,16 @@
   float4 value [[position]];
 };
 
-vertex tint_symbol_1 tint_symbol() {
+float4 tint_symbol_inner() {
   float3 light = float3(1.200000048f, 1.0f, 2.0f);
   float3 negative_light = -(light);
-  tint_symbol_1 const tint_symbol_2 = {.value=float4()};
-  return tint_symbol_2;
+  return float4();
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/403.wgsl.expected.hlsl b/test/bug/tint/403.wgsl.expected.hlsl
index f798195..69c48be 100644
--- a/test/bug/tint/403.wgsl.expected.hlsl
+++ b/test/bug/tint/403.wgsl.expected.hlsl
@@ -28,8 +28,7 @@
   return float2x2(asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
 }
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint gl_VertexIndex = tint_symbol.gl_VertexIndex;
+float4 main_inner(uint gl_VertexIndex) {
   float2 indexable[3] = (float2[3])0;
   const float2x2 x_23 = tint_symbol_3(x_20, 0u);
   const float2x2 x_28 = tint_symbol_5(x_26, 0u);
@@ -38,6 +37,12 @@
   indexable = tint_symbol_7;
   const float2 x_51 = indexable[x_46];
   const float2 x_52 = mul(x_51, float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])));
-  const tint_symbol_2 tint_symbol_8 = {float4(x_52.x, x_52.y, 0.0f, 1.0f)};
-  return tint_symbol_8;
+  return float4(x_52.x, x_52.y, 0.0f, 1.0f);
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const float4 inner_result = main_inner(tint_symbol.gl_VertexIndex);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/534.wgsl.expected.hlsl b/test/bug/tint/534.wgsl.expected.hlsl
index 9c8466c..03518c7 100644
--- a/test/bug/tint/534.wgsl.expected.hlsl
+++ b/test/bug/tint/534.wgsl.expected.hlsl
@@ -17,9 +17,7 @@
   uint3 GlobalInvocationID : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_2 tint_symbol_1) {
-  const uint3 GlobalInvocationID = tint_symbol_1.GlobalInvocationID;
+void main_inner(uint3 GlobalInvocationID) {
   int2 tint_tmp;
   src.GetDimensions(tint_tmp.x, tint_tmp.y);
   int2 size = tint_tmp;
@@ -49,5 +47,10 @@
   } else {
     output.Store((4u * outputIndex), asuint(uint(0)));
   }
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_2 tint_symbol_1) {
+  main_inner(tint_symbol_1.GlobalInvocationID);
   return;
 }
diff --git a/test/bug/tint/534.wgsl.expected.msl b/test/bug/tint/534.wgsl.expected.msl
index c363fc7..9cdcaee 100644
--- a/test/bug/tint/534.wgsl.expected.msl
+++ b/test/bug/tint/534.wgsl.expected.msl
@@ -15,15 +15,15 @@
   return 1u;
 }
 
-kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) {
-  int2 size = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, uint3 GlobalInvocationID, texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2) {
+  int2 size = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
   int2 dstTexCoord = int2(GlobalInvocationID.xy);
   int2 srcTexCoord = dstTexCoord;
   if ((uniforms.dstTextureFlipY == 1u)) {
     srcTexCoord.y = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(size.y) - as_type<uint>(dstTexCoord.y)))) - as_type<uint>(1)));
   }
-  float4 srcColor = tint_symbol_2.read(uint2(srcTexCoord), 0);
-  float4 dstColor = tint_symbol_3.read(uint2(dstTexCoord), 0);
+  float4 srcColor = tint_symbol_1.read(uint2(srcTexCoord), 0);
+  float4 dstColor = tint_symbol_2.read(uint2(dstTexCoord), 0);
   bool success = true;
   uint4 srcColorBits = 0u;
   uint4 dstColorBits = uint4(dstColor);
@@ -37,6 +37,10 @@
   } else {
     output.result[outputIndex] = uint(0);
   }
+}
+
+kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) {
+  tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4);
   return;
 }
 
diff --git a/test/bug/tint/744.wgsl.expected.hlsl b/test/bug/tint/744.wgsl.expected.hlsl
index c7bab90..0b1434e 100644
--- a/test/bug/tint/744.wgsl.expected.hlsl
+++ b/test/bug/tint/744.wgsl.expected.hlsl
@@ -9,9 +9,7 @@
   uint3 global_id : SV_DispatchThreadID;
 };
 
-[numthreads(2, 2, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 global_id = tint_symbol.global_id;
+void main_inner(uint3 global_id) {
   const uint2 resultCell = uint2(global_id.y, global_id.x);
   const uint dimInner = uniforms[0].y;
   const uint dimOutter = uniforms[1].y;
@@ -25,5 +23,10 @@
   }
   const uint index = (resultCell.y + (resultCell.x * dimOutter));
   resultMatrix.Store((4u * index), asuint(result));
+}
+
+[numthreads(2, 2, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.global_id);
   return;
 }
diff --git a/test/bug/tint/744.wgsl.expected.msl b/test/bug/tint/744.wgsl.expected.msl
index 16ebd85..d7964c7 100644
--- a/test/bug/tint/744.wgsl.expected.msl
+++ b/test/bug/tint/744.wgsl.expected.msl
@@ -10,7 +10,7 @@
   /* 0x0000 */ uint numbers[1];
 };
 
-kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) {
+void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMatrix, const device Matrix& secondMatrix, device Matrix& resultMatrix, uint3 global_id) {
   uint2 const resultCell = uint2(global_id.y, global_id.x);
   uint const dimInner = uniforms.aShape.y;
   uint const dimOutter = uniforms.outShape.y;
@@ -22,6 +22,10 @@
   }
   uint const index = (resultCell.y + (resultCell.x * dimOutter));
   resultMatrix.numbers[index] = result;
+}
+
+kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) {
+  tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, global_id);
   return;
 }
 
diff --git a/test/bug/tint/749.spvasm.expected.hlsl b/test/bug/tint/749.spvasm.expected.hlsl
index c0db54c..3fef834 100644
--- a/test/bug/tint/749.spvasm.expected.hlsl
+++ b/test/bug/tint/749.spvasm.expected.hlsl
@@ -57,18 +57,18 @@
   const int x_34_save = x_33;
   const int x_35 = obj.numbers[x_34_save];
   const QuicksortObject x_943 = obj;
-  const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_6 = {tint_symbol_5};
-  obj = tint_symbol_6;
+  const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_5 = {tint_symbol_4};
+  obj = tint_symbol_5;
   obj = x_943;
   const float2 x_527 = float2(x_526.x, x_526.x);
   const int x_36_save = x_32;
   const float3 x_528 = float3(x_524.x, x_524.z, x_524.x);
   obj.numbers[x_36_save] = x_35;
   const QuicksortObject x_944 = obj;
-  const int tint_symbol_7[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_8 = {tint_symbol_7};
-  obj = tint_symbol_8;
+  const int tint_symbol_6[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_7 = {tint_symbol_6};
+  obj = tint_symbol_7;
   obj = x_944;
   const float3 x_529 = float3(x_526.y, x_526.z, x_526.x);
   const int x_945 = i;
@@ -91,9 +91,9 @@
   obj.numbers[x_36_save] = 0;
   obj.numbers[x_36_save] = x_949;
   const QuicksortObject x_950 = obj;
-  const int tint_symbol_9[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_10 = {tint_symbol_9};
-  obj = tint_symbol_10;
+  const int tint_symbol_8[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_9 = {tint_symbol_8};
+  obj = tint_symbol_9;
   obj = x_950;
   const float3 x_532 = float3(x_528.x, x_528.y, x_528.x);
   const int x_951 = obj.numbers[x_34_save];
@@ -149,9 +149,9 @@
   const float3 x_536 = float3(x_534.x, x_534.z, x_535.x);
   j_1 = 10;
   const QuicksortObject x_960 = obj;
-  const int tint_symbol_11[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_12 = {tint_symbol_11};
-  obj = tint_symbol_12;
+  const int tint_symbol_10[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_11 = {tint_symbol_10};
+  obj = tint_symbol_11;
   obj = x_960;
   while (true) {
     const int x_961 = pivot;
@@ -166,9 +166,9 @@
     pivot = x_963;
     x_537 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).z);
     const QuicksortObject x_964 = obj;
-    const int tint_symbol_13[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_14 = {tint_symbol_13};
-    obj = tint_symbol_14;
+    const int tint_symbol_12[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_13 = {tint_symbol_12};
+    obj = tint_symbol_13;
     obj = x_964;
     const int x_56 = h;
     const int x_965 = h;
@@ -202,9 +202,9 @@
     param_1 = x_971;
     const int x_62 = obj.numbers[x_61_save];
     const QuicksortObject x_972 = obj;
-    const int tint_symbol_15[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_16 = {tint_symbol_15};
-    obj = tint_symbol_16;
+    const int tint_symbol_14[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_15 = {tint_symbol_14};
+    obj = tint_symbol_15;
     obj = x_972;
     const int x_63 = pivot;
     const float2 x_540 = float2(float3(1.0f, 2.0f, 3.0f).y, x_534.z);
@@ -262,9 +262,9 @@
       param_1 = x_985;
     }
     const QuicksortObject x_986 = obj;
-    const int tint_symbol_17[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_18 = {tint_symbol_17};
-    obj = tint_symbol_18;
+    const int tint_symbol_16[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_17 = {tint_symbol_16};
+    obj = tint_symbol_17;
     obj = x_986;
     {
       const int x_987 = h;
@@ -297,9 +297,9 @@
   obj.numbers[x_42_save] = x_993;
   const float2 x_549 = float2(x_534.x, x_534.y);
   const QuicksortObject x_994 = obj;
-  const int tint_symbol_19[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_20 = {tint_symbol_19};
-  obj = tint_symbol_20;
+  const int tint_symbol_18[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_19 = {tint_symbol_18};
+  obj = tint_symbol_19;
   obj = x_994;
   const int x_995 = h;
   h = 0;
@@ -367,8 +367,8 @@
   param_5 = x_1007;
   h_1 = 9;
   const int x_1008[10] = stack;
-  const int tint_symbol_21[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  stack = tint_symbol_21;
+  const int tint_symbol_20[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  stack = tint_symbol_20;
   stack = x_1008;
   const float2 x_556 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).y);
   const int x_1009 = param_5;
@@ -401,15 +401,15 @@
   param_4 = x_1015;
   const int x_95 = l_1;
   const QuicksortObject x_1016 = obj;
-  const int tint_symbol_22[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_23 = {tint_symbol_22};
-  obj = tint_symbol_23;
+  const int tint_symbol_21[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_22 = {tint_symbol_21};
+  obj = tint_symbol_22;
   obj = x_1016;
   const float3 x_560 = float3(x_559.y, x_559.x, x_557.x);
   const int x_96_save = x_94;
   const int x_1017[10] = stack;
-  const int tint_symbol_24[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  stack = tint_symbol_24;
+  const int tint_symbol_23[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  stack = tint_symbol_23;
   stack = x_1017;
   const float3 x_561 = float3(x_556.y, x_556.y, x_556.y);
   const int x_1018 = l_1;
@@ -459,13 +459,13 @@
     h_1 = 0;
     h_1 = x_1028;
     const int x_1029[10] = stack;
-    const int tint_symbol_25[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    stack = tint_symbol_25;
+    const int tint_symbol_24[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    stack = tint_symbol_24;
     stack = x_1029;
     const int x_106 = top;
     const int x_1030[10] = stack;
-    const int tint_symbol_26[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    stack = tint_symbol_26;
+    const int tint_symbol_25[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    stack = tint_symbol_25;
     stack = x_1030;
     const float2 x_567 = float2(x_558.x, x_564.z);
     const int x_1031 = param_4;
@@ -476,9 +476,9 @@
       break;
     }
     const QuicksortObject x_1032 = obj;
-    const int tint_symbol_27[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_28 = {tint_symbol_27};
-    obj = tint_symbol_28;
+    const int tint_symbol_26[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_27 = {tint_symbol_26};
+    obj = tint_symbol_27;
     obj = x_1032;
     const float3 x_568 = float3(x_559.y, x_559.x, x_563.y);
     const int x_1033 = param_4;
@@ -503,8 +503,8 @@
     stack[x_96_save] = x_1037;
     const int x_111 = stack[x_110_save];
     const int x_1038[10] = stack;
-    const int tint_symbol_29[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    stack = tint_symbol_29;
+    const int tint_symbol_28[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    stack = tint_symbol_28;
     stack = x_1038;
     const float3 x_571 = float3(x_559.y, x_559.x, x_564.y);
     const int x_1039 = l_1;
@@ -512,8 +512,8 @@
     l_1 = x_1039;
     h_1 = x_111;
     const int x_1040[10] = stack;
-    const int tint_symbol_30[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    stack = tint_symbol_30;
+    const int tint_symbol_29[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    stack = tint_symbol_29;
     stack = x_1040;
     const float2 x_572 = float2(x_562.y, x_561.y);
     const int x_1041 = p;
@@ -604,8 +604,8 @@
       stack[x_100_save] = 0;
       stack[x_100_save] = x_1061;
       const int x_1062[10] = stack;
-      const int tint_symbol_31[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-      stack = tint_symbol_31;
+      const int tint_symbol_30[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+      stack = tint_symbol_30;
       stack = x_1062;
       const float2 x_584 = float2(x_569.z, x_569.y);
       const float3 x_585 = float3(x_580.y, x_577.x, x_577.x);
@@ -644,8 +644,8 @@
       h_1 = x_1070;
       top = x_133;
       const int x_1071[10] = stack;
-      const int tint_symbol_32[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-      stack = tint_symbol_32;
+      const int tint_symbol_31[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+      stack = tint_symbol_31;
       stack = x_1071;
       const int x_134 = p;
       const float2 x_590 = float2(x_576.x, x_573.y);
@@ -670,9 +670,9 @@
     stack[x_96_save] = x_1076;
     const float2 x_592 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).y);
     const QuicksortObject x_1077 = obj;
-    const int tint_symbol_33[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_34 = {tint_symbol_33};
-    obj = tint_symbol_34;
+    const int tint_symbol_32[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_33 = {tint_symbol_32};
+    obj = tint_symbol_33;
     obj = x_1077;
     const int x_137 = p;
     const int x_1078 = stack[x_114_save];
@@ -737,8 +737,8 @@
       const float2 x_601 = float2(x_563.x, x_563.y);
       stack[x_147_save] = asint((1u + asuint(x_145)));
       const int x_1093[10] = stack;
-      const int tint_symbol_35[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-      stack = tint_symbol_35;
+      const int tint_symbol_34[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+      stack = tint_symbol_34;
       stack = x_1093;
       const int x_148 = top;
       const int x_1094 = stack[x_114_save];
@@ -746,8 +746,8 @@
       stack[x_114_save] = x_1094;
       const float2 x_602 = float2(x_565.y, x_599.y);
       const int x_1095[10] = stack;
-      const int tint_symbol_36[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-      stack = tint_symbol_36;
+      const int tint_symbol_35[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+      stack = tint_symbol_35;
       stack = x_1095;
       const int x_149 = (x_148 + asint(1u));
       const int x_1096 = stack[x_147_save];
@@ -782,9 +782,9 @@
       l_1 = x_1103;
       const float2 x_604 = float2(x_563.z, x_564.x);
       const QuicksortObject x_1104 = obj;
-      const int tint_symbol_37[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-      const QuicksortObject tint_symbol_38 = {tint_symbol_37};
-      obj = tint_symbol_38;
+      const int tint_symbol_36[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+      const QuicksortObject tint_symbol_37 = {tint_symbol_36};
+      obj = tint_symbol_37;
       obj = x_1104;
     }
   }
@@ -803,15 +803,15 @@
   uv = x_717;
   i_2 = 0;
   const QuicksortObject x_721 = obj;
-  const int tint_symbol_39[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_40 = {tint_symbol_39};
-  obj = tint_symbol_40;
+  const int tint_symbol_38[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_39 = {tint_symbol_38};
+  obj = tint_symbol_39;
   obj = x_721;
   if (true) {
     const QuicksortObject x_722 = obj;
-    const int tint_symbol_41[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_42 = {tint_symbol_41};
-    obj = tint_symbol_42;
+    const int tint_symbol_40[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_41 = {tint_symbol_40};
+    obj = tint_symbol_41;
     obj = x_722;
     const float2 x_431 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).x);
     const int x_158 = i_2;
@@ -823,15 +823,15 @@
     color = x_725;
     const float2 x_432 = float2(x_431.y, x_431.y);
     const QuicksortObject x_726 = obj;
-    const int tint_symbol_43[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_44 = {tint_symbol_43};
-    obj = tint_symbol_44;
+    const int tint_symbol_42[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_43 = {tint_symbol_42};
+    obj = tint_symbol_43;
     obj = x_726;
   }
   const QuicksortObject x_756 = obj;
-  const int tint_symbol_45[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_46 = {tint_symbol_45};
-  obj = tint_symbol_46;
+  const int tint_symbol_44[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_45 = {tint_symbol_44};
+  obj = tint_symbol_45;
   obj = x_756;
   const float2 x_446 = float2(float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).x);
   const int x_757 = i_2;
@@ -839,9 +839,9 @@
   i_2 = x_757;
   quicksort_();
   const QuicksortObject x_758 = obj;
-  const int tint_symbol_47[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_48 = {tint_symbol_47};
-  obj = tint_symbol_48;
+  const int tint_symbol_46[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_47 = {tint_symbol_46};
+  obj = tint_symbol_47;
   obj = x_758;
   const float4 x_184 = gl_FragCoord;
   const float2 x_759 = uv;
@@ -854,18 +854,18 @@
   const float2 x_185 = float2(x_184.x, x_184.y);
   const float3 x_448 = float3(x_185.y, x_446.y, x_446.y);
   const QuicksortObject x_761 = obj;
-  const int tint_symbol_49[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_50 = {tint_symbol_49};
-  obj = tint_symbol_50;
+  const int tint_symbol_48[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_49 = {tint_symbol_48};
+  obj = tint_symbol_49;
   obj = x_761;
   const float2 x_762 = uv;
   uv = float2(0.0f, 0.0f);
   uv = x_762;
   const float2 x_191 = asfloat(x_188[0].xy);
   const QuicksortObject x_763 = obj;
-  const int tint_symbol_51[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_52 = {tint_symbol_51};
-  obj = tint_symbol_52;
+  const int tint_symbol_50[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_51 = {tint_symbol_50};
+  obj = tint_symbol_51;
   obj = x_763;
   const float3 x_449 = float3(x_184.y, float3(1.0f, 2.0f, 3.0f).z, x_184.w);
   const float3 x_764 = color;
@@ -873,9 +873,9 @@
   color = x_764;
   const float2 x_192 = (x_185 / x_191);
   const QuicksortObject x_765 = obj;
-  const int tint_symbol_53[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_54 = {tint_symbol_53};
-  obj = tint_symbol_54;
+  const int tint_symbol_52[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_53 = {tint_symbol_52};
+  obj = tint_symbol_53;
   obj = x_765;
   const float2 x_450 = float2(x_447.x, x_185.y);
   const float3 x_766 = color;
@@ -891,18 +891,18 @@
   color = x_768;
   const float3 x_451 = float3(x_185.x, x_185.y, x_446.y);
   const QuicksortObject x_769 = obj;
-  const int tint_symbol_55[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_56 = {tint_symbol_55};
-  obj = tint_symbol_56;
+  const int tint_symbol_54[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_55 = {tint_symbol_54};
+  obj = tint_symbol_55;
   obj = x_769;
   const int x_770 = obj.numbers[0u];
   obj.numbers[0u] = 0;
   obj.numbers[0u] = x_770;
   const int x_201 = obj.numbers[0u];
   const QuicksortObject x_771 = obj;
-  const int tint_symbol_57[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_58 = {tint_symbol_57};
-  obj = tint_symbol_58;
+  const int tint_symbol_56[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_57 = {tint_symbol_56};
+  obj = tint_symbol_57;
   obj = x_771;
   const int x_772 = obj.numbers[0u];
   obj.numbers[0u] = 0;
@@ -916,9 +916,9 @@
   i_2 = 0;
   i_2 = x_774;
   const QuicksortObject x_775 = obj;
-  const int tint_symbol_59[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_60 = {tint_symbol_59};
-  obj = tint_symbol_60;
+  const int tint_symbol_58[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_59 = {tint_symbol_58};
+  obj = tint_symbol_59;
   obj = x_775;
   const float3 x_453 = float3(x_451.x, x_450.x, x_450.y);
   color.x = (x_206 + float(x_201));
@@ -935,9 +935,9 @@
   uv.x = 0.0f;
   uv.x = x_778;
   const QuicksortObject x_779 = obj;
-  const int tint_symbol_61[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_62 = {tint_symbol_61};
-  obj = tint_symbol_62;
+  const int tint_symbol_60[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_61 = {tint_symbol_60};
+  obj = tint_symbol_61;
   obj = x_779;
   if ((x_210 > 0.25f)) {
     const int x_780 = i_2;
@@ -952,18 +952,18 @@
     uv.x = x_782;
     const int x_216 = obj.numbers[1];
     const QuicksortObject x_783 = obj;
-    const int tint_symbol_63[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_64 = {tint_symbol_63};
-    obj = tint_symbol_64;
+    const int tint_symbol_62[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_63 = {tint_symbol_62};
+    obj = tint_symbol_63;
     obj = x_783;
     const float2 x_457 = float2(x_454.x, x_454.x);
     const float2 x_784 = uv;
     uv = float2(0.0f, 0.0f);
     uv = x_784;
     const QuicksortObject x_785 = obj;
-    const int tint_symbol_65[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_66 = {tint_symbol_65};
-    obj = tint_symbol_66;
+    const int tint_symbol_64[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_65 = {tint_symbol_64};
+    obj = tint_symbol_65;
     obj = x_785;
     const float2 x_458 = float2(float3(1.0f, 2.0f, 3.0f).z, float2(0.0f, 0.0f).y);
     const int x_786 = i_2;
@@ -1081,9 +1081,9 @@
     color.x = 0.0f;
     color.x = x_816;
     const QuicksortObject x_817 = obj;
-    const int tint_symbol_67[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_68 = {tint_symbol_67};
-    obj = tint_symbol_68;
+    const int tint_symbol_66[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_67 = {tint_symbol_66};
+    obj = tint_symbol_67;
     obj = x_817;
     const float3 x_468 = float3(x_467.x, x_467.x, x_467.x);
     const float x_818 = uv[0];
@@ -1192,9 +1192,9 @@
     uv[0] = x_844;
     const float3 x_482 = float3(x_455.x, x_475.y, x_455.y);
     const QuicksortObject x_845 = obj;
-    const int tint_symbol_69[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_70 = {tint_symbol_69};
-    obj = tint_symbol_70;
+    const int tint_symbol_68[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_69 = {tint_symbol_68};
+    obj = tint_symbol_69;
     obj = x_845;
     const float x_846 = uv.y;
     uv.y = 0.0f;
@@ -1265,9 +1265,9 @@
     obj.numbers[6u] = x_863;
     const float2 x_490 = float2(x_480.z, x_480.z);
     const QuicksortObject x_864 = obj;
-    const int tint_symbol_71[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_72 = {tint_symbol_71};
-    obj = tint_symbol_72;
+    const int tint_symbol_70[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_71 = {tint_symbol_70};
+    obj = tint_symbol_71;
     obj = x_864;
     color.y = (float(x_280) + x_283);
     const float x_865 = color.x;
@@ -1284,9 +1284,9 @@
   color.x = x_867;
   const float x_287 = uv.y;
   const QuicksortObject x_868 = obj;
-  const int tint_symbol_73[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_74 = {tint_symbol_73};
-  obj = tint_symbol_74;
+  const int tint_symbol_72[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_73 = {tint_symbol_72};
+  obj = tint_symbol_73;
   obj = x_868;
   const float2 x_493 = float2(x_475.x, x_475.y);
   const float x_869 = uv[0];
@@ -1446,9 +1446,9 @@
     uv.x = 0.0f;
     uv.x = x_910;
     const QuicksortObject x_911 = obj;
-    const int tint_symbol_75[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    const QuicksortObject tint_symbol_76 = {tint_symbol_75};
-    obj = tint_symbol_76;
+    const int tint_symbol_74[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    const QuicksortObject tint_symbol_75 = {tint_symbol_74};
+    obj = tint_symbol_75;
     obj = x_911;
     const float3 x_513 = float3(x_505.z, x_505.x, x_448.x);
     const int x_912 = obj.numbers[8];
@@ -1500,14 +1500,14 @@
   uv.x = 0.0f;
   uv.x = x_923;
   const QuicksortObject x_924 = obj;
-  const int tint_symbol_77[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_78 = {tint_symbol_77};
-  obj = tint_symbol_78;
+  const int tint_symbol_76[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_77 = {tint_symbol_76};
+  obj = tint_symbol_77;
   obj = x_924;
   const QuicksortObject x_925 = obj;
-  const int tint_symbol_79[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_80 = {tint_symbol_79};
-  obj = tint_symbol_80;
+  const int tint_symbol_78[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_79 = {tint_symbol_78};
+  obj = tint_symbol_79;
   obj = x_925;
   const float x_926 = color.y;
   color.y = 0.0f;
@@ -1526,9 +1526,9 @@
   uv.x = x_929;
   x_GLF_color = x_330;
   const QuicksortObject x_930 = obj;
-  const int tint_symbol_81[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  const QuicksortObject tint_symbol_82 = {tint_symbol_81};
-  obj = tint_symbol_82;
+  const int tint_symbol_80[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  const QuicksortObject tint_symbol_81 = {tint_symbol_80};
+  obj = tint_symbol_81;
   obj = x_930;
   const float3 x_522 = float3(x_330.w, x_330.y, x_493.x);
   const float x_931 = color.x;
@@ -1547,11 +1547,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_83 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_83;
+  const main_out tint_symbol_82 = {x_GLF_color};
+  return tint_symbol_82;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/749.spvasm.expected.msl b/test/bug/tint/749.spvasm.expected.msl
index 51883a6..46339a7 100644
--- a/test/bug/tint/749.spvasm.expected.msl
+++ b/test/bug/tint/749.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_83) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_81) {
   int temp = 0;
   int const x_932 = temp;
   temp = 0;
@@ -35,10 +35,10 @@
   temp = 0;
   temp = x_935;
   int const x_30_save = x_28;
-  int const x_936 = (*(tint_symbol_83)).numbers.arr[x_30_save];
-  (*(tint_symbol_83)).numbers.arr[x_30_save] = 0;
-  (*(tint_symbol_83)).numbers.arr[x_30_save] = x_936;
-  int const x_31 = (*(tint_symbol_83)).numbers.arr[x_30_save];
+  int const x_936 = (*(tint_symbol_81)).numbers.arr[x_30_save];
+  (*(tint_symbol_81)).numbers.arr[x_30_save] = 0;
+  (*(tint_symbol_81)).numbers.arr[x_30_save] = x_936;
+  int const x_31 = (*(tint_symbol_81)).numbers.arr[x_30_save];
   int const x_937 = temp;
   temp = 0;
   temp = x_937;
@@ -51,33 +51,33 @@
   *(i) = 0;
   *(i) = x_939;
   int const x_32 = *(i);
-  int const x_940 = (*(tint_symbol_83)).numbers.arr[x_30_save];
-  (*(tint_symbol_83)).numbers.arr[x_30_save] = 0;
-  (*(tint_symbol_83)).numbers.arr[x_30_save] = x_940;
+  int const x_940 = (*(tint_symbol_81)).numbers.arr[x_30_save];
+  (*(tint_symbol_81)).numbers.arr[x_30_save] = 0;
+  (*(tint_symbol_81)).numbers.arr[x_30_save] = x_940;
   int const x_33 = *(j);
   int const x_941 = *(i);
   *(i) = 0;
   *(i) = x_941;
   float3 const x_526 = float3(x_525.x, x_525.z, x_525.z);
-  int const x_942 = (*(tint_symbol_83)).numbers.arr[x_30_save];
-  (*(tint_symbol_83)).numbers.arr[x_30_save] = 0;
-  (*(tint_symbol_83)).numbers.arr[x_30_save] = x_942;
+  int const x_942 = (*(tint_symbol_81)).numbers.arr[x_30_save];
+  (*(tint_symbol_81)).numbers.arr[x_30_save] = 0;
+  (*(tint_symbol_81)).numbers.arr[x_30_save] = x_942;
   int const x_34_save = x_33;
-  int const x_35 = (*(tint_symbol_83)).numbers.arr[x_34_save];
-  QuicksortObject const x_943 = *(tint_symbol_83);
-  tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_5 = {.numbers=tint_symbol_4};
-  *(tint_symbol_83) = tint_symbol_5;
-  *(tint_symbol_83) = x_943;
+  int const x_35 = (*(tint_symbol_81)).numbers.arr[x_34_save];
+  QuicksortObject const x_943 = *(tint_symbol_81);
+  tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_3 = {.numbers=tint_symbol_2};
+  *(tint_symbol_81) = tint_symbol_3;
+  *(tint_symbol_81) = x_943;
   float2 const x_527 = float2(x_526.x, x_526.x);
   int const x_36_save = x_32;
   float3 const x_528 = float3(x_524.x, x_524.z, x_524.x);
-  (*(tint_symbol_83)).numbers.arr[x_36_save] = x_35;
-  QuicksortObject const x_944 = *(tint_symbol_83);
-  tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_7 = {.numbers=tint_symbol_6};
-  *(tint_symbol_83) = tint_symbol_7;
-  *(tint_symbol_83) = x_944;
+  (*(tint_symbol_81)).numbers.arr[x_36_save] = x_35;
+  QuicksortObject const x_944 = *(tint_symbol_81);
+  tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_5 = {.numbers=tint_symbol_4};
+  *(tint_symbol_81) = tint_symbol_5;
+  *(tint_symbol_81) = x_944;
   float3 const x_529 = float3(x_526.y, x_526.z, x_526.x);
   int const x_945 = *(i);
   *(i) = 0;
@@ -87,31 +87,31 @@
   temp = 0;
   temp = x_946;
   float2 const x_530 = float2(x_529.z, x_529.y);
-  int const x_947 = (*(tint_symbol_83)).numbers.arr[x_34_save];
-  (*(tint_symbol_83)).numbers.arr[x_34_save] = 0;
-  (*(tint_symbol_83)).numbers.arr[x_34_save] = x_947;
+  int const x_947 = (*(tint_symbol_81)).numbers.arr[x_34_save];
+  (*(tint_symbol_81)).numbers.arr[x_34_save] = 0;
+  (*(tint_symbol_81)).numbers.arr[x_34_save] = x_947;
   int const x_38 = temp;
   int const x_948 = *(j);
   *(j) = 0;
   *(j) = x_948;
   float3 const x_531 = float3(x_527.x, x_526.y, x_526.x);
-  int const x_949 = (*(tint_symbol_83)).numbers.arr[x_36_save];
-  (*(tint_symbol_83)).numbers.arr[x_36_save] = 0;
-  (*(tint_symbol_83)).numbers.arr[x_36_save] = x_949;
-  QuicksortObject const x_950 = *(tint_symbol_83);
-  tint_array_wrapper const tint_symbol_8 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_9 = {.numbers=tint_symbol_8};
-  *(tint_symbol_83) = tint_symbol_9;
-  *(tint_symbol_83) = x_950;
+  int const x_949 = (*(tint_symbol_81)).numbers.arr[x_36_save];
+  (*(tint_symbol_81)).numbers.arr[x_36_save] = 0;
+  (*(tint_symbol_81)).numbers.arr[x_36_save] = x_949;
+  QuicksortObject const x_950 = *(tint_symbol_81);
+  tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_7 = {.numbers=tint_symbol_6};
+  *(tint_symbol_81) = tint_symbol_7;
+  *(tint_symbol_81) = x_950;
   float3 const x_532 = float3(x_528.x, x_528.y, x_528.x);
-  int const x_951 = (*(tint_symbol_83)).numbers.arr[x_34_save];
-  (*(tint_symbol_83)).numbers.arr[x_34_save] = 0;
-  (*(tint_symbol_83)).numbers.arr[x_34_save] = x_951;
-  (*(tint_symbol_83)).numbers.arr[x_37] = x_38;
+  int const x_951 = (*(tint_symbol_81)).numbers.arr[x_34_save];
+  (*(tint_symbol_81)).numbers.arr[x_34_save] = 0;
+  (*(tint_symbol_81)).numbers.arr[x_34_save] = x_951;
+  (*(tint_symbol_81)).numbers.arr[x_37] = x_38;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_84) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_82) {
   int param_3 = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -129,10 +129,10 @@
   *(l) = 0;
   *(l) = x_953;
   int const x_42_save = x_41;
-  int const x_954 = (*(tint_symbol_84)).numbers.arr[x_42_save];
-  (*(tint_symbol_84)).numbers.arr[x_42_save] = 0;
-  (*(tint_symbol_84)).numbers.arr[x_42_save] = x_954;
-  int const x_43 = (*(tint_symbol_84)).numbers.arr[x_42_save];
+  int const x_954 = (*(tint_symbol_82)).numbers.arr[x_42_save];
+  (*(tint_symbol_82)).numbers.arr[x_42_save] = 0;
+  (*(tint_symbol_82)).numbers.arr[x_42_save] = x_954;
+  int const x_43 = (*(tint_symbol_82)).numbers.arr[x_42_save];
   int const x_955 = param_3;
   param_3 = 0;
   param_3 = x_955;
@@ -156,11 +156,11 @@
   int const x_49 = *(l);
   float3 const x_536 = float3(x_534.x, x_534.z, x_535.x);
   j_1 = 10;
-  QuicksortObject const x_960 = *(tint_symbol_84);
-  tint_array_wrapper const tint_symbol_10 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_11 = {.numbers=tint_symbol_10};
-  *(tint_symbol_84) = tint_symbol_11;
-  *(tint_symbol_84) = x_960;
+  QuicksortObject const x_960 = *(tint_symbol_82);
+  tint_array_wrapper const tint_symbol_8 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_9 = {.numbers=tint_symbol_8};
+  *(tint_symbol_82) = tint_symbol_9;
+  *(tint_symbol_82) = x_960;
   while (true) {
     int const x_961 = pivot;
     pivot = 0;
@@ -173,11 +173,11 @@
     pivot = 0;
     pivot = x_963;
     x_537 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).z);
-    QuicksortObject const x_964 = *(tint_symbol_84);
-    tint_array_wrapper const tint_symbol_12 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_13 = {.numbers=tint_symbol_12};
-    *(tint_symbol_84) = tint_symbol_13;
-    *(tint_symbol_84) = x_964;
+    QuicksortObject const x_964 = *(tint_symbol_82);
+    tint_array_wrapper const tint_symbol_10 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_11 = {.numbers=tint_symbol_10};
+    *(tint_symbol_82) = tint_symbol_11;
+    *(tint_symbol_82) = x_964;
     int const x_56 = *(h);
     int const x_965 = *(h);
     *(h) = 0;
@@ -197,9 +197,9 @@
       break;
     }
     int const x_60 = j_1;
-    int const x_969 = (*(tint_symbol_84)).numbers.arr[x_42_save];
-    (*(tint_symbol_84)).numbers.arr[x_42_save] = 0;
-    (*(tint_symbol_84)).numbers.arr[x_42_save] = x_969;
+    int const x_969 = (*(tint_symbol_82)).numbers.arr[x_42_save];
+    (*(tint_symbol_82)).numbers.arr[x_42_save] = 0;
+    (*(tint_symbol_82)).numbers.arr[x_42_save] = x_969;
     int const x_61_save = x_60;
     int const x_970 = *(h);
     *(h) = 0;
@@ -208,12 +208,12 @@
     int const x_971 = param_1;
     param_1 = 0;
     param_1 = x_971;
-    int const x_62 = (*(tint_symbol_84)).numbers.arr[x_61_save];
-    QuicksortObject const x_972 = *(tint_symbol_84);
-    tint_array_wrapper const tint_symbol_14 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_15 = {.numbers=tint_symbol_14};
-    *(tint_symbol_84) = tint_symbol_15;
-    *(tint_symbol_84) = x_972;
+    int const x_62 = (*(tint_symbol_82)).numbers.arr[x_61_save];
+    QuicksortObject const x_972 = *(tint_symbol_82);
+    tint_array_wrapper const tint_symbol_12 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_13 = {.numbers=tint_symbol_12};
+    *(tint_symbol_82) = tint_symbol_13;
+    *(tint_symbol_82) = x_972;
     int const x_63 = pivot;
     float2 const x_540 = float2(float3(1.0f, 2.0f, 3.0f).y, x_534.z);
     int const x_973 = i_1;
@@ -265,16 +265,16 @@
       int const x_984 = param_3;
       param_3 = 0;
       param_3 = x_984;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_84);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_82);
       int const x_985 = param_1;
       param_1 = 0;
       param_1 = x_985;
     }
-    QuicksortObject const x_986 = *(tint_symbol_84);
-    tint_array_wrapper const tint_symbol_16 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_17 = {.numbers=tint_symbol_16};
-    *(tint_symbol_84) = tint_symbol_17;
-    *(tint_symbol_84) = x_986;
+    QuicksortObject const x_986 = *(tint_symbol_82);
+    tint_array_wrapper const tint_symbol_14 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_15 = {.numbers=tint_symbol_14};
+    *(tint_symbol_82) = tint_symbol_15;
+    *(tint_symbol_82) = x_986;
     {
       int const x_987 = *(h);
       *(h) = 0;
@@ -284,9 +284,9 @@
       *(h) = 0;
       *(h) = x_988;
       float3 const x_547 = float3(x_539.x, x_541.z, x_541.z);
-      int const x_989 = (*(tint_symbol_84)).numbers.arr[x_61_save];
-      (*(tint_symbol_84)).numbers.arr[x_61_save] = 0;
-      (*(tint_symbol_84)).numbers.arr[x_61_save] = x_989;
+      int const x_989 = (*(tint_symbol_82)).numbers.arr[x_61_save];
+      (*(tint_symbol_82)).numbers.arr[x_61_save] = 0;
+      (*(tint_symbol_82)).numbers.arr[x_61_save] = x_989;
       int const x_990 = param;
       param = 0;
       param = x_990;
@@ -295,21 +295,21 @@
       param_1 = 0;
       param_1 = x_991;
       float3 const x_548 = float3(x_541.y, x_541.z, x_541.x);
-      int const x_992 = (*(tint_symbol_84)).numbers.arr[x_61_save];
-      (*(tint_symbol_84)).numbers.arr[x_61_save] = 0;
-      (*(tint_symbol_84)).numbers.arr[x_61_save] = x_992;
+      int const x_992 = (*(tint_symbol_82)).numbers.arr[x_61_save];
+      (*(tint_symbol_82)).numbers.arr[x_61_save] = 0;
+      (*(tint_symbol_82)).numbers.arr[x_61_save] = x_992;
     }
   }
   int const x_76 = i_1;
-  int const x_993 = (*(tint_symbol_84)).numbers.arr[x_42_save];
-  (*(tint_symbol_84)).numbers.arr[x_42_save] = 0;
-  (*(tint_symbol_84)).numbers.arr[x_42_save] = x_993;
+  int const x_993 = (*(tint_symbol_82)).numbers.arr[x_42_save];
+  (*(tint_symbol_82)).numbers.arr[x_42_save] = 0;
+  (*(tint_symbol_82)).numbers.arr[x_42_save] = x_993;
   float2 const x_549 = float2(x_534.x, x_534.y);
-  QuicksortObject const x_994 = *(tint_symbol_84);
-  tint_array_wrapper const tint_symbol_18 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_19 = {.numbers=tint_symbol_18};
-  *(tint_symbol_84) = tint_symbol_19;
-  *(tint_symbol_84) = x_994;
+  QuicksortObject const x_994 = *(tint_symbol_82);
+  tint_array_wrapper const tint_symbol_16 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_17 = {.numbers=tint_symbol_16};
+  *(tint_symbol_82) = tint_symbol_17;
+  *(tint_symbol_82) = x_994;
   int const x_995 = *(h);
   *(h) = 0;
   *(h) = x_995;
@@ -343,7 +343,7 @@
   int const x_1002 = *(h);
   *(h) = 0;
   *(h) = x_1002;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_84);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_82);
   int const x_1003 = *(l);
   *(l) = 0;
   *(l) = x_1003;
@@ -362,7 +362,7 @@
   return x_83;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_85) {
+void quicksort_(thread QuicksortObject* const tint_symbol_83) {
   int param_4 = 0;
   int h_1 = 0;
   int p = 0;
@@ -376,8 +376,8 @@
   param_5 = x_1007;
   h_1 = 9;
   tint_array_wrapper const x_1008 = stack;
-  tint_array_wrapper const tint_symbol_20 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  stack = tint_symbol_20;
+  tint_array_wrapper const tint_symbol_18 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  stack = tint_symbol_18;
   stack = x_1008;
   float2 const x_556 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).y);
   int const x_1009 = param_5;
@@ -409,16 +409,16 @@
   param_4 = 0;
   param_4 = x_1015;
   int const x_95 = l_1;
-  QuicksortObject const x_1016 = *(tint_symbol_85);
-  tint_array_wrapper const tint_symbol_21 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_22 = {.numbers=tint_symbol_21};
-  *(tint_symbol_85) = tint_symbol_22;
-  *(tint_symbol_85) = x_1016;
+  QuicksortObject const x_1016 = *(tint_symbol_83);
+  tint_array_wrapper const tint_symbol_19 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_20 = {.numbers=tint_symbol_19};
+  *(tint_symbol_83) = tint_symbol_20;
+  *(tint_symbol_83) = x_1016;
   float3 const x_560 = float3(x_559.y, x_559.x, x_557.x);
   int const x_96_save = x_94;
   tint_array_wrapper const x_1017 = stack;
-  tint_array_wrapper const tint_symbol_23 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  stack = tint_symbol_23;
+  tint_array_wrapper const tint_symbol_21 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  stack = tint_symbol_21;
   stack = x_1017;
   float3 const x_561 = float3(x_556.y, x_556.y, x_556.y);
   int const x_1018 = l_1;
@@ -468,13 +468,13 @@
     h_1 = 0;
     h_1 = x_1028;
     tint_array_wrapper const x_1029 = stack;
-    tint_array_wrapper const tint_symbol_24 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    stack = tint_symbol_24;
+    tint_array_wrapper const tint_symbol_22 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    stack = tint_symbol_22;
     stack = x_1029;
     int const x_106 = top;
     tint_array_wrapper const x_1030 = stack;
-    tint_array_wrapper const tint_symbol_25 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    stack = tint_symbol_25;
+    tint_array_wrapper const tint_symbol_23 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    stack = tint_symbol_23;
     stack = x_1030;
     float2 const x_567 = float2(x_558.x, x_564.z);
     int const x_1031 = param_4;
@@ -484,11 +484,11 @@
     } else {
       break;
     }
-    QuicksortObject const x_1032 = *(tint_symbol_85);
-    tint_array_wrapper const tint_symbol_26 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_27 = {.numbers=tint_symbol_26};
-    *(tint_symbol_85) = tint_symbol_27;
-    *(tint_symbol_85) = x_1032;
+    QuicksortObject const x_1032 = *(tint_symbol_83);
+    tint_array_wrapper const tint_symbol_24 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_25 = {.numbers=tint_symbol_24};
+    *(tint_symbol_83) = tint_symbol_25;
+    *(tint_symbol_83) = x_1032;
     float3 const x_568 = float3(x_559.y, x_559.x, x_563.y);
     int const x_1033 = param_4;
     param_4 = 0;
@@ -512,8 +512,8 @@
     stack.arr[x_96_save] = x_1037;
     int const x_111 = stack.arr[x_110_save];
     tint_array_wrapper const x_1038 = stack;
-    tint_array_wrapper const tint_symbol_28 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    stack = tint_symbol_28;
+    tint_array_wrapper const tint_symbol_26 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    stack = tint_symbol_26;
     stack = x_1038;
     float3 const x_571 = float3(x_559.y, x_559.x, x_564.y);
     int const x_1039 = l_1;
@@ -521,8 +521,8 @@
     l_1 = x_1039;
     h_1 = x_111;
     tint_array_wrapper const x_1040 = stack;
-    tint_array_wrapper const tint_symbol_29 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    stack = tint_symbol_29;
+    tint_array_wrapper const tint_symbol_27 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    stack = tint_symbol_27;
     stack = x_1040;
     float2 const x_572 = float2(x_562.y, x_561.y);
     int const x_1041 = p;
@@ -573,7 +573,7 @@
     int const x_1051 = stack.arr[x_100_save];
     stack.arr[x_100_save] = 0;
     stack.arr[x_100_save] = x_1051;
-    int const x_121 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_85);
+    int const x_121 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_83);
     float2 const x_579 = float2(x_567.x, x_568.x);
     int const x_1052 = param_5;
     param_5 = 0;
@@ -614,8 +614,8 @@
       stack.arr[x_100_save] = 0;
       stack.arr[x_100_save] = x_1061;
       tint_array_wrapper const x_1062 = stack;
-      tint_array_wrapper const tint_symbol_30 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      stack = tint_symbol_30;
+      tint_array_wrapper const tint_symbol_28 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      stack = tint_symbol_28;
       stack = x_1062;
       float2 const x_584 = float2(x_569.z, x_569.y);
       float3 const x_585 = float3(x_580.y, x_577.x, x_577.x);
@@ -654,8 +654,8 @@
       h_1 = x_1070;
       top = x_133;
       tint_array_wrapper const x_1071 = stack;
-      tint_array_wrapper const tint_symbol_31 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      stack = tint_symbol_31;
+      tint_array_wrapper const tint_symbol_29 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      stack = tint_symbol_29;
       stack = x_1071;
       int const x_134 = p;
       float2 const x_590 = float2(x_576.x, x_573.y);
@@ -679,11 +679,11 @@
     stack.arr[x_96_save] = 0;
     stack.arr[x_96_save] = x_1076;
     float2 const x_592 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).y);
-    QuicksortObject const x_1077 = *(tint_symbol_85);
-    tint_array_wrapper const tint_symbol_32 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_33 = {.numbers=tint_symbol_32};
-    *(tint_symbol_85) = tint_symbol_33;
-    *(tint_symbol_85) = x_1077;
+    QuicksortObject const x_1077 = *(tint_symbol_83);
+    tint_array_wrapper const tint_symbol_30 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_31 = {.numbers=tint_symbol_30};
+    *(tint_symbol_83) = tint_symbol_31;
+    *(tint_symbol_83) = x_1077;
     int const x_137 = p;
     int const x_1078 = stack.arr[x_114_save];
     stack.arr[x_114_save] = 0;
@@ -747,8 +747,8 @@
       float2 const x_601 = float2(x_563.x, x_563.y);
       stack.arr[x_147_save] = as_type<int>((1u + as_type<uint>(x_145)));
       tint_array_wrapper const x_1093 = stack;
-      tint_array_wrapper const tint_symbol_34 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      stack = tint_symbol_34;
+      tint_array_wrapper const tint_symbol_32 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      stack = tint_symbol_32;
       stack = x_1093;
       int const x_148 = top;
       int const x_1094 = stack.arr[x_114_save];
@@ -756,8 +756,8 @@
       stack.arr[x_114_save] = x_1094;
       float2 const x_602 = float2(x_565.y, x_599.y);
       tint_array_wrapper const x_1095 = stack;
-      tint_array_wrapper const tint_symbol_35 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      stack = tint_symbol_35;
+      tint_array_wrapper const tint_symbol_33 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      stack = tint_symbol_33;
       stack = x_1095;
       int const x_149 = as_type<int>((as_type<uint>(x_148) + as_type<uint>(as_type<int>(1u))));
       int const x_1096 = stack.arr[x_147_save];
@@ -791,11 +791,11 @@
       l_1 = 0;
       l_1 = x_1103;
       float2 const x_604 = float2(x_563.z, x_564.x);
-      QuicksortObject const x_1104 = *(tint_symbol_85);
-      tint_array_wrapper const tint_symbol_36 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      QuicksortObject const tint_symbol_37 = {.numbers=tint_symbol_36};
-      *(tint_symbol_85) = tint_symbol_37;
-      *(tint_symbol_85) = x_1104;
+      QuicksortObject const x_1104 = *(tint_symbol_83);
+      tint_array_wrapper const tint_symbol_34 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      QuicksortObject const tint_symbol_35 = {.numbers=tint_symbol_34};
+      *(tint_symbol_83) = tint_symbol_35;
+      *(tint_symbol_83) = x_1104;
     }
   }
   int const x_1105 = h_1;
@@ -804,7 +804,7 @@
   return;
 }
 
-void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_86, thread float4* const tint_symbol_87, thread float4* const tint_symbol_88) {
+void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_84, thread float4* const tint_symbol_85, thread float4* const tint_symbol_86) {
   float3 color = 0.0f;
   int i_2 = 0;
   float2 uv = 0.0f;
@@ -812,17 +812,17 @@
   uv = float2(0.0f, 0.0f);
   uv = x_717;
   i_2 = 0;
-  QuicksortObject const x_721 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_38 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_39 = {.numbers=tint_symbol_38};
-  *(tint_symbol_86) = tint_symbol_39;
-  *(tint_symbol_86) = x_721;
+  QuicksortObject const x_721 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_36 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_37 = {.numbers=tint_symbol_36};
+  *(tint_symbol_84) = tint_symbol_37;
+  *(tint_symbol_84) = x_721;
   if (true) {
-    QuicksortObject const x_722 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_40 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_41 = {.numbers=tint_symbol_40};
-    *(tint_symbol_86) = tint_symbol_41;
-    *(tint_symbol_86) = x_722;
+    QuicksortObject const x_722 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_38 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_39 = {.numbers=tint_symbol_38};
+    *(tint_symbol_84) = tint_symbol_39;
+    *(tint_symbol_84) = x_722;
     float2 const x_431 = float2(float3(1.0f, 2.0f, 3.0f).x, float3(1.0f, 2.0f, 3.0f).x);
     int const x_158 = i_2;
     float2 const x_723 = uv;
@@ -832,28 +832,28 @@
     color = float3(0.0f, 0.0f, 0.0f);
     color = x_725;
     float2 const x_432 = float2(x_431.y, x_431.y);
-    QuicksortObject const x_726 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_42 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42};
-    *(tint_symbol_86) = tint_symbol_43;
-    *(tint_symbol_86) = x_726;
+    QuicksortObject const x_726 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_40 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_41 = {.numbers=tint_symbol_40};
+    *(tint_symbol_84) = tint_symbol_41;
+    *(tint_symbol_84) = x_726;
   }
-  QuicksortObject const x_756 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_44 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_45 = {.numbers=tint_symbol_44};
-  *(tint_symbol_86) = tint_symbol_45;
-  *(tint_symbol_86) = x_756;
+  QuicksortObject const x_756 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_42 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42};
+  *(tint_symbol_84) = tint_symbol_43;
+  *(tint_symbol_84) = x_756;
   float2 const x_446 = float2(float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).x);
   int const x_757 = i_2;
   i_2 = 0;
   i_2 = x_757;
-  quicksort_(tint_symbol_86);
-  QuicksortObject const x_758 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_46 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_47 = {.numbers=tint_symbol_46};
-  *(tint_symbol_86) = tint_symbol_47;
-  *(tint_symbol_86) = x_758;
-  float4 const x_184 = *(tint_symbol_87);
+  quicksort_(tint_symbol_84);
+  QuicksortObject const x_758 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_44 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_45 = {.numbers=tint_symbol_44};
+  *(tint_symbol_84) = tint_symbol_45;
+  *(tint_symbol_84) = x_758;
+  float4 const x_184 = *(tint_symbol_85);
   float2 const x_759 = uv;
   uv = float2(0.0f, 0.0f);
   uv = x_759;
@@ -863,30 +863,30 @@
   uv = x_760;
   float2 const x_185 = float2(x_184.x, x_184.y);
   float3 const x_448 = float3(x_185.y, x_446.y, x_446.y);
-  QuicksortObject const x_761 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_48 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48};
-  *(tint_symbol_86) = tint_symbol_49;
-  *(tint_symbol_86) = x_761;
+  QuicksortObject const x_761 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_46 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_47 = {.numbers=tint_symbol_46};
+  *(tint_symbol_84) = tint_symbol_47;
+  *(tint_symbol_84) = x_761;
   float2 const x_762 = uv;
   uv = float2(0.0f, 0.0f);
   uv = x_762;
   float2 const x_191 = x_188.resolution;
-  QuicksortObject const x_763 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_50 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_51 = {.numbers=tint_symbol_50};
-  *(tint_symbol_86) = tint_symbol_51;
-  *(tint_symbol_86) = x_763;
+  QuicksortObject const x_763 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_48 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48};
+  *(tint_symbol_84) = tint_symbol_49;
+  *(tint_symbol_84) = x_763;
   float3 const x_449 = float3(x_184.y, float3(1.0f, 2.0f, 3.0f).z, x_184.w);
   float3 const x_764 = color;
   color = float3(0.0f, 0.0f, 0.0f);
   color = x_764;
   float2 const x_192 = (x_185 / x_191);
-  QuicksortObject const x_765 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_52 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_53 = {.numbers=tint_symbol_52};
-  *(tint_symbol_86) = tint_symbol_53;
-  *(tint_symbol_86) = x_765;
+  QuicksortObject const x_765 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_50 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_51 = {.numbers=tint_symbol_50};
+  *(tint_symbol_84) = tint_symbol_51;
+  *(tint_symbol_84) = x_765;
   float2 const x_450 = float2(x_447.x, x_185.y);
   float3 const x_766 = color;
   color = float3(0.0f, 0.0f, 0.0f);
@@ -900,23 +900,23 @@
   color = float3(0.0f, 0.0f, 0.0f);
   color = x_768;
   float3 const x_451 = float3(x_185.x, x_185.y, x_446.y);
-  QuicksortObject const x_769 = *(tint_symbol_86);
+  QuicksortObject const x_769 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_52 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_53 = {.numbers=tint_symbol_52};
+  *(tint_symbol_84) = tint_symbol_53;
+  *(tint_symbol_84) = x_769;
+  int const x_770 = (*(tint_symbol_84)).numbers.arr[0u];
+  (*(tint_symbol_84)).numbers.arr[0u] = 0;
+  (*(tint_symbol_84)).numbers.arr[0u] = x_770;
+  int const x_201 = (*(tint_symbol_84)).numbers.arr[0u];
+  QuicksortObject const x_771 = *(tint_symbol_84);
   tint_array_wrapper const tint_symbol_54 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
   QuicksortObject const tint_symbol_55 = {.numbers=tint_symbol_54};
-  *(tint_symbol_86) = tint_symbol_55;
-  *(tint_symbol_86) = x_769;
-  int const x_770 = (*(tint_symbol_86)).numbers.arr[0u];
-  (*(tint_symbol_86)).numbers.arr[0u] = 0;
-  (*(tint_symbol_86)).numbers.arr[0u] = x_770;
-  int const x_201 = (*(tint_symbol_86)).numbers.arr[0u];
-  QuicksortObject const x_771 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_56 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_57 = {.numbers=tint_symbol_56};
-  *(tint_symbol_86) = tint_symbol_57;
-  *(tint_symbol_86) = x_771;
-  int const x_772 = (*(tint_symbol_86)).numbers.arr[0u];
-  (*(tint_symbol_86)).numbers.arr[0u] = 0;
-  (*(tint_symbol_86)).numbers.arr[0u] = x_772;
+  *(tint_symbol_84) = tint_symbol_55;
+  *(tint_symbol_84) = x_771;
+  int const x_772 = (*(tint_symbol_84)).numbers.arr[0u];
+  (*(tint_symbol_84)).numbers.arr[0u] = 0;
+  (*(tint_symbol_84)).numbers.arr[0u] = x_772;
   float const x_206 = color.x;
   float const x_773 = color.x;
   color.x = 0.0f;
@@ -925,11 +925,11 @@
   int const x_774 = i_2;
   i_2 = 0;
   i_2 = x_774;
-  QuicksortObject const x_775 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_58 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_59 = {.numbers=tint_symbol_58};
-  *(tint_symbol_86) = tint_symbol_59;
-  *(tint_symbol_86) = x_775;
+  QuicksortObject const x_775 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_56 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_57 = {.numbers=tint_symbol_56};
+  *(tint_symbol_84) = tint_symbol_57;
+  *(tint_symbol_84) = x_775;
   float3 const x_453 = float3(x_451.x, x_450.x, x_450.y);
   color.x = (x_206 + float(x_201));
   float2 const x_776 = uv;
@@ -944,37 +944,37 @@
   float const x_778 = uv.x;
   uv.x = 0.0f;
   uv.x = x_778;
-  QuicksortObject const x_779 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_60 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_61 = {.numbers=tint_symbol_60};
-  *(tint_symbol_86) = tint_symbol_61;
-  *(tint_symbol_86) = x_779;
+  QuicksortObject const x_779 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_58 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_59 = {.numbers=tint_symbol_58};
+  *(tint_symbol_84) = tint_symbol_59;
+  *(tint_symbol_84) = x_779;
   if ((x_210 > 0.25f)) {
     int const x_780 = i_2;
     i_2 = 0;
     i_2 = x_780;
-    int const x_781 = (*(tint_symbol_86)).numbers.arr[0u];
-    (*(tint_symbol_86)).numbers.arr[0u] = 0;
-    (*(tint_symbol_86)).numbers.arr[0u] = x_781;
+    int const x_781 = (*(tint_symbol_84)).numbers.arr[0u];
+    (*(tint_symbol_84)).numbers.arr[0u] = 0;
+    (*(tint_symbol_84)).numbers.arr[0u] = x_781;
     float3 const x_456 = float3(float2(0.0f, 0.0f).y, x_448.y, x_448.y);
     float const x_782 = uv.x;
     uv.x = 0.0f;
     uv.x = x_782;
-    int const x_216 = (*(tint_symbol_86)).numbers.arr[1];
-    QuicksortObject const x_783 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_62 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62};
-    *(tint_symbol_86) = tint_symbol_63;
-    *(tint_symbol_86) = x_783;
+    int const x_216 = (*(tint_symbol_84)).numbers.arr[1];
+    QuicksortObject const x_783 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_60 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_61 = {.numbers=tint_symbol_60};
+    *(tint_symbol_84) = tint_symbol_61;
+    *(tint_symbol_84) = x_783;
     float2 const x_457 = float2(x_454.x, x_454.x);
     float2 const x_784 = uv;
     uv = float2(0.0f, 0.0f);
     uv = x_784;
-    QuicksortObject const x_785 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_64 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_65 = {.numbers=tint_symbol_64};
-    *(tint_symbol_86) = tint_symbol_65;
-    *(tint_symbol_86) = x_785;
+    QuicksortObject const x_785 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_62 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62};
+    *(tint_symbol_84) = tint_symbol_63;
+    *(tint_symbol_84) = x_785;
     float2 const x_458 = float2(float3(1.0f, 2.0f, 3.0f).z, float2(0.0f, 0.0f).y);
     int const x_786 = i_2;
     i_2 = 0;
@@ -994,9 +994,9 @@
     color[0] = 0.0f;
     color[0] = x_790;
     color.x = (float(x_216) + x_219);
-    int const x_791 = (*(tint_symbol_86)).numbers.arr[0u];
-    (*(tint_symbol_86)).numbers.arr[0u] = 0;
-    (*(tint_symbol_86)).numbers.arr[0u] = x_791;
+    int const x_791 = (*(tint_symbol_84)).numbers.arr[0u];
+    (*(tint_symbol_84)).numbers.arr[0u] = 0;
+    (*(tint_symbol_84)).numbers.arr[0u] = x_791;
   }
   float const x_792 = uv.x;
   uv.x = 0.0f;
@@ -1034,24 +1034,24 @@
     float const x_801 = color.x;
     color.x = 0.0f;
     color.x = x_801;
-    int const x_230 = (*(tint_symbol_86)).numbers.arr[2u];
+    int const x_230 = (*(tint_symbol_84)).numbers.arr[2u];
     float const x_802 = uv.x;
     uv.x = 0.0f;
     uv.x = x_802;
     float const x_803 = color.x;
     color.x = 0.0f;
     color.x = x_803;
-    int const x_804 = (*(tint_symbol_86)).numbers.arr[2u];
-    (*(tint_symbol_86)).numbers.arr[2u] = 0;
-    (*(tint_symbol_86)).numbers.arr[2u] = x_804;
+    int const x_804 = (*(tint_symbol_84)).numbers.arr[2u];
+    (*(tint_symbol_84)).numbers.arr[2u] = 0;
+    (*(tint_symbol_84)).numbers.arr[2u] = x_804;
     float2 const x_464 = float2(x_450.y, x_191.x);
     float const x_805 = color.y;
     color.y = 0.0f;
     color.y = x_805;
     float const x_234 = color.y;
-    int const x_806 = (*(tint_symbol_86)).numbers.arr[2u];
-    (*(tint_symbol_86)).numbers.arr[2u] = 0;
-    (*(tint_symbol_86)).numbers.arr[2u] = x_806;
+    int const x_806 = (*(tint_symbol_84)).numbers.arr[2u];
+    (*(tint_symbol_84)).numbers.arr[2u] = 0;
+    (*(tint_symbol_84)).numbers.arr[2u] = x_806;
     float2 const x_465 = float2(x_463.x, x_185.x);
     float const x_807 = color.x;
     color.x = 0.0f;
@@ -1086,15 +1086,15 @@
     float const x_815 = color.x;
     color.x = 0.0f;
     color.x = x_815;
-    int const x_245 = (*(tint_symbol_86)).numbers.arr[3];
+    int const x_245 = (*(tint_symbol_84)).numbers.arr[3];
     float const x_816 = color.x;
     color.x = 0.0f;
     color.x = x_816;
-    QuicksortObject const x_817 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_66 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_67 = {.numbers=tint_symbol_66};
-    *(tint_symbol_86) = tint_symbol_67;
-    *(tint_symbol_86) = x_817;
+    QuicksortObject const x_817 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_64 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_65 = {.numbers=tint_symbol_64};
+    *(tint_symbol_84) = tint_symbol_65;
+    *(tint_symbol_84) = x_817;
     float3 const x_468 = float3(x_467.x, x_467.x, x_467.x);
     float const x_818 = uv[0];
     uv[0] = 0.0f;
@@ -1110,9 +1110,9 @@
     float const x_821 = color.z;
     color.z = 0.0f;
     color.z = x_821;
-    int const x_822 = (*(tint_symbol_86)).numbers.arr[0u];
-    (*(tint_symbol_86)).numbers.arr[0u] = 0;
-    (*(tint_symbol_86)).numbers.arr[0u] = x_822;
+    int const x_822 = (*(tint_symbol_84)).numbers.arr[0u];
+    (*(tint_symbol_84)).numbers.arr[0u] = 0;
+    (*(tint_symbol_84)).numbers.arr[0u] = x_822;
     float2 const x_470 = float2(float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y);
     float const x_823 = color.z;
     color.z = 0.0f;
@@ -1127,7 +1127,7 @@
   uv[0] = 0.0f;
   uv[0] = x_825;
   float3 const x_472 = float3(x_454.x, x_454.y, x_454.y);
-  int const x_254 = (*(tint_symbol_86)).numbers.arr[4];
+  int const x_254 = (*(tint_symbol_84)).numbers.arr[4];
   float const x_826 = uv[0];
   uv[0] = 0.0f;
   uv[0] = x_826;
@@ -1135,9 +1135,9 @@
   color = float3(0.0f, 0.0f, 0.0f);
   color = x_827;
   float3 const x_473 = float3(x_446.y, x_453.x, x_453.x);
-  int const x_828 = (*(tint_symbol_86)).numbers.arr[4];
-  (*(tint_symbol_86)).numbers.arr[4] = 0;
-  (*(tint_symbol_86)).numbers.arr[4] = x_828;
+  int const x_828 = (*(tint_symbol_84)).numbers.arr[4];
+  (*(tint_symbol_84)).numbers.arr[4] = 0;
+  (*(tint_symbol_84)).numbers.arr[4] = x_828;
   float2 const x_474 = float2(x_191.x, x_184.z);
   float const x_829 = uv.x;
   uv.x = 0.0f;
@@ -1171,9 +1171,9 @@
   i_2 = 0;
   i_2 = x_836;
   float3 const x_479 = float3(float2(0.0f, 0.0f).y, x_454.y, float2(0.0f, 0.0f).x);
-  int const x_837 = (*(tint_symbol_86)).numbers.arr[0u];
-  (*(tint_symbol_86)).numbers.arr[0u] = 0;
-  (*(tint_symbol_86)).numbers.arr[0u] = x_837;
+  int const x_837 = (*(tint_symbol_84)).numbers.arr[0u];
+  (*(tint_symbol_84)).numbers.arr[0u] = 0;
+  (*(tint_symbol_84)).numbers.arr[0u] = x_837;
   float const x_838 = color.y;
   color.y = 0.0f;
   color.y = x_838;
@@ -1186,7 +1186,7 @@
     float3 const x_840 = color;
     color = float3(0.0f, 0.0f, 0.0f);
     color = x_840;
-    int const x_267 = (*(tint_symbol_86)).numbers.arr[5u];
+    int const x_267 = (*(tint_symbol_84)).numbers.arr[5u];
     float const x_841 = color.x;
     color.x = 0.0f;
     color.x = x_841;
@@ -1201,11 +1201,11 @@
     uv[0] = 0.0f;
     uv[0] = x_844;
     float3 const x_482 = float3(x_455.x, x_475.y, x_455.y);
-    QuicksortObject const x_845 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_68 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_69 = {.numbers=tint_symbol_68};
-    *(tint_symbol_86) = tint_symbol_69;
-    *(tint_symbol_86) = x_845;
+    QuicksortObject const x_845 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_66 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_67 = {.numbers=tint_symbol_66};
+    *(tint_symbol_84) = tint_symbol_67;
+    *(tint_symbol_84) = x_845;
     float const x_846 = uv.y;
     uv.y = 0.0f;
     uv.y = x_846;
@@ -1229,13 +1229,13 @@
   float const x_851 = uv.y;
   uv.y = 0.0f;
   uv.y = x_851;
-  int const x_852 = (*(tint_symbol_86)).numbers.arr[4];
-  (*(tint_symbol_86)).numbers.arr[4] = 0;
-  (*(tint_symbol_86)).numbers.arr[4] = x_852;
+  int const x_852 = (*(tint_symbol_84)).numbers.arr[4];
+  (*(tint_symbol_84)).numbers.arr[4] = 0;
+  (*(tint_symbol_84)).numbers.arr[4] = x_852;
   float const x_274 = uv.y;
-  int const x_853 = (*(tint_symbol_86)).numbers.arr[0u];
-  (*(tint_symbol_86)).numbers.arr[0u] = 0;
-  (*(tint_symbol_86)).numbers.arr[0u] = x_853;
+  int const x_853 = (*(tint_symbol_84)).numbers.arr[0u];
+  (*(tint_symbol_84)).numbers.arr[0u] = 0;
+  (*(tint_symbol_84)).numbers.arr[0u] = x_853;
   if ((x_274 > 0.5f)) {
     float const x_854 = uv.x;
     uv.x = 0.0f;
@@ -1248,16 +1248,16 @@
     float const x_856 = uv.y;
     uv.y = 0.0f;
     uv.y = x_856;
-    int const x_280 = (*(tint_symbol_86)).numbers.arr[6u];
+    int const x_280 = (*(tint_symbol_84)).numbers.arr[6u];
     float const x_857 = uv.y;
     uv.y = 0.0f;
     uv.y = x_857;
     int const x_858 = i_2;
     i_2 = 0;
     i_2 = x_858;
-    int const x_859 = (*(tint_symbol_86)).numbers.arr[4];
-    (*(tint_symbol_86)).numbers.arr[4] = 0;
-    (*(tint_symbol_86)).numbers.arr[4] = x_859;
+    int const x_859 = (*(tint_symbol_84)).numbers.arr[4];
+    (*(tint_symbol_84)).numbers.arr[4] = 0;
+    (*(tint_symbol_84)).numbers.arr[4] = x_859;
     float2 const x_488 = float2(x_473.z, x_473.y);
     float const x_283 = color.y;
     float2 const x_860 = uv;
@@ -1267,18 +1267,18 @@
     color.x = 0.0f;
     color.x = x_861;
     float2 const x_489 = float2(x_475.y, x_475.x);
-    int const x_862 = (*(tint_symbol_86)).numbers.arr[6u];
-    (*(tint_symbol_86)).numbers.arr[6u] = 0;
-    (*(tint_symbol_86)).numbers.arr[6u] = x_862;
-    int const x_863 = (*(tint_symbol_86)).numbers.arr[6u];
-    (*(tint_symbol_86)).numbers.arr[6u] = 0;
-    (*(tint_symbol_86)).numbers.arr[6u] = x_863;
+    int const x_862 = (*(tint_symbol_84)).numbers.arr[6u];
+    (*(tint_symbol_84)).numbers.arr[6u] = 0;
+    (*(tint_symbol_84)).numbers.arr[6u] = x_862;
+    int const x_863 = (*(tint_symbol_84)).numbers.arr[6u];
+    (*(tint_symbol_84)).numbers.arr[6u] = 0;
+    (*(tint_symbol_84)).numbers.arr[6u] = x_863;
     float2 const x_490 = float2(x_480.z, x_480.z);
-    QuicksortObject const x_864 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_70 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_71 = {.numbers=tint_symbol_70};
-    *(tint_symbol_86) = tint_symbol_71;
-    *(tint_symbol_86) = x_864;
+    QuicksortObject const x_864 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_68 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_69 = {.numbers=tint_symbol_68};
+    *(tint_symbol_84) = tint_symbol_69;
+    *(tint_symbol_84) = x_864;
     color.y = (float(x_280) + x_283);
     float const x_865 = color.x;
     color.x = 0.0f;
@@ -1293,11 +1293,11 @@
   color.x = 0.0f;
   color.x = x_867;
   float const x_287 = uv.y;
-  QuicksortObject const x_868 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_72 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_73 = {.numbers=tint_symbol_72};
-  *(tint_symbol_86) = tint_symbol_73;
-  *(tint_symbol_86) = x_868;
+  QuicksortObject const x_868 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_70 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_71 = {.numbers=tint_symbol_70};
+  *(tint_symbol_84) = tint_symbol_71;
+  *(tint_symbol_84) = x_868;
   float2 const x_493 = float2(x_475.x, x_475.y);
   float const x_869 = uv[0];
   uv[0] = 0.0f;
@@ -1306,9 +1306,9 @@
   color.y = 0.0f;
   color.y = x_870;
   float3 const x_494 = float3(x_191.x, x_191.y, x_191.y);
-  int const x_871 = (*(tint_symbol_86)).numbers.arr[4];
-  (*(tint_symbol_86)).numbers.arr[4] = 0;
-  (*(tint_symbol_86)).numbers.arr[4] = x_871;
+  int const x_871 = (*(tint_symbol_84)).numbers.arr[4];
+  (*(tint_symbol_84)).numbers.arr[4] = 0;
+  (*(tint_symbol_84)).numbers.arr[4] = x_871;
   if ((x_287 > 0.75f)) {
     float3 const x_872 = color;
     color = float3(0.0f, 0.0f, 0.0f);
@@ -1320,7 +1320,7 @@
     float3 const x_874 = color;
     color = float3(0.0f, 0.0f, 0.0f);
     color = x_874;
-    int const x_293 = (*(tint_symbol_86)).numbers.arr[7];
+    int const x_293 = (*(tint_symbol_84)).numbers.arr[7];
     float const x_875 = uv.x;
     uv.x = 0.0f;
     uv.x = x_875;
@@ -1329,9 +1329,9 @@
     color.y = 0.0f;
     color.y = x_876;
     float2 const x_497 = float2(x_477.x, x_461.y);
-    int const x_877 = (*(tint_symbol_86)).numbers.arr[0u];
-    (*(tint_symbol_86)).numbers.arr[0u] = 0;
-    (*(tint_symbol_86)).numbers.arr[0u] = x_877;
+    int const x_877 = (*(tint_symbol_84)).numbers.arr[0u];
+    (*(tint_symbol_84)).numbers.arr[0u] = 0;
+    (*(tint_symbol_84)).numbers.arr[0u] = x_877;
     float const x_878 = color.y;
     color.y = 0.0f;
     color.y = x_878;
@@ -1373,14 +1373,14 @@
   float2 const x_888 = uv;
   uv = float2(0.0f, 0.0f);
   uv = x_888;
-  int const x_301 = (*(tint_symbol_86)).numbers.arr[8];
+  int const x_301 = (*(tint_symbol_84)).numbers.arr[8];
   int const x_889 = i_2;
   i_2 = 0;
   i_2 = x_889;
   float2 const x_503 = float2(x_185.x, x_451.z);
-  int const x_890 = (*(tint_symbol_86)).numbers.arr[8];
-  (*(tint_symbol_86)).numbers.arr[8] = 0;
-  (*(tint_symbol_86)).numbers.arr[8] = x_890;
+  int const x_890 = (*(tint_symbol_84)).numbers.arr[8];
+  (*(tint_symbol_84)).numbers.arr[8] = 0;
+  (*(tint_symbol_84)).numbers.arr[8] = x_890;
   float const x_891 = color.y;
   color.y = 0.0f;
   color.y = x_891;
@@ -1397,9 +1397,9 @@
   color.x = 0.0f;
   color.x = x_894;
   float2 const x_506 = float2(x_493.x, x_492.x);
-  int const x_895 = (*(tint_symbol_86)).numbers.arr[4];
-  (*(tint_symbol_86)).numbers.arr[4] = 0;
-  (*(tint_symbol_86)).numbers.arr[4] = x_895;
+  int const x_895 = (*(tint_symbol_84)).numbers.arr[4];
+  (*(tint_symbol_84)).numbers.arr[4] = 0;
+  (*(tint_symbol_84)).numbers.arr[4] = x_895;
   float const x_896 = uv.y;
   uv.y = 0.0f;
   uv.y = x_896;
@@ -1448,23 +1448,23 @@
   uv.y = 0.0f;
   uv.y = x_908;
   float3 const x_512 = float3(x_455.y, x_455.y, x_455.y);
-  int const x_909 = (*(tint_symbol_86)).numbers.arr[4];
-  (*(tint_symbol_86)).numbers.arr[4] = 0;
-  (*(tint_symbol_86)).numbers.arr[4] = x_909;
+  int const x_909 = (*(tint_symbol_84)).numbers.arr[4];
+  (*(tint_symbol_84)).numbers.arr[4] = 0;
+  (*(tint_symbol_84)).numbers.arr[4] = x_909;
   if ((fabs((x_308 - x_310)) < 0.25f)) {
     float const x_910 = uv.x;
     uv.x = 0.0f;
     uv.x = x_910;
-    QuicksortObject const x_911 = *(tint_symbol_86);
-    tint_array_wrapper const tint_symbol_74 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    QuicksortObject const tint_symbol_75 = {.numbers=tint_symbol_74};
-    *(tint_symbol_86) = tint_symbol_75;
-    *(tint_symbol_86) = x_911;
+    QuicksortObject const x_911 = *(tint_symbol_84);
+    tint_array_wrapper const tint_symbol_72 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    QuicksortObject const tint_symbol_73 = {.numbers=tint_symbol_72};
+    *(tint_symbol_84) = tint_symbol_73;
+    *(tint_symbol_84) = x_911;
     float3 const x_513 = float3(x_505.z, x_505.x, x_448.x);
-    int const x_912 = (*(tint_symbol_86)).numbers.arr[8];
-    (*(tint_symbol_86)).numbers.arr[8] = 0;
-    (*(tint_symbol_86)).numbers.arr[8] = x_912;
-    int const x_317 = (*(tint_symbol_86)).numbers.arr[9u];
+    int const x_912 = (*(tint_symbol_84)).numbers.arr[8];
+    (*(tint_symbol_84)).numbers.arr[8] = 0;
+    (*(tint_symbol_84)).numbers.arr[8] = x_912;
+    int const x_317 = (*(tint_symbol_84)).numbers.arr[9u];
     float3 const x_514 = float3(x_474.y, x_474.y, x_474.y);
     float const x_913 = uv.y;
     uv.y = 0.0f;
@@ -1509,16 +1509,16 @@
   float const x_923 = uv.x;
   uv.x = 0.0f;
   uv.x = x_923;
-  QuicksortObject const x_924 = *(tint_symbol_86);
+  QuicksortObject const x_924 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_74 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_75 = {.numbers=tint_symbol_74};
+  *(tint_symbol_84) = tint_symbol_75;
+  *(tint_symbol_84) = x_924;
+  QuicksortObject const x_925 = *(tint_symbol_84);
   tint_array_wrapper const tint_symbol_76 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
   QuicksortObject const tint_symbol_77 = {.numbers=tint_symbol_76};
-  *(tint_symbol_86) = tint_symbol_77;
-  *(tint_symbol_86) = x_924;
-  QuicksortObject const x_925 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_78 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78};
-  *(tint_symbol_86) = tint_symbol_79;
-  *(tint_symbol_86) = x_925;
+  *(tint_symbol_84) = tint_symbol_77;
+  *(tint_symbol_84) = x_925;
   float const x_926 = color.y;
   color.y = 0.0f;
   color.y = x_926;
@@ -1534,12 +1534,12 @@
   float const x_929 = uv.x;
   uv.x = 0.0f;
   uv.x = x_929;
-  *(tint_symbol_88) = x_330;
-  QuicksortObject const x_930 = *(tint_symbol_86);
-  tint_array_wrapper const tint_symbol_80 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-  QuicksortObject const tint_symbol_81 = {.numbers=tint_symbol_80};
-  *(tint_symbol_86) = tint_symbol_81;
-  *(tint_symbol_86) = x_930;
+  *(tint_symbol_86) = x_330;
+  QuicksortObject const x_930 = *(tint_symbol_84);
+  tint_array_wrapper const tint_symbol_78 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+  QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78};
+  *(tint_symbol_84) = tint_symbol_79;
+  *(tint_symbol_84) = x_930;
   float3 const x_522 = float3(x_330.w, x_330.y, x_493.x);
   float const x_931 = color.x;
   color.x = 0.0f;
@@ -1547,14 +1547,20 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_188 [[buffer(0)]]) {
-  thread float4 tint_symbol_89 = 0.0f;
-  thread QuicksortObject tint_symbol_90 = {};
-  thread float4 tint_symbol_91 = 0.0f;
-  tint_symbol_89 = gl_FragCoord_param;
-  main_1(x_188, &(tint_symbol_90), &(tint_symbol_89), &(tint_symbol_91));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_91};
-  tint_symbol_2 const tint_symbol_82 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_82;
+main_out tint_symbol_inner(constant buf0& x_188, float4 gl_FragCoord_param, thread float4* const tint_symbol_87, thread QuicksortObject* const tint_symbol_88, thread float4* const tint_symbol_89) {
+  *(tint_symbol_87) = gl_FragCoord_param;
+  main_1(x_188, tint_symbol_88, tint_symbol_87, tint_symbol_89);
+  main_out const tint_symbol_80 = {.x_GLF_color_1=*(tint_symbol_89)};
+  return tint_symbol_80;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_188 [[buffer(0)]]) {
+  thread float4 tint_symbol_90 = 0.0f;
+  thread QuicksortObject tint_symbol_91 = {};
+  thread float4 tint_symbol_92 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_188, gl_FragCoord_param, &(tint_symbol_90), &(tint_symbol_91), &(tint_symbol_92));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/757.wgsl.expected.hlsl b/test/bug/tint/757.wgsl.expected.hlsl
index 7c75246..8be66c6 100644
--- a/test/bug/tint/757.wgsl.expected.hlsl
+++ b/test/bug/tint/757.wgsl.expected.hlsl
@@ -9,9 +9,7 @@
   uint3 GlobalInvocationID : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 GlobalInvocationID = tint_symbol.GlobalInvocationID;
+void main_inner(uint3 GlobalInvocationID) {
   uint flatIndex = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x);
   flatIndex = (flatIndex * 1u);
   float4 texel = myTexture.Load(int4(int3(int2(GlobalInvocationID.xy), 0), 0));
@@ -20,5 +18,10 @@
       result.Store((4u * (flatIndex + i)), asuint(texel.r));
     }
   }
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.GlobalInvocationID);
   return;
 }
diff --git a/test/bug/tint/757.wgsl.expected.msl b/test/bug/tint/757.wgsl.expected.msl
index 8699607..fe24d96 100644
--- a/test/bug/tint/757.wgsl.expected.msl
+++ b/test/bug/tint/757.wgsl.expected.msl
@@ -8,13 +8,17 @@
   /* 0x0000 */ float values[1];
 };
 
-kernel void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(3)]]) {
+void tint_symbol_inner(device Result& result, uint3 GlobalInvocationID, texture2d_array<float, access::sample> tint_symbol_1) {
   uint flatIndex = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x);
   flatIndex = (flatIndex * 1u);
-  float4 texel = tint_symbol_2.read(uint2(int2(GlobalInvocationID.xy)), 0, 0);
+  float4 texel = tint_symbol_1.read(uint2(int2(GlobalInvocationID.xy)), 0, 0);
   for(uint i = 0u; (i < 1u); i = (i + 1u)) {
     result.values[(flatIndex + i)] = texel.r;
   }
+}
+
+kernel void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(3)]]) {
+  tint_symbol_inner(result, GlobalInvocationID, tint_symbol_2);
   return;
 }
 
diff --git a/test/bug/tint/824.wgsl.expected.hlsl b/test/bug/tint/824.wgsl.expected.hlsl
index a1d0cab..58c4707 100644
--- a/test/bug/tint/824.wgsl.expected.hlsl
+++ b/test/bug/tint/824.wgsl.expected.hlsl
@@ -11,15 +11,20 @@
   float4 Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint VertexIndex = tint_symbol.VertexIndex;
-  const uint InstanceIndex = tint_symbol.InstanceIndex;
+Output main_inner(uint VertexIndex, uint InstanceIndex) {
   float2 zv[4] = {float2(0.200000003f, 0.200000003f), float2(0.300000012f, 0.300000012f), float2(-0.100000001f, -0.100000001f), float2(1.100000024f, 1.100000024f)};
   const float z = zv[InstanceIndex].x;
   Output output = (Output)0;
   output.Position = float4(0.5f, 0.5f, z, 1.0f);
   float4 colors[4] = {float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
   output.color = colors[InstanceIndex];
-  const tint_symbol_2 tint_symbol_3 = {output.color, output.Position};
-  return tint_symbol_3;
+  return output;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const Output inner_result = main_inner(tint_symbol.VertexIndex, tint_symbol.InstanceIndex);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.Position = inner_result.Position;
+  wrapper_result.color = inner_result.color;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/824.wgsl.expected.msl b/test/bug/tint/824.wgsl.expected.msl
index 8094607..3aa26e2 100644
--- a/test/bug/tint/824.wgsl.expected.msl
+++ b/test/bug/tint/824.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 Position;
   float4 color;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 color [[user(locn0)]];
   float4 Position [[position]];
 };
@@ -16,14 +16,21 @@
   float4 arr[4];
 };
 
-vertex tint_symbol_2 tint_symbol(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) {
+Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) {
   tint_array_wrapper zv = {.arr={float2(0.200000003f, 0.200000003f), float2(0.300000012f, 0.300000012f), float2(-0.100000001f, -0.100000001f), float2(1.100000024f, 1.100000024f)}};
   float const z = zv.arr[InstanceIndex].x;
   Output output = {};
   output.Position = float4(0.5f, 0.5f, z, 1.0f);
   tint_array_wrapper_1 colors = {.arr={float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
   output.color = colors.arr[InstanceIndex];
-  tint_symbol_2 const tint_symbol_3 = {.color=output.color, .Position=output.Position};
-  return tint_symbol_3;
+  return output;
+}
+
+vertex tint_symbol_1 tint_symbol(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) {
+  Output const inner_result = tint_symbol_inner(VertexIndex, InstanceIndex);
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.Position = inner_result.Position;
+  wrapper_result.color = inner_result.color;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/827.wgsl.expected.hlsl b/test/bug/tint/827.wgsl.expected.hlsl
index 81a67c2..3ad5148 100644
--- a/test/bug/tint/827.wgsl.expected.hlsl
+++ b/test/bug/tint/827.wgsl.expected.hlsl
@@ -6,9 +6,12 @@
   uint3 GlobalInvocationId : SV_DispatchThreadID;
 };
 
+void main_inner(uint3 GlobalInvocationId) {
+  result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0)).x));
+}
+
 [numthreads(1, 1, 1)]
 void main(tint_symbol_1 tint_symbol) {
-  const uint3 GlobalInvocationId = tint_symbol.GlobalInvocationId;
-  result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0)).x));
+  main_inner(tint_symbol.GlobalInvocationId);
   return;
 }
diff --git a/test/bug/tint/827.wgsl.expected.msl b/test/bug/tint/827.wgsl.expected.msl
index 3570acd..c6d933a 100644
--- a/test/bug/tint/827.wgsl.expected.msl
+++ b/test/bug/tint/827.wgsl.expected.msl
@@ -6,8 +6,12 @@
 };
 
 constant uint width = 128u;
+void tint_symbol_inner(device Result& result, uint3 GlobalInvocationId, depth2d<float, access::sample> tint_symbol_1) {
+  result.values[((GlobalInvocationId.y * width) + GlobalInvocationId.x)] = tint_symbol_1.read(uint2(int2(int(GlobalInvocationId.x), int(GlobalInvocationId.y))), 0);
+}
+
 kernel void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]], device Result& result [[buffer(1)]]) {
-  result.values[((GlobalInvocationId.y * width) + GlobalInvocationId.x)] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId.x), int(GlobalInvocationId.y))), 0);
+  tint_symbol_inner(result, GlobalInvocationId, tint_symbol_2);
   return;
 }
 
diff --git a/test/bug/tint/913.wgsl.expected.hlsl b/test/bug/tint/913.wgsl.expected.hlsl
index 3a14396..5b4116c 100644
--- a/test/bug/tint/913.wgsl.expected.hlsl
+++ b/test/bug/tint/913.wgsl.expected.hlsl
@@ -13,9 +13,7 @@
   uint3 GlobalInvocationID : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_2 tint_symbol_1) {
-  const uint3 GlobalInvocationID = tint_symbol_1.GlobalInvocationID;
+void main_inner(uint3 GlobalInvocationID) {
   int2 tint_tmp;
   src.GetDimensions(tint_tmp.x, tint_tmp.y);
   const int2 srcSize = tint_tmp;
@@ -86,5 +84,10 @@
   } else {
     output.Store((4u * outputIndex), asuint(0u));
   }
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_2 tint_symbol_1) {
+  main_inner(tint_symbol_1.GlobalInvocationID);
   return;
 }
diff --git a/test/bug/tint/913.wgsl.expected.msl b/test/bug/tint/913.wgsl.expected.msl
index 87536c3..17237e0 100644
--- a/test/bug/tint/913.wgsl.expected.msl
+++ b/test/bug/tint/913.wgsl.expected.msl
@@ -16,21 +16,21 @@
   return (fabs((value - expect)) < 0.001f);
 }
 
-kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) {
-  int2 const srcSize = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
-  int2 const dstSize = int2(tint_symbol_3.get_width(), tint_symbol_3.get_height());
+void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, uint3 GlobalInvocationID, texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2) {
+  int2 const srcSize = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  int2 const dstSize = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
   uint2 const dstTexCoord = uint2(GlobalInvocationID.xy);
   float4 const nonCoveredColor = float4(0.0f, 1.0f, 0.0f, 1.0f);
   bool success = true;
   if (((((dstTexCoord.x < uniforms.dstCopyOrigin.x) || (dstTexCoord.y < uniforms.dstCopyOrigin.y)) || (dstTexCoord.x >= (uniforms.dstCopyOrigin.x + uniforms.copySize.x))) || (dstTexCoord.y >= (uniforms.dstCopyOrigin.y + uniforms.copySize.y)))) {
-    success = (success && all((tint_symbol_3.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor)));
+    success = (success && all((tint_symbol_2.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor)));
   } else {
     uint2 srcTexCoord = ((dstTexCoord - uniforms.dstCopyOrigin) + uniforms.srcCopyOrigin);
     if ((uniforms.dstTextureFlipY == 1u)) {
       srcTexCoord.y = ((uint(srcSize.y) - srcTexCoord.y) - 1u);
     }
-    float4 const srcColor = tint_symbol_2.read(uint2(int2(srcTexCoord)), 0);
-    float4 const dstColor = tint_symbol_3.read(uint2(int2(dstTexCoord)), 0);
+    float4 const srcColor = tint_symbol_1.read(uint2(int2(srcTexCoord)), 0);
+    float4 const dstColor = tint_symbol_2.read(uint2(int2(dstTexCoord)), 0);
     if ((uniforms.channelCount == 2u)) {
       success = ((success && aboutEqual(dstColor.r, srcColor.r)) && aboutEqual(dstColor.g, srcColor.g));
     } else {
@@ -43,6 +43,10 @@
   } else {
     output.result[outputIndex] = 0u;
   }
+}
+
+kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) {
+  tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4);
   return;
 }
 
diff --git a/test/bug/tint/914.wgsl.expected.hlsl b/test/bug/tint/914.wgsl.expected.hlsl
index da7d9db..b4add28 100644
--- a/test/bug/tint/914.wgsl.expected.hlsl
+++ b/test/bug/tint/914.wgsl.expected.hlsl
@@ -54,11 +54,7 @@
   uint3 global_id : SV_DispatchThreadID;
 };
 
-[numthreads(16, 16, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 local_id = tint_symbol.local_id;
-  const uint3 global_id = tint_symbol.global_id;
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) {
   {
     for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) {
       const uint i = (idx / 64u);
@@ -143,5 +139,10 @@
       }
     }
   }
+}
+
+[numthreads(16, 16, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_id, tint_symbol.global_id, tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/bug/tint/914.wgsl.expected.msl b/test/bug/tint/914.wgsl.expected.msl
index 3d3ef57..eb146a2 100644
--- a/test/bug/tint/914.wgsl.expected.msl
+++ b/test/bug/tint/914.wgsl.expected.msl
@@ -50,14 +50,12 @@
   }
 }
 
-kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) {
-  threadgroup tint_array_wrapper tint_symbol_2;
-  threadgroup tint_array_wrapper tint_symbol_3;
+void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMatrix, const device Matrix& secondMatrix, device Matrix& resultMatrix, uint3 local_id, uint3 global_id, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, threadgroup tint_array_wrapper* const tint_symbol_2) {
   for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) {
     uint const i = (idx / 64u);
     uint const i_1 = (idx % 64u);
-    tint_symbol_2.arr[i].arr[i_1] = float();
-    tint_symbol_3.arr[i].arr[i_1] = float();
+    (*(tint_symbol_1)).arr[i].arr[i_1] = float();
+    (*(tint_symbol_2)).arr[i].arr[i_1] = float();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
   uint const tileRow = (local_id.y * RowPerThread);
@@ -80,23 +78,23 @@
       for(uint innerCol = 0u; (innerCol < ColPerThreadA); innerCol = (innerCol + 1u)) {
         uint const inputRow = (tileRow + innerRow);
         uint const inputCol = (tileColA + innerCol);
-        tint_symbol_2.arr[inputRow].arr[inputCol] = mm_readA(uniforms, firstMatrix, (globalRow + innerRow), ((t * TileInner) + inputCol));
+        (*(tint_symbol_1)).arr[inputRow].arr[inputCol] = mm_readA(uniforms, firstMatrix, (globalRow + innerRow), ((t * TileInner) + inputCol));
       }
     }
     for(uint innerRow = 0u; (innerRow < RowPerThreadB); innerRow = (innerRow + 1u)) {
       for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) {
         uint const inputRow = (tileRowB + innerRow);
         uint const inputCol = (tileCol + innerCol);
-        tint_symbol_3.arr[innerCol].arr[inputCol] = mm_readB(uniforms, secondMatrix, ((t * TileInner) + inputRow), (globalCol + innerCol));
+        (*(tint_symbol_2)).arr[innerCol].arr[inputCol] = mm_readB(uniforms, secondMatrix, ((t * TileInner) + inputRow), (globalCol + innerCol));
       }
     }
     threadgroup_barrier(mem_flags::mem_threadgroup);
     for(uint k = 0u; (k < TileInner); k = (k + 1u)) {
       for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) {
-        BCached.arr[inner] = tint_symbol_3.arr[k].arr[(tileCol + inner)];
+        BCached.arr[inner] = (*(tint_symbol_2)).arr[k].arr[(tileCol + inner)];
       }
       for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) {
-        ACached = tint_symbol_2.arr[(tileRow + innerRow)].arr[k];
+        ACached = (*(tint_symbol_1)).arr[(tileRow + innerRow)].arr[k];
         for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) {
           uint const index = ((innerRow * ColPerThread) + innerCol);
           acc.arr[index] = (acc.arr[index] + (ACached * BCached.arr[innerCol]));
@@ -111,6 +109,12 @@
       mm_write(uniforms, resultMatrix, (globalRow + innerRow), (globalCol + innerCol), acc.arr[index]);
     }
   }
+}
+
+kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) {
+  threadgroup tint_array_wrapper tint_symbol_3;
+  threadgroup tint_array_wrapper tint_symbol_4;
+  tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, local_id, global_id, local_invocation_index, &(tint_symbol_3), &(tint_symbol_4));
   return;
 }
 
diff --git a/test/bug/tint/922.wgsl.expected.hlsl b/test/bug/tint/922.wgsl.expected.hlsl
index c3b7973..ebd6476 100644
--- a/test/bug/tint/922.wgsl.expected.hlsl
+++ b/test/bug/tint/922.wgsl.expected.hlsl
@@ -154,40 +154,40 @@
   return o4;
 }
 
-Mat4x3_ tint_symbol_4(uint4 buffer[96], uint offset) {
+Mat4x3_ tint_symbol_3(uint4 buffer[96], uint offset) {
   const uint scalar_offset = ((offset + 0u)) / 4;
   const uint scalar_offset_1 = ((offset + 16u)) / 4;
   const uint scalar_offset_2 = ((offset + 32u)) / 4;
-  const Mat4x3_ tint_symbol_10 = {asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4])};
-  return tint_symbol_10;
+  const Mat4x3_ tint_symbol_9 = {asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4])};
+  return tint_symbol_9;
 }
 
-Mat4x4_ tint_symbol_6(uint4 buffer[4], uint offset) {
+Mat4x4_ tint_symbol_5(uint4 buffer[4], uint offset) {
   const uint scalar_offset_3 = ((offset + 0u)) / 4;
   const uint scalar_offset_4 = ((offset + 16u)) / 4;
   const uint scalar_offset_5 = ((offset + 32u)) / 4;
   const uint scalar_offset_6 = ((offset + 48u)) / 4;
-  const Mat4x4_ tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4]), asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]), asfloat(buffer[scalar_offset_6 / 4])};
-  return tint_symbol_11;
+  const Mat4x4_ tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4]), asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]), asfloat(buffer[scalar_offset_6 / 4])};
+  return tint_symbol_10;
 }
 
-Mat4x2_ tint_symbol_9(uint4 buffer[3], uint offset) {
+Mat4x2_ tint_symbol_8(uint4 buffer[3], uint offset) {
   const uint scalar_offset_7 = ((offset + 0u)) / 4;
   const uint scalar_offset_8 = ((offset + 16u)) / 4;
-  const Mat4x2_ tint_symbol_12 = {asfloat(buffer[scalar_offset_7 / 4]), asfloat(buffer[scalar_offset_8 / 4])};
-  return tint_symbol_12;
+  const Mat4x2_ tint_symbol_11 = {asfloat(buffer[scalar_offset_7 / 4]), asfloat(buffer[scalar_offset_8 / 4])};
+  return tint_symbol_11;
 }
 
 void main1() {
   Mat4x3_ t_PosMtx = (Mat4x3_)0;
   float2 t_TexSpaceCoord = float2(0.0f, 0.0f);
-  const Mat4x3_ _e18 = tint_symbol_4(global2, (48u * uint(int(a_PosMtxIdx1))));
+  const Mat4x3_ _e18 = tint_symbol_3(global2, (48u * uint(int(a_PosMtxIdx1))));
   t_PosMtx = _e18;
   const Mat4x4_ _e24 = _Mat4x4_1(t_PosMtx);
   const float3 _e25 = a_Position1;
   const Mat4x4_ _e30 = _Mat4x4_1(t_PosMtx);
   const float4 _e34 = Mul(_e30, float4(a_Position1, 1.0f));
-  const Mat4x4_ _e35 = tint_symbol_6(global, 0u);
+  const Mat4x4_ _e35 = tint_symbol_5(global, 0u);
   const Mat4x4_ _e38 = _Mat4x4_1(t_PosMtx);
   const float3 _e39 = a_Position1;
   const Mat4x4_ _e44 = _Mat4x4_1(t_PosMtx);
@@ -199,7 +199,7 @@
   if ((_e52.x == 2.0f)) {
     {
       const float3 _e59 = a_Normal1;
-      const Mat4x2_ _e64 = tint_symbol_9(global1, (32u * uint(0)));
+      const Mat4x2_ _e64 = tint_symbol_8(global1, (32u * uint(0)));
       const float2 _e68 = Mul2(_e64, float4(a_Normal1, 1.0f));
       v_TexCoord = _e68.xy;
       return;
@@ -207,7 +207,7 @@
   } else {
     {
       const float2 _e73 = a_UV1;
-      const Mat4x2_ _e79 = tint_symbol_9(global1, (32u * uint(0)));
+      const Mat4x2_ _e79 = tint_symbol_8(global1, (32u * uint(0)));
       const float2 _e84 = Mul2(_e79, float4(a_UV1, 1.0f, 1.0f));
       v_TexCoord = _e84.xy;
       return;
@@ -228,19 +228,22 @@
   float4 member : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float3 a_Position = tint_symbol.a_Position;
-  const float2 a_UV = tint_symbol.a_UV;
-  const float4 a_Color = tint_symbol.a_Color;
-  const float3 a_Normal = tint_symbol.a_Normal;
-  const float a_PosMtxIdx = tint_symbol.a_PosMtxIdx;
+VertexOutput main_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx) {
   a_Position1 = a_Position;
   a_UV1 = a_UV;
   a_Color1 = a_Color;
   a_Normal1 = a_Normal;
   a_PosMtxIdx1 = a_PosMtxIdx;
   main1();
-  const VertexOutput tint_symbol_3 = {v_Color, v_TexCoord, gl_Position};
-  const tint_symbol_2 tint_symbol_13 = {tint_symbol_3.v_Color, tint_symbol_3.v_TexCoord, tint_symbol_3.member};
-  return tint_symbol_13;
+  const VertexOutput tint_symbol_12 = {v_Color, v_TexCoord, gl_Position};
+  return tint_symbol_12;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const VertexOutput inner_result = main_inner(tint_symbol.a_Position, tint_symbol.a_UV, tint_symbol.a_Color, tint_symbol.a_Normal, tint_symbol.a_PosMtxIdx);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.v_Color = inner_result.v_Color;
+  wrapper_result.v_TexCoord = inner_result.v_TexCoord;
+  wrapper_result.member = inner_result.member;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/922.wgsl.expected.msl b/test/bug/tint/922.wgsl.expected.msl
index 8479d65..dcb3e5b 100644
--- a/test/bug/tint/922.wgsl.expected.msl
+++ b/test/bug/tint/922.wgsl.expected.msl
@@ -222,78 +222,81 @@
   return _e12;
 }
 
-void main1(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, thread float* const tint_symbol_6, thread float3* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread float3* const tint_symbol_11, thread float2* const tint_symbol_12, thread float2* const tint_symbol_13) {
+void main1(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, thread float2* const tint_symbol_12) {
   Mat4x3_ t_PosMtx = {};
   float2 t_TexSpaceCoord = 0.0f;
-  float const _e15 = *(tint_symbol_6);
+  float const _e15 = *(tint_symbol_5);
   Mat4x3_ const _e18 = global2.u_PosMtx.arr[int(_e15)];
   t_PosMtx = _e18;
   Mat4x3_ const _e23 = t_PosMtx;
   Mat4x4_ const _e24 = _Mat4x4_1(_e23);
-  float3 const _e25 = *(tint_symbol_7);
+  float3 const _e25 = *(tint_symbol_6);
   Mat4x3_ const _e29 = t_PosMtx;
   Mat4x4_ const _e30 = _Mat4x4_1(_e29);
-  float3 const _e31 = *(tint_symbol_7);
+  float3 const _e31 = *(tint_symbol_6);
   float4 const _e34 = Mul(_e30, float4(_e31, 1.0f));
   Mat4x4_ const _e35 = global.u_Projection;
   Mat4x3_ const _e37 = t_PosMtx;
   Mat4x4_ const _e38 = _Mat4x4_1(_e37);
-  float3 const _e39 = *(tint_symbol_7);
+  float3 const _e39 = *(tint_symbol_6);
   Mat4x3_ const _e43 = t_PosMtx;
   Mat4x4_ const _e44 = _Mat4x4_1(_e43);
-  float3 const _e45 = *(tint_symbol_7);
+  float3 const _e45 = *(tint_symbol_6);
   float4 const _e48 = Mul(_e44, float4(_e45, 1.0f));
   float4 const _e49 = Mul(_e35, _e48);
-  *(tint_symbol_8) = _e49;
-  float4 const _e50 = *(tint_symbol_9);
-  *(tint_symbol_10) = _e50;
+  *(tint_symbol_7) = _e49;
+  float4 const _e50 = *(tint_symbol_8);
+  *(tint_symbol_9) = _e50;
   float4 const _e52 = global1.u_Misc0_;
   if ((_e52.x == 2.0f)) {
     {
-      float3 const _e59 = *(tint_symbol_11);
+      float3 const _e59 = *(tint_symbol_10);
       Mat4x2_ const _e64 = global1.u_TexMtx.arr[0];
-      float3 const _e65 = *(tint_symbol_11);
+      float3 const _e65 = *(tint_symbol_10);
       float2 const _e68 = Mul2(_e64, float4(_e65, 1.0f));
-      *(tint_symbol_12) = _e68.xy;
+      *(tint_symbol_11) = _e68.xy;
       return;
     }
   } else {
     {
-      float2 const _e73 = *(tint_symbol_13);
+      float2 const _e73 = *(tint_symbol_12);
       Mat4x2_ const _e79 = global1.u_TexMtx.arr[0];
-      float2 const _e80 = *(tint_symbol_13);
+      float2 const _e80 = *(tint_symbol_12);
       float2 const _e84 = Mul2(_e79, float4(_e80, 1.0f, 1.0f));
-      *(tint_symbol_12) = _e84.xy;
+      *(tint_symbol_11) = _e84.xy;
       return;
     }
   }
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(2)]], constant ub_SceneParams& global [[buffer(0)]], constant ub_MaterialParams& global1 [[buffer(1)]]) {
-  thread float3 tint_symbol_14 = 0.0f;
-  thread float2 tint_symbol_15 = 0.0f;
-  thread float4 tint_symbol_16 = 0.0f;
-  thread float3 tint_symbol_17 = 0.0f;
-  thread float tint_symbol_18 = 0.0f;
-  thread float4 tint_symbol_19 = 0.0f;
-  thread float4 tint_symbol_20 = 0.0f;
-  thread float2 tint_symbol_21 = 0.0f;
-  float3 const a_Position = tint_symbol_1.a_Position;
-  float2 const a_UV = tint_symbol_1.a_UV;
-  float4 const a_Color = tint_symbol_1.a_Color;
-  float3 const a_Normal = tint_symbol_1.a_Normal;
-  float const a_PosMtxIdx = tint_symbol_1.a_PosMtxIdx;
-  tint_symbol_14 = a_Position;
-  tint_symbol_15 = a_UV;
-  tint_symbol_16 = a_Color;
-  tint_symbol_17 = a_Normal;
-  tint_symbol_18 = a_PosMtxIdx;
-  main1(global2, global, global1, &(tint_symbol_18), &(tint_symbol_14), &(tint_symbol_19), &(tint_symbol_16), &(tint_symbol_20), &(tint_symbol_17), &(tint_symbol_21), &(tint_symbol_15));
-  float4 const _e11 = tint_symbol_20;
-  float2 const _e13 = tint_symbol_21;
-  float4 const _e15 = tint_symbol_19;
+VertexOutput tint_symbol_inner(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, thread float3* const tint_symbol_13, thread float2* const tint_symbol_14, thread float4* const tint_symbol_15, thread float3* const tint_symbol_16, thread float* const tint_symbol_17, thread float4* const tint_symbol_18, thread float4* const tint_symbol_19, thread float2* const tint_symbol_20) {
+  *(tint_symbol_13) = a_Position;
+  *(tint_symbol_14) = a_UV;
+  *(tint_symbol_15) = a_Color;
+  *(tint_symbol_16) = a_Normal;
+  *(tint_symbol_17) = a_PosMtxIdx;
+  main1(global2, global, global1, tint_symbol_17, tint_symbol_13, tint_symbol_18, tint_symbol_15, tint_symbol_19, tint_symbol_16, tint_symbol_20, tint_symbol_14);
+  float4 const _e11 = *(tint_symbol_19);
+  float2 const _e13 = *(tint_symbol_20);
+  float4 const _e15 = *(tint_symbol_18);
   VertexOutput const tint_symbol_4 = {.v_Color=_e11, .v_TexCoord=_e13, .member=_e15};
-  tint_symbol_3 const tint_symbol_5 = {.v_Color=tint_symbol_4.v_Color, .v_TexCoord=tint_symbol_4.v_TexCoord, .member=tint_symbol_4.member};
-  return tint_symbol_5;
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(2)]], constant ub_SceneParams& global [[buffer(0)]], constant ub_MaterialParams& global1 [[buffer(1)]]) {
+  thread float3 tint_symbol_21 = 0.0f;
+  thread float2 tint_symbol_22 = 0.0f;
+  thread float4 tint_symbol_23 = 0.0f;
+  thread float3 tint_symbol_24 = 0.0f;
+  thread float tint_symbol_25 = 0.0f;
+  thread float4 tint_symbol_26 = 0.0f;
+  thread float4 tint_symbol_27 = 0.0f;
+  thread float2 tint_symbol_28 = 0.0f;
+  VertexOutput const inner_result = tint_symbol_inner(global2, global, global1, tint_symbol_1.a_Position, tint_symbol_1.a_UV, tint_symbol_1.a_Color, tint_symbol_1.a_Normal, tint_symbol_1.a_PosMtxIdx, &(tint_symbol_21), &(tint_symbol_22), &(tint_symbol_23), &(tint_symbol_24), &(tint_symbol_25), &(tint_symbol_26), &(tint_symbol_27), &(tint_symbol_28));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.v_Color = inner_result.v_Color;
+  wrapper_result.v_TexCoord = inner_result.v_TexCoord;
+  wrapper_result.member = inner_result.member;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/926.wgsl.expected.hlsl b/test/bug/tint/926.wgsl.expected.hlsl
index 87ebecb..9f7e997 100644
--- a/test/bug/tint/926.wgsl.expected.hlsl
+++ b/test/bug/tint/926.wgsl.expected.hlsl
@@ -11,9 +11,12 @@
   uint3 global_id : SV_DispatchThreadID;
 };
 
+void computeMain_inner(uint3 global_id) {
+  const uint firstVertex = atomicAdd_1(drawOut, 0u, cubeVerts);
+}
+
 [numthreads(1, 1, 1)]
 void computeMain(tint_symbol_1 tint_symbol) {
-  const uint3 global_id = tint_symbol.global_id;
-  const uint firstVertex = atomicAdd_1(drawOut, 0u, cubeVerts);
+  computeMain_inner(tint_symbol.global_id);
   return;
 }
diff --git a/test/bug/tint/926.wgsl.expected.msl b/test/bug/tint/926.wgsl.expected.msl
index c05ab22..0c15829 100644
--- a/test/bug/tint/926.wgsl.expected.msl
+++ b/test/bug/tint/926.wgsl.expected.msl
@@ -5,9 +5,13 @@
   /* 0x0000 */ atomic_uint vertexCount;
 };
 
+void computeMain_inner(device DrawIndirectArgs& drawOut, uint3 global_id, thread uint* const tint_symbol) {
+  uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), *(tint_symbol), memory_order_relaxed);
+}
+
 kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(5)]]) {
   thread uint tint_symbol_1 = 0u;
-  uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), tint_symbol_1, memory_order_relaxed);
+  computeMain_inner(drawOut, global_id, &(tint_symbol_1));
   return;
 }
 
diff --git a/test/bug/tint/942.wgsl.expected.hlsl b/test/bug/tint/942.wgsl.expected.hlsl
index 9be851b..2325c62 100644
--- a/test/bug/tint/942.wgsl.expected.hlsl
+++ b/test/bug/tint/942.wgsl.expected.hlsl
@@ -16,11 +16,7 @@
   uint3 WorkGroupID : SV_GroupID;
 };
 
-[numthreads(64, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 WorkGroupID = tint_symbol.WorkGroupID;
-  const uint3 LocalInvocationID = tint_symbol.LocalInvocationID;
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index) {
   {
     for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) {
       const uint i_1 = (idx / 256u);
@@ -79,5 +75,10 @@
       }
     }
   }
+}
+
+[numthreads(64, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.WorkGroupID, tint_symbol.LocalInvocationID, tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/bug/tint/942.wgsl.expected.msl b/test/bug/tint/942.wgsl.expected.msl
index 8ae5eb1..ad93bb5 100644
--- a/test/bug/tint/942.wgsl.expected.msl
+++ b/test/bug/tint/942.wgsl.expected.msl
@@ -15,16 +15,15 @@
   tint_array_wrapper_1 arr[4];
 };
 
-kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]], texture2d<float, access::write> tint_symbol_5 [[texture(2)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(1)]], constant Flip& flip [[buffer(3)]]) {
-  threadgroup tint_array_wrapper tint_symbol_2;
+void tint_symbol_inner(constant Params& params, constant Flip& flip, uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3, texture2d<float, access::write> tint_symbol_4) {
   for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) {
     uint const i_1 = (idx / 256u);
     uint const i_2 = (idx % 256u);
-    tint_symbol_2.arr[i_1].arr[i_2] = float3();
+    (*(tint_symbol_1)).arr[i_1].arr[i_2] = float3();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
   uint const filterOffset = ((params.filterDim - 1u) / 2u);
-  int2 const dims = int2(tint_symbol_3.get_width(0), tint_symbol_3.get_height(0));
+  int2 const dims = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
   int2 const baseIndex = as_type<int2>((as_type<uint2>(int2(((WorkGroupID.xy * uint2(params.blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u))))) - as_type<uint2>(int2(int(filterOffset), 0))));
   for(uint r = 0u; (r < 4u); r = (r + 1u)) {
     for(uint c = 0u; (c < 4u); c = (c + 1u)) {
@@ -32,7 +31,7 @@
       if ((flip.value != 0u)) {
         loadIndex = loadIndex.yx;
       }
-      tint_symbol_2.arr[r].arr[((4u * LocalInvocationID.x) + c)] = tint_symbol_3.sample(tint_symbol_4, ((float2(loadIndex) + float2(0.25f, 0.25f)) / float2(dims)), level(0.0f)).rgb;
+      (*(tint_symbol_1)).arr[r].arr[((4u * LocalInvocationID.x) + c)] = tint_symbol_2.sample(tint_symbol_3, ((float2(loadIndex) + float2(0.25f, 0.25f)) / float2(dims)), level(0.0f)).rgb;
     }
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
@@ -47,12 +46,17 @@
         float3 acc = float3(0.0f, 0.0f, 0.0f);
         for(uint f = 0u; (f < params.filterDim); f = (f + 1u)) {
           uint i = ((center + f) - filterOffset);
-          acc = (acc + ((1.0f / float(params.filterDim)) * tint_symbol_2.arr[r].arr[i]));
+          acc = (acc + ((1.0f / float(params.filterDim)) * (*(tint_symbol_1)).arr[r].arr[i]));
         }
-        tint_symbol_5.write(float4(acc, 1.0f), uint2(writeIndex));
+        tint_symbol_4.write(float4(acc, 1.0f), uint2(writeIndex));
       }
     }
   }
+}
+
+kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_6 [[texture(1)]], sampler tint_symbol_7 [[sampler(0)]], texture2d<float, access::write> tint_symbol_8 [[texture(2)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(1)]], constant Flip& flip [[buffer(3)]]) {
+  threadgroup tint_array_wrapper tint_symbol_5;
+  tint_symbol_inner(params, flip, WorkGroupID, LocalInvocationID, local_invocation_index, &(tint_symbol_5), tint_symbol_6, tint_symbol_7, tint_symbol_8);
   return;
 }
 
diff --git a/test/bug/tint/943.spvasm.expected.hlsl b/test/bug/tint/943.spvasm.expected.hlsl
index 6fd1af2..38e87d3 100644
--- a/test/bug/tint/943.spvasm.expected.hlsl
+++ b/test/bug/tint/943.spvasm.expected.hlsl
@@ -345,11 +345,7 @@
   uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 64, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_LocalInvocationID_param = tint_symbol.gl_LocalInvocationID_param;
-  const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param;
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_param, uint local_invocation_index) {
   {
     const uint i_1 = local_invocation_index;
     const uint i_2 = (local_invocation_index % 1u);
@@ -366,5 +362,10 @@
   gl_LocalInvocationID = gl_LocalInvocationID_param;
   gl_GlobalInvocationID = gl_GlobalInvocationID_param;
   main_1();
+}
+
+[numthreads(1, 64, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_LocalInvocationID_param, tint_symbol.gl_GlobalInvocationID_param, tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/bug/tint/943.spvasm.expected.msl b/test/bug/tint/943.spvasm.expected.msl
index ae7f081..9ce264b 100644
--- a/test/bug/tint/943.spvasm.expected.msl
+++ b/test/bug/tint/943.spvasm.expected.msl
@@ -53,7 +53,7 @@
   return x_88;
 }
 
-float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread int* const row, thread int* const col, thread int* const tint_symbol_3, thread int* const tint_symbol_4, thread int* const tint_symbol_5) {
+float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread int* const row, thread int* const col, thread int* const tint_symbol_2, thread int* const tint_symbol_3, thread int* const tint_symbol_4) {
   int batchASize = 0;
   int2 param_10 = 0;
   int2 param_11 = 0;
@@ -63,16 +63,16 @@
   batchASize = as_type<int>((as_type<uint>(x_417) * as_type<uint>(x_419)));
   int const x_421 = *(row);
   int const x_422 = *(col);
-  int const x_424 = *(tint_symbol_3);
-  int const x_425 = *(tint_symbol_4);
+  int const x_424 = *(tint_symbol_2);
+  int const x_425 = *(tint_symbol_3);
   param_10 = int2(x_421, x_422);
   param_11 = int2(x_424, x_425);
   bool const x_429 = coordsInBounds_vi2_vi2_(&(param_10), &(param_11));
   if (x_429) {
-    int const x_438 = *(tint_symbol_5);
+    int const x_438 = *(tint_symbol_4);
     int const x_439 = batchASize;
     int const x_441 = *(row);
-    int const x_442 = *(tint_symbol_4);
+    int const x_442 = *(tint_symbol_3);
     int const x_445 = *(col);
     float const x_448 = x_165.A[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_438) * as_type<uint>(x_439)))) + as_type<uint>(as_type<int>((as_type<uint>(x_441) * as_type<uint>(x_442))))))) + as_type<uint>(x_445)))];
     x_430 = x_448;
@@ -83,7 +83,7 @@
   return x_450;
 }
 
-float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread int* const row_1, thread int* const col_1, thread int* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
+float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread int* const row_1, thread int* const col_1, thread int* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
   int batchBSize = 0;
   int2 param_12 = 0;
   int2 param_13 = 0;
@@ -93,16 +93,16 @@
   batchBSize = as_type<int>((as_type<uint>(x_455) * as_type<uint>(x_457)));
   int const x_459 = *(row_1);
   int const x_460 = *(col_1);
-  int const x_462 = *(tint_symbol_6);
-  int const x_463 = *(tint_symbol_7);
+  int const x_462 = *(tint_symbol_5);
+  int const x_463 = *(tint_symbol_6);
   param_12 = int2(x_459, x_460);
   param_13 = int2(x_462, x_463);
   bool const x_467 = coordsInBounds_vi2_vi2_(&(param_12), &(param_13));
   if (x_467) {
-    int const x_475 = *(tint_symbol_8);
+    int const x_475 = *(tint_symbol_7);
     int const x_476 = batchBSize;
     int const x_478 = *(row_1);
-    int const x_479 = *(tint_symbol_7);
+    int const x_479 = *(tint_symbol_6);
     int const x_482 = *(col_1);
     float const x_485 = x_185.B[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_475) * as_type<uint>(x_476)))) + as_type<uint>(as_type<int>((as_type<uint>(x_478) * as_type<uint>(x_479))))))) + as_type<uint>(x_482)))];
     x_468 = x_485;
@@ -146,17 +146,17 @@
   return;
 }
 
-void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int* const row_2, thread int* const col_2, thread float* const value_2, thread int* const tint_symbol_9) {
+void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int* const row_2, thread int* const col_2, thread float* const value_2, thread int* const tint_symbol_8) {
   int3 outCoord = 0;
   int param_14 = 0;
   int param_15 = 0;
   int param_16 = 0;
   float param_17 = 0.0f;
-  int const x_491 = *(tint_symbol_9);
+  int const x_491 = *(tint_symbol_8);
   int const x_492 = *(row_2);
   int const x_493 = *(col_2);
   outCoord = int3(x_491, x_492, x_493);
-  int const x_496 = *(tint_symbol_9);
+  int const x_496 = *(tint_symbol_8);
   param_14 = x_496;
   int const x_498 = *(row_2);
   param_15 = x_498;
@@ -168,7 +168,7 @@
   return;
 }
 
-void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_10, thread uint3* const tint_symbol_11, thread int* const tint_symbol_12, thread int* const tint_symbol_13, thread int* const tint_symbol_14, threadgroup tint_array_wrapper* const tint_symbol_15, thread int* const tint_symbol_16, threadgroup tint_array_wrapper_2* const tint_symbol_17) {
+void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_9, thread uint3* const tint_symbol_10, thread int* const tint_symbol_11, thread int* const tint_symbol_12, thread int* const tint_symbol_13, threadgroup tint_array_wrapper* const tint_symbol_14, thread int* const tint_symbol_15, threadgroup tint_array_wrapper_2* const tint_symbol_16) {
   int tileRow = 0;
   int tileCol = 0;
   int globalRow = 0;
@@ -203,13 +203,13 @@
   int param_7 = 0;
   int param_8 = 0;
   float param_9 = 0.0f;
-  uint const x_132 = (*(tint_symbol_10)).y;
+  uint const x_132 = (*(tint_symbol_9)).y;
   tileRow = as_type<int>((as_type<uint>(as_type<int>(x_132)) * as_type<uint>(1)));
-  uint const x_137 = (*(tint_symbol_10)).x;
+  uint const x_137 = (*(tint_symbol_9)).x;
   tileCol = as_type<int>((as_type<uint>(as_type<int>(x_137)) * as_type<uint>(1)));
-  uint const x_143 = (*(tint_symbol_11)).y;
+  uint const x_143 = (*(tint_symbol_10)).y;
   globalRow = as_type<int>((as_type<uint>(as_type<int>(x_143)) * as_type<uint>(1)));
-  uint const x_148 = (*(tint_symbol_11)).x;
+  uint const x_148 = (*(tint_symbol_10)).x;
   globalCol = as_type<int>((as_type<uint>(as_type<int>(x_148)) * as_type<uint>(1)));
   int const x_152 = *(dimInner);
   numTiles = as_type<int>((as_type<uint>((as_type<int>((as_type<uint>(x_152) - as_type<uint>(1))) / 64)) + as_type<uint>(1)));
@@ -240,9 +240,9 @@
       innerRow = as_type<int>((as_type<uint>(x_183) + as_type<uint>(1)));
     }
   }
-  uint const x_187 = (*(tint_symbol_10)).x;
+  uint const x_187 = (*(tint_symbol_9)).x;
   tileColA = as_type<int>((as_type<uint>(as_type<int>(x_187)) * as_type<uint>(64)));
-  uint const x_192 = (*(tint_symbol_10)).y;
+  uint const x_192 = (*(tint_symbol_9)).y;
   tileRowB = as_type<int>((as_type<uint>(as_type<int>(x_192)) * as_type<uint>(1)));
   t = 0;
   while (true) {
@@ -280,8 +280,8 @@
         int const x_240 = inputCol;
         param_3 = as_type<int>((as_type<uint>(x_235) + as_type<uint>(x_236)));
         param_4 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_238) * as_type<uint>(64)))) + as_type<uint>(x_240)));
-        float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_12, tint_symbol_13, tint_symbol_14);
-        (*(tint_symbol_15)).arr[x_233].arr[x_234] = x_244;
+        float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_11, tint_symbol_12, tint_symbol_13);
+        (*(tint_symbol_14)).arr[x_233].arr[x_234] = x_244;
         {
           int const x_247 = innerCol_1;
           innerCol_1 = as_type<int>((as_type<uint>(x_247) + as_type<uint>(1)));
@@ -320,8 +320,8 @@
         int const x_285 = innerCol_2;
         param_5 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_280) * as_type<uint>(64)))) + as_type<uint>(x_282)));
         param_6 = as_type<int>((as_type<uint>(x_284) + as_type<uint>(x_285)));
-        float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_13, tint_symbol_16, tint_symbol_14);
-        (*(tint_symbol_17)).arr[x_278].arr[x_279] = x_289;
+        float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_12, tint_symbol_15, tint_symbol_13);
+        (*(tint_symbol_16)).arr[x_278].arr[x_279] = x_289;
         {
           int const x_291 = innerCol_2;
           innerCol_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
@@ -351,7 +351,7 @@
         int const x_315 = k;
         int const x_316 = tileCol;
         int const x_317 = inner;
-        float const x_320 = (*(tint_symbol_17)).arr[x_315].arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(x_317)))];
+        float const x_320 = (*(tint_symbol_16)).arr[x_315].arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(x_317)))];
         BCached.arr[x_314] = x_320;
         {
           int const x_322 = inner;
@@ -368,7 +368,7 @@
         int const x_333 = tileRow;
         int const x_334 = innerRow_3;
         int const x_336 = k;
-        float const x_338 = (*(tint_symbol_15)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(x_334)))].arr[x_336];
+        float const x_338 = (*(tint_symbol_14)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(x_334)))].arr[x_336];
         ACached = x_338;
         innerCol_3 = 0;
         while (true) {
@@ -445,7 +445,7 @@
         param_8 = as_type<int>((as_type<uint>(x_400) + as_type<uint>(x_401)));
         float const x_409 = acc.arr[x_403].arr[x_404];
         param_9 = x_409;
-        mm_write_i1_i1_f1_(x_48, x_54, &(param_7), &(param_8), &(param_9), tint_symbol_14);
+        mm_write_i1_i1_f1_(x_48, x_54, &(param_7), &(param_8), &(param_9), tint_symbol_13);
       }
       {
         int const x_411 = innerCol_4;
@@ -460,51 +460,55 @@
   return;
 }
 
-void main_1(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const tint_symbol_18, thread int* const tint_symbol_19, thread int* const tint_symbol_20, thread uint3* const tint_symbol_21, thread int* const tint_symbol_22, thread uint3* const tint_symbol_23, threadgroup tint_array_wrapper* const tint_symbol_24, threadgroup tint_array_wrapper_2* const tint_symbol_25) {
+void main_1(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const tint_symbol_17, thread int* const tint_symbol_18, thread int* const tint_symbol_19, thread uint3* const tint_symbol_20, thread int* const tint_symbol_21, thread uint3* const tint_symbol_22, threadgroup tint_array_wrapper* const tint_symbol_23, threadgroup tint_array_wrapper_2* const tint_symbol_24) {
   int param_18 = 0;
   int param_19 = 0;
   int param_20 = 0;
   int const x_67 = x_48.aShape.y;
-  *(tint_symbol_18) = x_67;
+  *(tint_symbol_17) = x_67;
   int const x_71 = x_48.aShape.z;
-  *(tint_symbol_19) = x_71;
+  *(tint_symbol_18) = x_71;
   int const x_75 = x_48.bShape.z;
-  *(tint_symbol_20) = x_75;
-  uint const x_505 = (*(tint_symbol_21)).z;
-  *(tint_symbol_22) = as_type<int>(x_505);
-  int const x_508 = *(tint_symbol_18);
+  *(tint_symbol_19) = x_75;
+  uint const x_505 = (*(tint_symbol_20)).z;
+  *(tint_symbol_21) = as_type<int>(x_505);
+  int const x_508 = *(tint_symbol_17);
   param_18 = x_508;
-  int const x_510 = *(tint_symbol_19);
+  int const x_510 = *(tint_symbol_18);
   param_19 = x_510;
-  int const x_512 = *(tint_symbol_20);
+  int const x_512 = *(tint_symbol_19);
   param_20 = x_512;
-  mm_matMul_i1_i1_i1_(x_48, x_165, x_185, x_54, &(param_18), &(param_19), &(param_20), tint_symbol_23, tint_symbol_21, tint_symbol_18, tint_symbol_19, tint_symbol_22, tint_symbol_24, tint_symbol_20, tint_symbol_25);
+  mm_matMul_i1_i1_i1_(x_48, x_165, x_185, x_54, &(param_18), &(param_19), &(param_20), tint_symbol_22, tint_symbol_20, tint_symbol_17, tint_symbol_18, tint_symbol_21, tint_symbol_23, tint_symbol_19, tint_symbol_24);
   return;
 }
 
-kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(3)]], const device ssbA& x_165 [[buffer(1)]], const device ssbB& x_185 [[buffer(2)]], device ssbOut& x_54 [[buffer(0)]]) {
-  threadgroup tint_array_wrapper_2 tint_symbol_26;
-  threadgroup tint_array_wrapper tint_symbol_27;
-  thread uint3 tint_symbol_28 = 0u;
-  thread uint3 tint_symbol_29 = 0u;
-  thread int tint_symbol_30 = 0;
-  thread int tint_symbol_31 = 0;
-  thread int tint_symbol_32 = 0;
-  thread int tint_symbol_33 = 0;
+void tint_symbol_1_inner(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_param, uint local_invocation_index, threadgroup tint_array_wrapper_2* const tint_symbol_25, threadgroup tint_array_wrapper* const tint_symbol_26, thread uint3* const tint_symbol_27, thread uint3* const tint_symbol_28, thread int* const tint_symbol_29, thread int* const tint_symbol_30, thread int* const tint_symbol_31, thread int* const tint_symbol_32) {
   {
     uint const i_1 = local_invocation_index;
     uint const i_2 = (local_invocation_index % 1u);
-    tint_symbol_26.arr[i_1].arr[i_2] = float();
+    (*(tint_symbol_25)).arr[i_1].arr[i_2] = float();
   }
   for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 64u)) {
     uint const i = (idx / 64u);
     uint const i_1 = (idx % 64u);
-    tint_symbol_27.arr[i].arr[i_1] = float();
+    (*(tint_symbol_26)).arr[i].arr[i_1] = float();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  tint_symbol_28 = gl_LocalInvocationID_param;
-  tint_symbol_29 = gl_GlobalInvocationID_param;
-  main_1(x_48, x_165, x_185, x_54, &(tint_symbol_30), &(tint_symbol_31), &(tint_symbol_32), &(tint_symbol_29), &(tint_symbol_33), &(tint_symbol_28), &(tint_symbol_27), &(tint_symbol_26));
+  *(tint_symbol_27) = gl_LocalInvocationID_param;
+  *(tint_symbol_28) = gl_GlobalInvocationID_param;
+  main_1(x_48, x_165, x_185, x_54, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_28, tint_symbol_32, tint_symbol_27, tint_symbol_26, tint_symbol_25);
+}
+
+kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(3)]], const device ssbA& x_165 [[buffer(1)]], const device ssbB& x_185 [[buffer(2)]], device ssbOut& x_54 [[buffer(0)]]) {
+  threadgroup tint_array_wrapper_2 tint_symbol_33;
+  threadgroup tint_array_wrapper tint_symbol_34;
+  thread uint3 tint_symbol_35 = 0u;
+  thread uint3 tint_symbol_36 = 0u;
+  thread int tint_symbol_37 = 0;
+  thread int tint_symbol_38 = 0;
+  thread int tint_symbol_39 = 0;
+  thread int tint_symbol_40 = 0;
+  tint_symbol_1_inner(x_48, x_165, x_185, x_54, gl_LocalInvocationID_param, gl_GlobalInvocationID_param, local_invocation_index, &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), &(tint_symbol_40));
   return;
 }
 
diff --git a/test/bug/tint/948.wgsl.expected.hlsl b/test/bug/tint/948.wgsl.expected.hlsl
index 694cd53..869f3e3 100644
--- a/test/bug/tint/948.wgsl.expected.hlsl
+++ b/test/bug/tint/948.wgsl.expected.hlsl
@@ -164,13 +164,7 @@
   float4 glFragColor_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float2 tUV_param = tint_symbol.tUV_param;
-  const float2 tileID_1_param = tint_symbol.tileID_1_param;
-  const float2 levelUnits_param = tint_symbol.levelUnits_param;
-  const float2 stageUnits_1_param = tint_symbol.stageUnits_1_param;
-  const float3 vPosition_param = tint_symbol.vPosition_param;
-  const float2 vUV_param = tint_symbol.vUV_param;
+main_out main_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param) {
   tUV = tUV_param;
   tileID_1 = tileID_1_param;
   levelUnits = levelUnits_param;
@@ -178,7 +172,13 @@
   vPosition = vPosition_param;
   vUV = vUV_param;
   main_1();
-  const main_out tint_symbol_3 = {glFragColor};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.glFragColor_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {glFragColor};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.tUV_param, tint_symbol.tileID_1_param, tint_symbol.levelUnits_param, tint_symbol.stageUnits_1_param, tint_symbol.vPosition_param, tint_symbol.vUV_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/948.wgsl.expected.msl b/test/bug/tint/948.wgsl.expected.msl
index 86ebd22..a1007e0 100644
--- a/test/bug/tint/948.wgsl.expected.msl
+++ b/test/bug/tint/948.wgsl.expected.msl
@@ -29,21 +29,21 @@
   float4 glFragColor_1 [[color(0)]];
 };
 
-float4x4 getFrameData_f1_(constant LeftOver& x_20, thread float* const frameID, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
+float4x4 getFrameData_f1_(constant LeftOver& x_20, thread float* const frameID, texture2d<float, access::sample> tint_symbol_5, sampler tint_symbol_6) {
   float fX = 0.0f;
   float const x_15 = *(frameID);
   float const x_25 = x_20.spriteCount;
   fX = (x_15 / x_25);
   float const x_37 = fX;
-  float4 const x_40 = tint_symbol_6.sample(tint_symbol_7, float2(x_37, 0.0f), bias(0.0f));
+  float4 const x_40 = tint_symbol_5.sample(tint_symbol_6, float2(x_37, 0.0f), bias(0.0f));
   float const x_44 = fX;
-  float4 const x_47 = tint_symbol_6.sample(tint_symbol_7, float2(x_44, 0.25f), bias(0.0f));
+  float4 const x_47 = tint_symbol_5.sample(tint_symbol_6, float2(x_44, 0.25f), bias(0.0f));
   float const x_51 = fX;
-  float4 const x_54 = tint_symbol_6.sample(tint_symbol_7, float2(x_51, 0.5f), bias(0.0f));
+  float4 const x_54 = tint_symbol_5.sample(tint_symbol_6, float2(x_51, 0.5f), bias(0.0f));
   return float4x4(float4(x_40.x, x_40.y, x_40.z, x_40.w), float4(x_47.x, x_47.y, x_47.z, x_47.w), float4(x_54.x, x_54.y, x_54.z, x_54.w), float4(float4(0.0f, 0.0f, 0.0f, 0.0f).x, float4(0.0f, 0.0f, 0.0f, 0.0f).y, float4(0.0f, 0.0f, 0.0f, 0.0f).z, float4(0.0f, 0.0f, 0.0f, 0.0f).w));
 }
 
-void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture2d<float, access::sample> tint_symbol_9, sampler tint_symbol_10, texture2d<float, access::sample> tint_symbol_11, texture2d<float, access::sample> tint_symbol_12, sampler tint_symbol_13, thread float* const tint_symbol_14, texture2d<float, access::sample> tint_symbol_15, sampler tint_symbol_16, texture2d<float, access::sample> tint_symbol_17, sampler tint_symbol_18, thread float4* const tint_symbol_19) {
+void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, texture2d<float, access::sample> tint_symbol_10, texture2d<float, access::sample> tint_symbol_11, sampler tint_symbol_12, thread float* const tint_symbol_13, texture2d<float, access::sample> tint_symbol_14, sampler tint_symbol_15, texture2d<float, access::sample> tint_symbol_16, sampler tint_symbol_17, thread float4* const tint_symbol_18) {
   float4 color = 0.0f;
   float2 tileUV = 0.0f;
   float2 tileID = 0.0f;
@@ -63,11 +63,11 @@
   float alpha = 0.0f;
   float3 mixed = 0.0f;
   color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  float2 const x_86 = *(tint_symbol_8);
+  float2 const x_86 = *(tint_symbol_7);
   tileUV = fract(x_86);
   float const x_91 = tileUV.y;
   tileUV.y = (1.0f - x_91);
-  float2 const x_95 = *(tint_symbol_8);
+  float2 const x_95 = *(tint_symbol_7);
   tileID = floor(x_95);
   float2 const x_101 = x_20.spriteMapSize;
   sheetUnits = (float2(1.0f, 1.0f) / x_101);
@@ -87,14 +87,14 @@
       case 1: {
         float2 const x_150 = tileID;
         float2 const x_154 = x_20.stageSize;
-        float4 const x_156 = tint_symbol_9.sample(tint_symbol_10, ((x_150 + float2(0.5f, 0.5f)) / x_154), bias(0.0f));
+        float4 const x_156 = tint_symbol_8.sample(tint_symbol_9, ((x_150 + float2(0.5f, 0.5f)) / x_154), bias(0.0f));
         frameID_1 = x_156.x;
         break;
       }
       case 0: {
         float2 const x_136 = tileID;
         float2 const x_140 = x_20.stageSize;
-        float4 const x_142 = tint_symbol_11.sample(tint_symbol_10, ((x_136 + float2(0.5f, 0.5f)) / x_140), bias(0.0f));
+        float4 const x_142 = tint_symbol_10.sample(tint_symbol_9, ((x_136 + float2(0.5f, 0.5f)) / x_140), bias(0.0f));
         frameID_1 = x_142.x;
         break;
       }
@@ -104,13 +104,13 @@
     }
     float const x_166 = frameID_1;
     float const x_169 = x_20.spriteCount;
-    float4 const x_172 = tint_symbol_12.sample(tint_symbol_13, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f));
+    float4 const x_172 = tint_symbol_11.sample(tint_symbol_12, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f));
     animationData = x_172;
     float const x_174 = animationData.y;
     if ((x_174 > 0.0f)) {
       float const x_181 = x_20.time;
       float const x_184 = animationData.z;
-      *(tint_symbol_14) = fmod((x_181 * x_184), 1.0f);
+      *(tint_symbol_13) = fmod((x_181 * x_184), 1.0f);
       f = 0.0f;
       while (true) {
         float const x_193 = f;
@@ -119,7 +119,7 @@
           break;
         }
         float const x_197 = animationData.y;
-        float const x_198 = *(tint_symbol_14);
+        float const x_198 = *(tint_symbol_13);
         if ((x_197 > x_198)) {
           float const x_203 = animationData.x;
           frameID_1 = x_203;
@@ -128,7 +128,7 @@
         float const x_208 = frameID_1;
         float const x_211 = x_20.spriteCount;
         float const x_214 = f;
-        float4 const x_217 = tint_symbol_12.sample(tint_symbol_13, float2(((x_208 + 0.5f) / x_211), (0.125f * x_214)), bias(0.0f));
+        float4 const x_217 = tint_symbol_11.sample(tint_symbol_12, float2(((x_208 + 0.5f) / x_211), (0.125f * x_214)), bias(0.0f));
         animationData = x_217;
         {
           float const x_218 = f;
@@ -138,7 +138,7 @@
     }
     float const x_222 = frameID_1;
     param = (x_222 + 0.5f);
-    float4x4 const x_225 = getFrameData_f1_(x_20, &(param), tint_symbol_15, tint_symbol_16);
+    float4x4 const x_225 = getFrameData_f1_(x_20, &(param), tint_symbol_14, tint_symbol_15);
     frameData = x_225;
     float4 const x_228 = frameData[0];
     float2 const x_231 = x_20.spriteMapSize;
@@ -159,13 +159,13 @@
       float2 const x_263 = tileUV;
       float2 const x_264 = frameSize;
       float2 const x_266 = offset_1;
-      float4 const x_268 = tint_symbol_17.sample(tint_symbol_18, ((x_263 * x_264) + x_266));
+      float4 const x_268 = tint_symbol_16.sample(tint_symbol_17, ((x_263 * x_264) + x_266));
       color = x_268;
     } else {
       float2 const x_274 = tileUV;
       float2 const x_275 = frameSize;
       float2 const x_277 = offset_1;
-      float4 const x_279 = tint_symbol_17.sample(tint_symbol_18, ((x_274 * x_275) + x_277));
+      float4 const x_279 = tint_symbol_16.sample(tint_symbol_17, ((x_274 * x_275) + x_277));
       nc = x_279;
       float const x_283 = color.w;
       float const x_285 = nc.w;
@@ -189,34 +189,34 @@
   float4 const x_314 = color;
   color = float4(x_313.x, x_313.y, x_313.z, x_314.w);
   float4 const x_318 = color;
-  *(tint_symbol_19) = x_318;
+  *(tint_symbol_18) = x_318;
   return;
 }
 
-fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_26 [[texture(6)]], sampler tint_symbol_27 [[sampler(4)]], texture2d<float, access::sample> tint_symbol_28 [[texture(5)]], texture2d<float, access::sample> tint_symbol_29 [[texture(8)]], sampler tint_symbol_30 [[sampler(7)]], texture2d<float, access::sample> tint_symbol_32 [[texture(3)]], sampler tint_symbol_33 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_34 [[texture(1)]], sampler tint_symbol_35 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(9)]]) {
-  thread float2 tint_symbol_20 = 0.0f;
-  thread float2 tint_symbol_21 = 0.0f;
-  thread float2 tint_symbol_22 = 0.0f;
-  thread float2 tint_symbol_23 = 0.0f;
-  thread float3 tint_symbol_24 = 0.0f;
-  thread float2 tint_symbol_25 = 0.0f;
-  thread float tint_symbol_31 = 0.0f;
-  thread float4 tint_symbol_36 = 0.0f;
-  float2 const tUV_param = tint_symbol_1.tUV_param;
-  float2 const tileID_1_param = tint_symbol_1.tileID_1_param;
-  float2 const levelUnits_param = tint_symbol_1.levelUnits_param;
-  float2 const stageUnits_1_param = tint_symbol_1.stageUnits_1_param;
-  float3 const vPosition_param = tint_symbol_1.vPosition_param;
-  float2 const vUV_param = tint_symbol_1.vUV_param;
-  tint_symbol_20 = tUV_param;
-  tint_symbol_21 = tileID_1_param;
-  tint_symbol_22 = levelUnits_param;
-  tint_symbol_23 = stageUnits_1_param;
-  tint_symbol_24 = vPosition_param;
-  tint_symbol_25 = vUV_param;
-  main_1(x_20, &(tint_symbol_20), tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, &(tint_symbol_31), tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35, &(tint_symbol_36));
-  main_out const tint_symbol_4 = {.glFragColor_1=tint_symbol_36};
-  tint_symbol_3 const tint_symbol_5 = {.glFragColor_1=tint_symbol_4.glFragColor_1};
-  return tint_symbol_5;
+main_out tint_symbol_inner(constant LeftOver& x_20, float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, thread float2* const tint_symbol_19, thread float2* const tint_symbol_20, thread float2* const tint_symbol_21, thread float2* const tint_symbol_22, thread float3* const tint_symbol_23, thread float2* const tint_symbol_24, texture2d<float, access::sample> tint_symbol_25, sampler tint_symbol_26, texture2d<float, access::sample> tint_symbol_27, texture2d<float, access::sample> tint_symbol_28, sampler tint_symbol_29, thread float* const tint_symbol_30, texture2d<float, access::sample> tint_symbol_31, sampler tint_symbol_32, texture2d<float, access::sample> tint_symbol_33, sampler tint_symbol_34, thread float4* const tint_symbol_35) {
+  *(tint_symbol_19) = tUV_param;
+  *(tint_symbol_20) = tileID_1_param;
+  *(tint_symbol_21) = levelUnits_param;
+  *(tint_symbol_22) = stageUnits_1_param;
+  *(tint_symbol_23) = vPosition_param;
+  *(tint_symbol_24) = vUV_param;
+  main_1(x_20, tint_symbol_19, tint_symbol_25, tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35);
+  main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_35)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_42 [[texture(6)]], sampler tint_symbol_43 [[sampler(4)]], texture2d<float, access::sample> tint_symbol_44 [[texture(5)]], texture2d<float, access::sample> tint_symbol_45 [[texture(8)]], sampler tint_symbol_46 [[sampler(7)]], texture2d<float, access::sample> tint_symbol_48 [[texture(3)]], sampler tint_symbol_49 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_50 [[texture(1)]], sampler tint_symbol_51 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(9)]]) {
+  thread float2 tint_symbol_36 = 0.0f;
+  thread float2 tint_symbol_37 = 0.0f;
+  thread float2 tint_symbol_38 = 0.0f;
+  thread float2 tint_symbol_39 = 0.0f;
+  thread float3 tint_symbol_40 = 0.0f;
+  thread float2 tint_symbol_41 = 0.0f;
+  thread float tint_symbol_47 = 0.0f;
+  thread float4 tint_symbol_52 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_20, tint_symbol_1.tUV_param, tint_symbol_1.tileID_1_param, tint_symbol_1.levelUnits_param, tint_symbol_1.stageUnits_1_param, tint_symbol_1.vPosition_param, tint_symbol_1.vUV_param, &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), &(tint_symbol_40), &(tint_symbol_41), tint_symbol_42, tint_symbol_43, tint_symbol_44, tint_symbol_45, tint_symbol_46, &(tint_symbol_47), tint_symbol_48, tint_symbol_49, tint_symbol_50, tint_symbol_51, &(tint_symbol_52));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/949.wgsl.expected.hlsl b/test/bug/tint/949.wgsl.expected.hlsl
index 5aca5bf..e875c0d 100644
--- a/test/bug/tint/949.wgsl.expected.hlsl
+++ b/test/bug/tint/949.wgsl.expected.hlsl
@@ -324,19 +324,20 @@
   float4 glFragColor_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float2 vMainuv_param = tint_symbol.vMainuv_param;
-  const float4 v_output1_param = tint_symbol.v_output1_param;
-  const bool gl_FrontFacing_param = tint_symbol.gl_FrontFacing_param;
-  const float2 v_uv_param = tint_symbol.v_uv_param;
-  const float4 v_output2_param = tint_symbol.v_output2_param;
+main_out main_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param) {
   vMainuv = vMainuv_param;
   v_output1 = v_output1_param;
   gl_FrontFacing = gl_FrontFacing_param;
   v_uv = v_uv_param;
   v_output2 = v_output2_param;
   main_1();
-  const main_out tint_symbol_3 = {glFragColor};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.glFragColor_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {glFragColor};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.vMainuv_param, tint_symbol.v_output1_param, tint_symbol.gl_FrontFacing_param, tint_symbol.v_uv_param, tint_symbol.v_output2_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/949.wgsl.expected.msl b/test/bug/tint/949.wgsl.expected.msl
index 3d195ff..9f56606 100644
--- a/test/bug/tint/949.wgsl.expected.msl
+++ b/test/bug/tint/949.wgsl.expected.msl
@@ -171,7 +171,7 @@
   return x_245;
 }
 
-void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* const tint_symbol_6, thread float3* const tint_symbol_7, thread float2* const tint_symbol_8, texture2d<float, access::sample> tint_symbol_9, sampler tint_symbol_10, thread float4* const tint_symbol_11, thread bool* const tint_symbol_12, thread float2* const tint_symbol_13, thread float4* const tint_symbol_14, texture2d<float, access::sample> tint_symbol_15, sampler tint_symbol_16, thread float4* const tint_symbol_17) {
+void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float2* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, thread float4* const tint_symbol_10, thread bool* const tint_symbol_11, thread float2* const tint_symbol_12, thread float4* const tint_symbol_13, texture2d<float, access::sample> tint_symbol_14, sampler tint_symbol_15, thread float4* const tint_symbol_16) {
   float4 tempTextureRead = 0.0f;
   float3 rgb = 0.0f;
   float3 output5 = 0.0f;
@@ -225,35 +225,35 @@
   float3 diffuseOutput = 0.0f;
   float3 specularOutput = 0.0f;
   float3 output3 = 0.0f;
-  *(tint_symbol_6) = 100.0f;
-  *(tint_symbol_7) = float3(0.5f, 0.5f, 0.5f);
-  float2 const x_261 = *(tint_symbol_8);
-  float4 const x_262 = tint_symbol_9.sample(tint_symbol_10, x_261);
+  *(tint_symbol_5) = 100.0f;
+  *(tint_symbol_6) = float3(0.5f, 0.5f, 0.5f);
+  float2 const x_261 = *(tint_symbol_7);
+  float4 const x_262 = tint_symbol_8.sample(tint_symbol_9, x_261);
   tempTextureRead = x_262;
   float4 const x_264 = tempTextureRead;
   float const x_273 = x_269.textureInfoName;
   rgb = (float3(x_264.x, x_264.y, x_264.z) * x_273);
   float3 const x_279 = x_269.u_cameraPosition;
-  float4 const x_282 = *(tint_symbol_11);
+  float4 const x_282 = *(tint_symbol_10);
   output5 = normalize((x_279 - float3(x_282.x, x_282.y, x_282.z)));
   output4 = float4(0.0f, 0.0f, 0.0f, 0.0f);
   uvOffset = float2(0.0f, 0.0f);
   float const x_292 = x_269.u_bumpStrength;
   normalScale = (1.0f / x_292);
-  bool const x_298 = *(tint_symbol_12);
+  bool const x_298 = *(tint_symbol_11);
   if (x_298) {
-    float2 const x_303 = *(tint_symbol_13);
+    float2 const x_303 = *(tint_symbol_12);
     x_299 = x_303;
   } else {
-    float2 const x_305 = *(tint_symbol_13);
+    float2 const x_305 = *(tint_symbol_12);
     x_299 = -(x_305);
   }
   float2 const x_307 = x_299;
   TBNUV = x_307;
-  float4 const x_310 = *(tint_symbol_14);
+  float4 const x_310 = *(tint_symbol_13);
   float const x_312 = normalScale;
   param_3 = (float3(x_310.x, x_310.y, x_310.z) * x_312);
-  float4 const x_317 = *(tint_symbol_11);
+  float4 const x_317 = *(tint_symbol_10);
   param_4 = float3(x_317.x, x_317.y, x_317.z);
   float2 const x_320 = TBNUV;
   param_5 = x_320;
@@ -284,7 +284,7 @@
   float3x3 const x_361 = invTBN;
   float3 const x_362 = output5;
   float3x3 const x_365 = invTBN;
-  float4 const x_366 = *(tint_symbol_14);
+  float4 const x_366 = *(tint_symbol_13);
   numSamples = (15.0f + (dot((x_361 * -(x_362)), (x_365 * float3(x_366.x, x_366.y, x_366.z))) * -11.0f));
   float const x_374 = numSamples;
   stepSize = (1.0f / x_374);
@@ -300,9 +300,9 @@
     } else {
       break;
     }
-    float2 const x_394 = *(tint_symbol_13);
+    float2 const x_394 = *(tint_symbol_12);
     float2 const x_395 = vCurrOffset;
-    float4 const x_397 = tint_symbol_9.sample(tint_symbol_10, (x_394 + x_395));
+    float4 const x_397 = tint_symbol_8.sample(tint_symbol_9, (x_394 + x_395));
     currSampledHeight = x_397.w;
     float const x_400 = currSampledHeight;
     float const x_401 = currRayHeight;
@@ -346,9 +346,9 @@
   parallaxOcclusion_0 = x_444;
   float2 const x_445 = parallaxOcclusion_0;
   uvOffset = x_445;
-  float2 const x_449 = *(tint_symbol_13);
+  float2 const x_449 = *(tint_symbol_12);
   float2 const x_450 = uvOffset;
-  float4 const x_452 = tint_symbol_9.sample(tint_symbol_10, (x_449 + x_450));
+  float4 const x_452 = tint_symbol_8.sample(tint_symbol_9, (x_449 + x_450));
   float const x_454 = x_269.u_bumpStrength;
   float3x3 const x_457 = TBN;
   param_8 = x_457;
@@ -357,19 +357,19 @@
   float3 const x_461 = perturbNormal_mf33_vf3_f1_(&(param_8), &(param_9), &(param_10));
   float4 const x_462 = output4;
   output4 = float4(x_461.x, x_461.y, x_461.z, x_462.w);
-  float2 const x_465 = *(tint_symbol_13);
+  float2 const x_465 = *(tint_symbol_12);
   float2 const x_466 = uvOffset;
   output6 = (x_465 + x_466);
   float2 const x_474 = output6;
-  float4 const x_475 = tint_symbol_15.sample(tint_symbol_16, x_474);
+  float4 const x_475 = tint_symbol_14.sample(tint_symbol_15, x_474);
   tempTextureRead1 = x_475;
   float4 const x_477 = tempTextureRead1;
   rgb1 = float3(x_477.x, x_477.y, x_477.z);
   float3 const x_481 = x_269.u_cameraPosition;
-  float4 const x_482 = *(tint_symbol_11);
+  float4 const x_482 = *(tint_symbol_10);
   viewDirectionW_1 = normalize((x_481 - float3(x_482.x, x_482.y, x_482.z)));
   shadow = 1.0f;
-  float const x_488 = *(tint_symbol_6);
+  float const x_488 = *(tint_symbol_5);
   glossiness_1 = (1.0f * x_488);
   diffuseBase = float3(0.0f, 0.0f, 0.0f);
   specularBase = float3(0.0f, 0.0f, 0.0f);
@@ -404,37 +404,39 @@
   float3 const x_536 = rgb1;
   diffuseOutput = (x_535 * x_536);
   float3 const x_539 = specularBase;
-  float3 const x_540 = *(tint_symbol_7);
+  float3 const x_540 = *(tint_symbol_6);
   specularOutput = (x_539 * x_540);
   float3 const x_543 = diffuseOutput;
   float3 const x_544 = specularOutput;
   output3 = (x_543 + x_544);
   float3 const x_548 = output3;
-  *(tint_symbol_17) = float4(x_548.x, x_548.y, x_548.z, 1.0f);
+  *(tint_symbol_16) = float4(x_548.x, x_548.y, x_548.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_25 [[texture(1)]], sampler tint_symbol_26 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_27 [[texture(3)]], sampler tint_symbol_28 [[sampler(2)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(6)]], constant Light0& light0 [[buffer(5)]]) {
-  thread float2 tint_symbol_18 = 0.0f;
-  thread float4 tint_symbol_19 = 0.0f;
-  thread bool tint_symbol_20 = false;
-  thread float2 tint_symbol_21 = 0.0f;
-  thread float4 tint_symbol_22 = 0.0f;
-  thread float tint_symbol_23 = 0.0f;
-  thread float3 tint_symbol_24 = 0.0f;
-  thread float4 tint_symbol_29 = 0.0f;
-  float2 const vMainuv_param = tint_symbol_1.vMainuv_param;
-  float4 const v_output1_param = tint_symbol_1.v_output1_param;
-  float2 const v_uv_param = tint_symbol_1.v_uv_param;
-  float4 const v_output2_param = tint_symbol_1.v_output2_param;
-  tint_symbol_18 = vMainuv_param;
-  tint_symbol_19 = v_output1_param;
-  tint_symbol_20 = gl_FrontFacing_param;
-  tint_symbol_21 = v_uv_param;
-  tint_symbol_22 = v_output2_param;
-  main_1(x_269, light0, &(tint_symbol_23), &(tint_symbol_24), &(tint_symbol_18), tint_symbol_25, tint_symbol_26, &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22), tint_symbol_27, tint_symbol_28, &(tint_symbol_29));
-  main_out const tint_symbol_4 = {.glFragColor_1=tint_symbol_29};
-  tint_symbol_3 const tint_symbol_5 = {.glFragColor_1=tint_symbol_4.glFragColor_1};
-  return tint_symbol_5;
+main_out tint_symbol_inner(constant LeftOver& x_269, constant Light0& light0, float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, thread float2* const tint_symbol_17, thread float4* const tint_symbol_18, thread bool* const tint_symbol_19, thread float2* const tint_symbol_20, thread float4* const tint_symbol_21, thread float* const tint_symbol_22, thread float3* const tint_symbol_23, texture2d<float, access::sample> tint_symbol_24, sampler tint_symbol_25, texture2d<float, access::sample> tint_symbol_26, sampler tint_symbol_27, thread float4* const tint_symbol_28) {
+  *(tint_symbol_17) = vMainuv_param;
+  *(tint_symbol_18) = v_output1_param;
+  *(tint_symbol_19) = gl_FrontFacing_param;
+  *(tint_symbol_20) = v_uv_param;
+  *(tint_symbol_21) = v_output2_param;
+  main_1(x_269, light0, tint_symbol_22, tint_symbol_23, tint_symbol_17, tint_symbol_24, tint_symbol_25, tint_symbol_18, tint_symbol_19, tint_symbol_20, tint_symbol_21, tint_symbol_26, tint_symbol_27, tint_symbol_28);
+  main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_28)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_36 [[texture(1)]], sampler tint_symbol_37 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_38 [[texture(3)]], sampler tint_symbol_39 [[sampler(2)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(6)]], constant Light0& light0 [[buffer(5)]]) {
+  thread float2 tint_symbol_29 = 0.0f;
+  thread float4 tint_symbol_30 = 0.0f;
+  thread bool tint_symbol_31 = false;
+  thread float2 tint_symbol_32 = 0.0f;
+  thread float4 tint_symbol_33 = 0.0f;
+  thread float tint_symbol_34 = 0.0f;
+  thread float3 tint_symbol_35 = 0.0f;
+  thread float4 tint_symbol_40 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_269, light0, tint_symbol_1.vMainuv_param, tint_symbol_1.v_output1_param, gl_FrontFacing_param, tint_symbol_1.v_uv_param, tint_symbol_1.v_output2_param, &(tint_symbol_29), &(tint_symbol_30), &(tint_symbol_31), &(tint_symbol_32), &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), tint_symbol_36, tint_symbol_37, tint_symbol_38, tint_symbol_39, &(tint_symbol_40));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/951.spvasm.expected.hlsl b/test/bug/tint/951.spvasm.expected.hlsl
index 86a56b5..7f73b88 100644
--- a/test/bug/tint/951.spvasm.expected.hlsl
+++ b/test/bug/tint/951.spvasm.expected.hlsl
@@ -53,10 +53,13 @@
   uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID;
 };
 
-[numthreads(128, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param;
+void main_inner(uint3 gl_GlobalInvocationID_param) {
   gl_GlobalInvocationID = gl_GlobalInvocationID_param;
   main_1();
+}
+
+[numthreads(128, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_GlobalInvocationID_param);
   return;
 }
diff --git a/test/bug/tint/951.spvasm.expected.msl b/test/bug/tint/951.spvasm.expected.msl
index ea5f0f8..3d877fa 100644
--- a/test/bug/tint/951.spvasm.expected.msl
+++ b/test/bug/tint/951.spvasm.expected.msl
@@ -15,8 +15,8 @@
   /* 0x0010 */ int size;
 };
 
-float getAAtOutCoords_(const device ssbA& x_20, thread uint3* const tint_symbol_3) {
-  uint const x_42 = (*(tint_symbol_3)).x;
+float getAAtOutCoords_(const device ssbA& x_20, thread uint3* const tint_symbol_2) {
+  uint const x_42 = (*(tint_symbol_2)).x;
   float const x_44 = x_20.A[x_42];
   return x_44;
 }
@@ -37,18 +37,18 @@
   return;
 }
 
-void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, thread uint3* const tint_symbol_4) {
+void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, thread uint3* const tint_symbol_3) {
   int index = 0;
   float a_1 = 0.0f;
   float param = 0.0f;
   int param_1 = 0;
   float param_2 = 0.0f;
-  uint const x_61 = (*(tint_symbol_4)).x;
+  uint const x_61 = (*(tint_symbol_3)).x;
   index = as_type<int>(x_61);
   int const x_63 = index;
   int const x_70 = x_24.size;
   if ((x_63 < x_70)) {
-    float const x_75 = getAAtOutCoords_(x_20, tint_symbol_4);
+    float const x_75 = getAAtOutCoords_(x_20, tint_symbol_3);
     a_1 = x_75;
     float const x_77 = a_1;
     param = x_77;
@@ -61,10 +61,14 @@
   return;
 }
 
+void tint_symbol_1_inner(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_4) {
+  *(tint_symbol_4) = gl_GlobalInvocationID_param;
+  main_1(x_24, x_20, x_16, tint_symbol_4);
+}
+
 kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant Uniforms& x_24 [[buffer(2)]], const device ssbA& x_20 [[buffer(1)]], device ssbOut& x_16 [[buffer(0)]]) {
   thread uint3 tint_symbol_5 = 0u;
-  tint_symbol_5 = gl_GlobalInvocationID_param;
-  main_1(x_24, x_20, x_16, &(tint_symbol_5));
+  tint_symbol_1_inner(x_24, x_20, x_16, gl_GlobalInvocationID_param, &(tint_symbol_5));
   return;
 }
 
diff --git a/test/bug/tint/977.spvasm.expected.hlsl b/test/bug/tint/977.spvasm.expected.hlsl
index 17dc1da..a3d4ec9 100644
--- a/test/bug/tint/977.spvasm.expected.hlsl
+++ b/test/bug/tint/977.spvasm.expected.hlsl
@@ -46,10 +46,13 @@
   uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param;
+void main_inner(uint3 gl_GlobalInvocationID_param) {
   gl_GlobalInvocationID = gl_GlobalInvocationID_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_GlobalInvocationID_param);
   return;
 }
diff --git a/test/bug/tint/977.spvasm.expected.msl b/test/bug/tint/977.spvasm.expected.msl
index ca78d1e..6be13c6 100644
--- a/test/bug/tint/977.spvasm.expected.msl
+++ b/test/bug/tint/977.spvasm.expected.msl
@@ -37,12 +37,12 @@
   return x_41;
 }
 
-void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_3) {
+void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_2) {
   int index = 0;
   int a_1 = 0;
   float param = 0.0f;
   float param_1 = 0.0f;
-  uint const x_54 = (*(tint_symbol_3)).x;
+  uint const x_54 = (*(tint_symbol_2)).x;
   index = as_type<int>(x_54);
   a_1 = -10;
   int const x_63 = index;
@@ -53,10 +53,14 @@
   return;
 }
 
+void tint_symbol_1_inner(device ResultMatrix& resultMatrix, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_3) {
+  *(tint_symbol_3) = gl_GlobalInvocationID_param;
+  main_1(resultMatrix, tint_symbol_3);
+}
+
 kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix& resultMatrix [[buffer(2)]]) {
   thread uint3 tint_symbol_4 = 0u;
-  tint_symbol_4 = gl_GlobalInvocationID_param;
-  main_1(resultMatrix, &(tint_symbol_4));
+  tint_symbol_1_inner(resultMatrix, gl_GlobalInvocationID_param, &(tint_symbol_4));
   return;
 }
 
diff --git a/test/bug/tint/978.wgsl.expected.hlsl b/test/bug/tint/978.wgsl.expected.hlsl
index 79a6b07..a869da4 100644
--- a/test/bug/tint/978.wgsl.expected.hlsl
+++ b/test/bug/tint/978.wgsl.expected.hlsl
@@ -15,12 +15,18 @@
   float4 color : SV_Target0;
 };
 
-tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
-  const FragmentInput fIn = {tint_symbol_1.vUv};
+FragmentOutput main_inner(FragmentInput fIn) {
   const float tint_symbol = depthMap.Sample(texSampler, fIn.vUv).x;
   const float3 color = float3(tint_symbol, tint_symbol, tint_symbol);
   FragmentOutput fOut = (FragmentOutput)0;
   fOut.color = float4(color, 1.0f);
-  const tint_symbol_3 tint_symbol_4 = {fOut.color};
-  return tint_symbol_4;
+  return fOut;
+}
+
+tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
+  const FragmentInput tint_symbol_4 = {tint_symbol_1.vUv};
+  const FragmentOutput inner_result = main_inner(tint_symbol_4);
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.color = inner_result.color;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/978.wgsl.expected.msl b/test/bug/tint/978.wgsl.expected.msl
index bf1aaac..8f62eda 100644
--- a/test/bug/tint/978.wgsl.expected.msl
+++ b/test/bug/tint/978.wgsl.expected.msl
@@ -14,13 +14,19 @@
   float4 color [[color(0)]];
 };
 
-fragment tint_symbol_3 tint_symbol(depth2d<float, access::sample> tint_symbol_5 [[texture(5)]], sampler tint_symbol_6 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  FragmentInput const fIn = {.vUv=tint_symbol_1.vUv};
+FragmentOutput tint_symbol_inner(FragmentInput fIn, depth2d<float, access::sample> tint_symbol_5, sampler tint_symbol_6) {
   float const sample = tint_symbol_5.sample(tint_symbol_6, fIn.vUv);
   float3 const color = float3(sample, sample, sample);
   FragmentOutput fOut = {};
   fOut.color = float4(color, 1.0f);
-  tint_symbol_3 const tint_symbol_4 = {.color=fOut.color};
-  return tint_symbol_4;
+  return fOut;
+}
+
+fragment tint_symbol_3 tint_symbol(depth2d<float, access::sample> tint_symbol_7 [[texture(5)]], sampler tint_symbol_8 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  FragmentInput const tint_symbol_4 = {.vUv=tint_symbol_1.vUv};
+  FragmentOutput const inner_result = tint_symbol_inner(tint_symbol_4, tint_symbol_7, tint_symbol_8);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.color = inner_result.color;
+  return wrapper_result;
 }
 
diff --git a/test/bug/tint/980.wgsl.expected.hlsl b/test/bug/tint/980.wgsl.expected.hlsl
index cbd622f..73b6373 100644
--- a/test/bug/tint/980.wgsl.expected.hlsl
+++ b/test/bug/tint/980.wgsl.expected.hlsl
@@ -14,9 +14,12 @@
   uint idx : SV_GroupIndex;
 };
 
+void main_inner(uint idx) {
+  io.Store3(0u, asuint(Bad(io.Load(12u), asfloat(io.Load3(0u)))));
+}
+
 [numthreads(1, 1, 1)]
 void main(tint_symbol_1 tint_symbol) {
-  const uint idx = tint_symbol.idx;
-  io.Store3(0u, asuint(Bad(io.Load(12u), asfloat(io.Load3(0u)))));
+  main_inner(tint_symbol.idx);
   return;
 }
diff --git a/test/bug/tint/980.wgsl.expected.msl b/test/bug/tint/980.wgsl.expected.msl
index 340d3eb..27ccfef 100644
--- a/test/bug/tint/980.wgsl.expected.msl
+++ b/test/bug/tint/980.wgsl.expected.msl
@@ -12,8 +12,12 @@
   return normalize(normal);
 }
 
-kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& io [[buffer(0)]]) {
+void tint_symbol_inner(device S& io, uint idx) {
   io.v = Bad(io.i, io.v);
+}
+
+kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& io [[buffer(0)]]) {
+  tint_symbol_inner(io, idx);
   return;
 }
 
diff --git a/test/bug/tint/992.wgsl.expected.hlsl b/test/bug/tint/992.wgsl.expected.hlsl
index f532fdf..7aace92 100644
--- a/test/bug/tint/992.wgsl.expected.hlsl
+++ b/test/bug/tint/992.wgsl.expected.hlsl
@@ -2,9 +2,15 @@
   float4 value : SV_Target0;
 };
 
-tint_symbol frag_main() {
+float4 frag_main_inner() {
   float b = 0.0f;
   float3 v = float3((b).xxx);
-  const tint_symbol tint_symbol_1 = {float4(v, 1.0f)};
-  return tint_symbol_1;
+  return float4(v, 1.0f);
+}
+
+tint_symbol frag_main() {
+  const float4 inner_result = frag_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/bug/tint/992.wgsl.expected.msl b/test/bug/tint/992.wgsl.expected.msl
index 5438783..6ecb855 100644
--- a/test/bug/tint/992.wgsl.expected.msl
+++ b/test/bug/tint/992.wgsl.expected.msl
@@ -5,10 +5,16 @@
   float4 value [[color(0)]];
 };
 
-fragment tint_symbol frag_main() {
+float4 frag_main_inner() {
   float b = 0.0f;
   float3 v = float3(b);
-  tint_symbol const tint_symbol_1 = {.value=float4(v, 1.0f)};
-  return tint_symbol_1;
+  return float4(v, 1.0f);
+}
+
+fragment tint_symbol frag_main() {
+  float4 const inner_result = frag_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/expressions/literals/-inf.spvasm.expected.hlsl b/test/expressions/literals/-inf.spvasm.expected.hlsl
index 3dc5854..d5108a6 100644
--- a/test/expressions/literals/-inf.spvasm.expected.hlsl
+++ b/test/expressions/literals/-inf.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 out_var_SV_TARGET_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {out_var_SV_TARGET};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.out_var_SV_TARGET_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
+  return wrapper_result;
 }
diff --git a/test/expressions/literals/-inf.spvasm.expected.msl b/test/expressions/literals/-inf.spvasm.expected.msl
index fbaa889..e3b3640 100644
--- a/test/expressions/literals/-inf.spvasm.expected.msl
+++ b/test/expressions/literals/-inf.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 out_var_SV_TARGET_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(-INFINITY, -INFINITY, -INFINITY, -INFINITY);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(-INFINITY, -INFINITY, -INFINITY, -INFINITY);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.out_var_SV_TARGET_1=tint_symbol_2.out_var_SV_TARGET_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
+  return wrapper_result;
 }
 
diff --git a/test/expressions/literals/inf.spvasm.expected.hlsl b/test/expressions/literals/inf.spvasm.expected.hlsl
index d973da7..04a77bd 100644
--- a/test/expressions/literals/inf.spvasm.expected.hlsl
+++ b/test/expressions/literals/inf.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 out_var_SV_TARGET_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {out_var_SV_TARGET};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.out_var_SV_TARGET_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
+  return wrapper_result;
 }
diff --git a/test/expressions/literals/inf.spvasm.expected.msl b/test/expressions/literals/inf.spvasm.expected.msl
index 37e0e9c..3135a4e 100644
--- a/test/expressions/literals/inf.spvasm.expected.msl
+++ b/test/expressions/literals/inf.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 out_var_SV_TARGET_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(INFINITY, INFINITY, INFINITY, INFINITY);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(INFINITY, INFINITY, INFINITY, INFINITY);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.out_var_SV_TARGET_1=tint_symbol_2.out_var_SV_TARGET_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
+  return wrapper_result;
 }
 
diff --git a/test/expressions/literals/nan.spvasm.expected.hlsl b/test/expressions/literals/nan.spvasm.expected.hlsl
index f3c1e53..110eb40 100644
--- a/test/expressions/literals/nan.spvasm.expected.hlsl
+++ b/test/expressions/literals/nan.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 out_var_SV_TARGET_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {out_var_SV_TARGET};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.out_var_SV_TARGET_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
+  return wrapper_result;
 }
diff --git a/test/expressions/literals/nan.spvasm.expected.msl b/test/expressions/literals/nan.spvasm.expected.msl
index df5d951..740613b 100644
--- a/test/expressions/literals/nan.spvasm.expected.msl
+++ b/test/expressions/literals/nan.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 out_var_SV_TARGET_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(NAN, NAN, NAN, NAN);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(NAN, NAN, NAN, NAN);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.out_var_SV_TARGET_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.out_var_SV_TARGET_1=tint_symbol_2.out_var_SV_TARGET_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.out_var_SV_TARGET_1 = inner_result.out_var_SV_TARGET_1;
+  return wrapper_result;
 }
 
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl b/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl
index 84bbcc3..f145efd 100644
--- a/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/002533.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_002533();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.msl b/test/intrinsics/gen/abs/002533.wgsl.expected.msl
index 84bfd68..bc614c3 100644
--- a/test/intrinsics/gen/abs/002533.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/002533.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = fabs(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_002533();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl b/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl
index 02e7240..9dc600c 100644
--- a/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/005174.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_005174();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.msl b/test/intrinsics/gen/abs/005174.wgsl.expected.msl
index 05c0490..b37f02e 100644
--- a/test/intrinsics/gen/abs/005174.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/005174.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = fabs(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_005174();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl b/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl
index d323c0c..76857d7 100644
--- a/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/1ce782.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_1ce782();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl b/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl
index 0efe442..5d5f0d2 100644
--- a/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/1ce782.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = abs(uint4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_1ce782();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl
index 2828fd7..7668024 100644
--- a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_1e9d53();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl
index 82d59b8..f5c7392 100644
--- a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = fabs(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_1e9d53();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl b/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl
index 2e781e9..8e2a891 100644
--- a/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/467cd1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_467cd1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl b/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl
index 3764d7f..be63d7e 100644
--- a/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/467cd1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = abs(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_467cd1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl b/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl
index 968877d..686c82c 100644
--- a/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/4ad288.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_4ad288();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl b/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl
index e9edc03..f9d5155 100644
--- a/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/4ad288.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = abs(1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_4ad288();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl
index c5b68f4..0a43ef6 100644
--- a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_5ad50a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl
index dd6bdd7..4cdc43b 100644
--- a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = abs(int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_5ad50a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl b/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl
index eac41c0..4be3799 100644
--- a/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/7326de.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_7326de();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.msl b/test/intrinsics/gen/abs/7326de.wgsl.expected.msl
index e17b21e..a7f8a4b 100644
--- a/test/intrinsics/gen/abs/7326de.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/7326de.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = abs(uint3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_7326de();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl
index 9432a61..a3c8098 100644
--- a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_7f28e6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl
index 471ff15..c4db275 100644
--- a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = abs(uint2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_7f28e6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl
index c26a54f..137d120 100644
--- a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_7faa9e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl
index 1738b04..074c9c0 100644
--- a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = abs(int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_7faa9e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl
index 06dbec3..d53818e 100644
--- a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_9c80a6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl
index 87ef75d..0cc64f1 100644
--- a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = abs(int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_9c80a6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl b/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl
index 4d5cfa6..4d302e4 100644
--- a/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/abs/b96037.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_b96037();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.msl b/test/intrinsics/gen/abs/b96037.wgsl.expected.msl
index a8928f1..617a92f 100644
--- a/test/intrinsics/gen/abs/b96037.wgsl.expected.msl
+++ b/test/intrinsics/gen/abs/b96037.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fabs(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   abs_b96037();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl b/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl
index 204b739..c10f0ee 100644
--- a/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/acos/489247.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_489247();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.msl b/test/intrinsics/gen/acos/489247.wgsl.expected.msl
index f0b164f..1994fcb 100644
--- a/test/intrinsics/gen/acos/489247.wgsl.expected.msl
+++ b/test/intrinsics/gen/acos/489247.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = acos(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_489247();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl
index b26a9af..eee957e 100644
--- a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_8e2acf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl
index 99d4c08..34390f0 100644
--- a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl
+++ b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = acos(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_8e2acf();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl b/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl
index ff383ea..13d02ef 100644
--- a/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/acos/a610c4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_a610c4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl b/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl
index e1d07a9..4834011 100644
--- a/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl
+++ b/test/intrinsics/gen/acos/a610c4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = acos(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_a610c4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl b/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl
index 23b6145..be3e380 100644
--- a/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/acos/dfc915.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_dfc915();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl b/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl
index 48e93aa..d6c52cf 100644
--- a/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl
+++ b/test/intrinsics/gen/acos/dfc915.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = acos(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   acos_dfc915();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl b/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl
index a486261..9afde8c 100644
--- a/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/all/986c7b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   all_986c7b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.msl b/test/intrinsics/gen/all/986c7b.wgsl.expected.msl
index 032da53..5adaeb6 100644
--- a/test/intrinsics/gen/all/986c7b.wgsl.expected.msl
+++ b/test/intrinsics/gen/all/986c7b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = all(bool4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   all_986c7b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl b/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl
index ca205bd..0650c24 100644
--- a/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/all/bd2dba.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   all_bd2dba();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl b/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl
index 6c7a2fb..938d92d 100644
--- a/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl
+++ b/test/intrinsics/gen/all/bd2dba.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = all(bool3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   all_bd2dba();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl b/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl
index 814e292..57120d6 100644
--- a/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/all/f46790.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   all_f46790();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.msl b/test/intrinsics/gen/all/f46790.wgsl.expected.msl
index 9b337fb..ffe5e06 100644
--- a/test/intrinsics/gen/all/f46790.wgsl.expected.msl
+++ b/test/intrinsics/gen/all/f46790.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = all(bool2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   all_f46790();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.hlsl b/test/intrinsics/gen/any/083428.wgsl.expected.hlsl
index b51ed1b..5a6ed63 100644
--- a/test/intrinsics/gen/any/083428.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/any/083428.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   any_083428();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.msl b/test/intrinsics/gen/any/083428.wgsl.expected.msl
index e76e344..1b403a3 100644
--- a/test/intrinsics/gen/any/083428.wgsl.expected.msl
+++ b/test/intrinsics/gen/any/083428.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = any(bool4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   any_083428();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl b/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl
index f8fcf2e..ba726f0 100644
--- a/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/any/0e3e58.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   any_0e3e58();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl b/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl
index 9933be1..8f7da07 100644
--- a/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl
+++ b/test/intrinsics/gen/any/0e3e58.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = any(bool2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   any_0e3e58();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl b/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl
index 1b84630..ab1a57a 100644
--- a/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/any/e755c1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   any_e755c1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.msl b/test/intrinsics/gen/any/e755c1.wgsl.expected.msl
index a789697..2dbc5d4 100644
--- a/test/intrinsics/gen/any/e755c1.wgsl.expected.msl
+++ b/test/intrinsics/gen/any/e755c1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = any(bool3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   any_e755c1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl
index ab91027..5eb91da 100644
--- a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   arrayLength_1588cd();
-  const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
index 3553097..562d9e2 100644
--- a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   /* 0x0000 */ uint4 buffer_size[1];
 };
 struct SB_RO {
@@ -11,23 +11,29 @@
   float4 value [[position]];
 };
 
-void arrayLength_1588cd(constant tint_symbol_2& tint_symbol_3) {
-  uint res = ((tint_symbol_3.buffer_size[0u][1u] - 0u) / 4u);
+void arrayLength_1588cd(constant tint_symbol_1& tint_symbol_2) {
+  uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u);
 }
 
-vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_1588cd(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
+  arrayLength_1588cd(tint_symbol_2);
+  return float4();
 }
 
-fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_1588cd(tint_symbol_3);
+vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_2);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_1588cd(tint_symbol_2);
   return;
 }
 
-kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_1588cd(tint_symbol_3);
+kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_1588cd(tint_symbol_2);
   return;
 }
 
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl
index 0870ebb..77b4a1e 100644
--- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   arrayLength_61b1c7();
-  const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl
index 97d2857..b5679b7 100644
--- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   /* 0x0000 */ uint4 buffer_size[1];
 };
 struct SB_RW {
@@ -11,23 +11,29 @@
   float4 value [[position]];
 };
 
-void arrayLength_61b1c7(constant tint_symbol_2& tint_symbol_3) {
-  uint res = ((tint_symbol_3.buffer_size[0u][0u] - 0u) / 4u);
+void arrayLength_61b1c7(constant tint_symbol_1& tint_symbol_2) {
+  uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
 }
 
-vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_61b1c7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
+  arrayLength_61b1c7(tint_symbol_2);
+  return float4();
 }
 
-fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_61b1c7(tint_symbol_3);
+vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_2);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_61b1c7(tint_symbol_2);
   return;
 }
 
-kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_61b1c7(tint_symbol_3);
+kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_61b1c7(tint_symbol_2);
   return;
 }
 
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl
index 65ba82d..f5167fa 100644
--- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   arrayLength_a0f5ca();
-  const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
index ed94999..dc92420 100644
--- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   /* 0x0000 */ uint4 buffer_size[1];
 };
 struct SB_RO {
@@ -11,23 +11,29 @@
   float4 value [[position]];
 };
 
-void arrayLength_a0f5ca(constant tint_symbol_2& tint_symbol_3) {
-  uint res = ((tint_symbol_3.buffer_size[0u][1u] - 0u) / 4u);
+void arrayLength_a0f5ca(constant tint_symbol_1& tint_symbol_2) {
+  uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u);
 }
 
-vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_a0f5ca(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
+  arrayLength_a0f5ca(tint_symbol_2);
+  return float4();
 }
 
-fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_a0f5ca(tint_symbol_3);
+vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_2);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_a0f5ca(tint_symbol_2);
   return;
 }
 
-kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_a0f5ca(tint_symbol_3);
+kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_a0f5ca(tint_symbol_2);
   return;
 }
 
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl
index 097ef2e..e20cd10 100644
--- a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   arrayLength_cdd123();
-  const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl
index 525920c..f35b0f4 100644
--- a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   /* 0x0000 */ uint4 buffer_size[1];
 };
 struct SB_RW {
@@ -11,23 +11,29 @@
   float4 value [[position]];
 };
 
-void arrayLength_cdd123(constant tint_symbol_2& tint_symbol_3) {
-  uint res = ((tint_symbol_3.buffer_size[0u][0u] - 0u) / 4u);
+void arrayLength_cdd123(constant tint_symbol_1& tint_symbol_2) {
+  uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
 }
 
-vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_cdd123(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
+  arrayLength_cdd123(tint_symbol_2);
+  return float4();
 }
 
-fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_cdd123(tint_symbol_3);
+vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_2);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_cdd123(tint_symbol_2);
   return;
 }
 
-kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_cdd123(tint_symbol_3);
+kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_cdd123(tint_symbol_2);
   return;
 }
 
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl
index a0ae44d..78f5396a 100644
--- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   arrayLength_cfca0a();
-  const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
index 97cbb4f..7d6d8ef 100644
--- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   /* 0x0000 */ uint4 buffer_size[1];
 };
 struct SB_RO {
@@ -11,23 +11,29 @@
   float4 value [[position]];
 };
 
-void arrayLength_cfca0a(constant tint_symbol_2& tint_symbol_3) {
-  uint res = ((tint_symbol_3.buffer_size[0u][1u] - 0u) / 4u);
+void arrayLength_cfca0a(constant tint_symbol_1& tint_symbol_2) {
+  uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u);
 }
 
-vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_cfca0a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
+  arrayLength_cfca0a(tint_symbol_2);
+  return float4();
 }
 
-fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_cfca0a(tint_symbol_3);
+vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_2);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_cfca0a(tint_symbol_2);
   return;
 }
 
-kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_cfca0a(tint_symbol_3);
+kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_cfca0a(tint_symbol_2);
   return;
 }
 
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl
index 6421d31..1191d0c 100644
--- a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   arrayLength_eb510f();
-  const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl
index d345929..131e4ba 100644
--- a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   /* 0x0000 */ uint4 buffer_size[1];
 };
 struct SB_RW {
@@ -11,23 +11,29 @@
   float4 value [[position]];
 };
 
-void arrayLength_eb510f(constant tint_symbol_2& tint_symbol_3) {
-  uint res = ((tint_symbol_3.buffer_size[0u][0u] - 0u) / 4u);
+void arrayLength_eb510f(constant tint_symbol_1& tint_symbol_2) {
+  uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
 }
 
-vertex tint_symbol vertex_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_eb510f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
+  arrayLength_eb510f(tint_symbol_2);
+  return float4();
 }
 
-fragment void fragment_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_eb510f(tint_symbol_3);
+vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_2);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_eb510f(tint_symbol_2);
   return;
 }
 
-kernel void compute_main(constant tint_symbol_2& tint_symbol_3 [[buffer(30)]]) {
-  arrayLength_eb510f(tint_symbol_3);
+kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
+  arrayLength_eb510f(tint_symbol_2);
   return;
 }
 
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl b/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl
index 8d226a3..41624bd 100644
--- a/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/asin/064953.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_064953();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.msl b/test/intrinsics/gen/asin/064953.wgsl.expected.msl
index e5ae534..da1729f 100644
--- a/test/intrinsics/gen/asin/064953.wgsl.expected.msl
+++ b/test/intrinsics/gen/asin/064953.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = asin(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_064953();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl
index 8be5141..c48dcea 100644
--- a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_7b6a44();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl
index bccf8b9..dae258d 100644
--- a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl
+++ b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = asin(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_7b6a44();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl
index 1671e3d..f99b94a 100644
--- a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_8cd9c9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl
index 9fdb5c6..5541c54 100644
--- a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl
+++ b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = asin(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_8cd9c9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl b/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl
index 8bfdcab..94ae3b9 100644
--- a/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/asin/c0c272.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_c0c272();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl b/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl
index 9467bed..41db384 100644
--- a/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl
+++ b/test/intrinsics/gen/asin/c0c272.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = asin(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   asin_c0c272();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl b/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl
index 5b056a9..4dce6ec 100644
--- a/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan/02979a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_02979a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.msl b/test/intrinsics/gen/atan/02979a.wgsl.expected.msl
index d7f68f1..35ebc9f8 100644
--- a/test/intrinsics/gen/atan/02979a.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan/02979a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = atan(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_02979a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl b/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl
index 8af96d5..3dd8341 100644
--- a/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan/331e6d.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_331e6d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl b/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl
index 2474bec..8bedb23 100644
--- a/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan/331e6d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = atan(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_331e6d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl b/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl
index e8f2079..b014aec 100644
--- a/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan/a8b696.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_a8b696();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl b/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl
index a985ca9..141ad98 100644
--- a/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan/a8b696.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = atan(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_a8b696();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl
index fa420d2..dd5218a 100644
--- a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_ad96e4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl
index 3301ece..2f9c4bf 100644
--- a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = atan(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan_ad96e4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl
index 75f4759..828d520 100644
--- a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = atan2(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan2_57fb13();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl b/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl
index b916a19..3794036 100644
--- a/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan2/96057c.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan2_96057c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl b/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl
index ca9d89e..8157ae8 100644
--- a/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan2/96057c.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = atan2(1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan2_96057c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl
index 041777f..2e20b03 100644
--- a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = atan2(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan2_a70d0d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl
index 5823a53..05e4eae 100644
--- a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl
+++ b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = atan2(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   atan2_ae713e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl
index d708e5d..1663280 100644
--- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicAdd_794055();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl
index 833e7a1..5f8f64d 100644
--- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicAdd_794055(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_fetch_add_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_fetch_add_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicAdd_794055(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicAdd_794055(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl
index 3c2521b..9429101 100644
--- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicAdd_d5db1d();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl
index ed759ba..5a9aaee 100644
--- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_fetch_add_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_fetch_add_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicAdd_d5db1d(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicAdd_d5db1d(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl
index e6df239..1a459d0 100644
--- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicAnd_34edd3();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl
index 4d0eeda..c866b0e 100644
--- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_fetch_and_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_fetch_and_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicAnd_34edd3(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicAnd_34edd3(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl
index 8681e22..43929b8 100644
--- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicAnd_45a819();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl
index d861eae..b9f9202 100644
--- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_fetch_and_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_fetch_and_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicAnd_45a819(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicAnd_45a819(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl
index 8b303c7..97cc6c4 100644
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl
@@ -12,14 +12,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicCompareExchangeWeak_89ea3b();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl
index a9f790f..b002e50 100644
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.msl
@@ -9,17 +9,21 @@
   return {prev_value, matched};
 }
 
-void atomicCompareExchangeWeak_89ea3b(threadgroup atomic_int* const tint_symbol_1) {
-  int2 res = atomicCompareExchangeWeak_1(tint_symbol_1, 1, 1);
+void atomicCompareExchangeWeak_89ea3b(threadgroup atomic_int* const tint_symbol) {
+  int2 res = atomicCompareExchangeWeak_1(tint_symbol, 1, 1);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicCompareExchangeWeak_89ea3b(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicCompareExchangeWeak_89ea3b(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl
index e2b5cf3..05cfbc2 100644
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl
@@ -12,14 +12,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicCompareExchangeWeak_b2ab2c();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl
index 1f38df8..6a94858 100644
--- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.msl
@@ -9,17 +9,21 @@
   return {prev_value, matched};
 }
 
-void atomicCompareExchangeWeak_b2ab2c(threadgroup atomic_uint* const tint_symbol_1) {
-  uint2 res = atomicCompareExchangeWeak_1(tint_symbol_1, 1u, 1u);
+void atomicCompareExchangeWeak_b2ab2c(threadgroup atomic_uint* const tint_symbol) {
+  uint2 res = atomicCompareExchangeWeak_1(tint_symbol, 1u, 1u);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicCompareExchangeWeak_b2ab2c(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicCompareExchangeWeak_b2ab2c(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl
index c3825c2..86bcffa 100644
--- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicExchange_0a5dca();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl
index 577ae12..23e3121 100644
--- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_exchange_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_exchange_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicExchange_0a5dca(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicExchange_0a5dca(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl
index ba4ae09..3efb492 100644
--- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicExchange_e114ba();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl
index ed4cb6f..abcec16 100644
--- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_exchange_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_exchange_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicExchange_e114ba(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicExchange_e114ba(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl
index c572788..f0f031f 100644
--- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicLoad_361bf1();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl
index a3a6422..327dc2a 100644
--- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_load_explicit(tint_symbol_1, memory_order_relaxed);
+void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_load_explicit(tint_symbol, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicLoad_361bf1(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicLoad_361bf1(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl
index 42c75b6..adf265f 100644
--- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicLoad_afcc03();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl
index 2bb6995..b3948d3 100644
--- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_load_explicit(tint_symbol_1, memory_order_relaxed);
+void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_load_explicit(tint_symbol, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicLoad_afcc03(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicLoad_afcc03(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl
index aa4bf69..c5602f1 100644
--- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicMax_a89cc3();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl
index 7e7430e..fbe1f22 100644
--- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_fetch_max_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_fetch_max_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicMax_a89cc3(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicMax_a89cc3(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl
index 653b3d7..0b3f279 100644
--- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicMax_beccfc();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl
index 146b1ef..5edad1c 100644
--- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_fetch_max_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_fetch_max_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicMax_beccfc(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicMax_beccfc(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl
index fc9a71b..7c71909 100644
--- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicMin_278235();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl
index 9188683..3b359fc 100644
--- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicMin_278235(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_fetch_min_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicMin_278235(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_fetch_min_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicMin_278235(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicMin_278235(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl
index 6c9d155..61d7265 100644
--- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicMin_69d383();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl
index 6261ee3..9c1e70e 100644
--- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_fetch_min_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_fetch_min_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicMin_69d383(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicMin_69d383(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl
index 2cf1260..da41f0c 100644
--- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicOr_5e3d61();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl
index 7947b57..9aea642 100644
--- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_fetch_or_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_fetch_or_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicOr_5e3d61(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicOr_5e3d61(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl
index 330cf21..2831e1b 100644
--- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicOr_d09248();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl
index 5669df1..6a0d77d 100644
--- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicOr_d09248(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_fetch_or_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicOr_d09248(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_fetch_or_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicOr_d09248(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicOr_d09248(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl
index b4552c6..4539322 100644
--- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl
@@ -9,14 +9,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicStore_726882();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl
index 55d79c0..665c40c 100644
--- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicStore_726882(threadgroup atomic_uint* const tint_symbol_1) {
-  atomic_store_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicStore_726882(threadgroup atomic_uint* const tint_symbol) {
+  atomic_store_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicStore_726882(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicStore_726882(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl
index 8f3172f..d6dbcdc 100644
--- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl
@@ -9,14 +9,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicStore_8bea94();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl
index c8f7b55..c17b49c 100644
--- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicStore_8bea94(threadgroup atomic_int* const tint_symbol_1) {
-  atomic_store_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicStore_8bea94(threadgroup atomic_int* const tint_symbol) {
+  atomic_store_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicStore_8bea94(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicStore_8bea94(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl
index 8f44365..f9cc3d2 100644
--- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     int atomic_result_1 = 0;
     InterlockedExchange(arg_0, 0, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicXor_75dc95();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl
index b87b3d2..a89935b 100644
--- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicXor_75dc95(threadgroup atomic_int* const tint_symbol_1) {
-  int res = atomic_fetch_xor_explicit(tint_symbol_1, 1, memory_order_relaxed);
+void atomicXor_75dc95(threadgroup atomic_int* const tint_symbol) {
+  int res = atomic_fetch_xor_explicit(tint_symbol, 1, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicXor_75dc95(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_int tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), int(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicXor_75dc95(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl
index d000aa3..404268d 100644
--- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl
@@ -10,14 +10,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     uint atomic_result_1 = 0u;
     InterlockedExchange(arg_0, 0u, atomic_result_1);
   }
   GroupMemoryBarrierWithGroupSync();
   atomicXor_c8e6be();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl
index b7220c7..097ce40 100644
--- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl
+++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.msl
@@ -1,17 +1,21 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void atomicXor_c8e6be(threadgroup atomic_uint* const tint_symbol_1) {
-  uint res = atomic_fetch_xor_explicit(tint_symbol_1, 1u, memory_order_relaxed);
+void atomicXor_c8e6be(threadgroup atomic_uint* const tint_symbol) {
+  uint res = atomic_fetch_xor_explicit(tint_symbol, 1u, memory_order_relaxed);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
+  {
+    atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed);
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  atomicXor_c8e6be(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup atomic_uint tint_symbol_2;
-  {
-    atomic_store_explicit(&(tint_symbol_2), uint(), memory_order_relaxed);
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  atomicXor_c8e6be(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl
index c0ebdc2..9a253c5 100644
--- a/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ceil/34064b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_34064b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl b/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl
index 5593646..b523ac6 100644
--- a/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl
+++ b/test/intrinsics/gen/ceil/34064b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = ceil(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_34064b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl
index d65855d..8d93979 100644
--- a/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ceil/678655.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_678655();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.msl b/test/intrinsics/gen/ceil/678655.wgsl.expected.msl
index fdc9079..12da11c 100644
--- a/test/intrinsics/gen/ceil/678655.wgsl.expected.msl
+++ b/test/intrinsics/gen/ceil/678655.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = ceil(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_678655();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl
index 99800e2..a95f557 100644
--- a/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ceil/96f597.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_96f597();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl b/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl
index 0e7d8d7..3e28a93 100644
--- a/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl
+++ b/test/intrinsics/gen/ceil/96f597.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = ceil(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_96f597();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl
index 6a7294f..b16ec0e 100644
--- a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_b74c16();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl
index baef3df..edcbb41 100644
--- a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl
+++ b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = ceil(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ceil_b74c16();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl
index 05273bd..03bdbec 100644
--- a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_0acf8f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl
index 601db26..a0f7e2a 100644
--- a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = clamp(float2(), float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_0acf8f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl
index 23f3143..0d63148 100644
--- a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_1a32e3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl
index faac6ae..d1bc9c0 100644
--- a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = clamp(int4(), int4(), int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_1a32e3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl
index bbaf37b..3301ab9 100644
--- a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_2bd567();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl
index 676b575..fff5d22 100644
--- a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = clamp(1.0f, 1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_2bd567();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl
index c242988..b30c1b8 100644
--- a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_2bde41();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl
index 1db29d6..a020143 100644
--- a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = clamp(float4(), float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_2bde41();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl
index 34c5070..b5181d1 100644
--- a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_548fc7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl
index 633a63a..eb8e97a 100644
--- a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = clamp(uint3(), uint3(), uint3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_548fc7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl
index 4e38819..ec1b9e0 100644
--- a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_5f0819();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl
index 22d535b..32d3883 100644
--- a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = clamp(int3(), int3(), int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_5f0819();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl
index 9997509..f8c1594 100644
--- a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_6c1749();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl
index 87c439c..79d1efd 100644
--- a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = clamp(int2(), int2(), int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_6c1749();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl
index 2073f92..a074f8d 100644
--- a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_7706d7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl
index f2bf5f6..9b13206 100644
--- a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = clamp(uint2(), uint2(), uint2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_7706d7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl
index 365ea97..867c157 100644
--- a/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/867397.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_867397();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.msl b/test/intrinsics/gen/clamp/867397.wgsl.expected.msl
index a020584..fc1a990 100644
--- a/test/intrinsics/gen/clamp/867397.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/867397.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = clamp(float3(), float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_867397();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl
index cb42fbf..34672d3 100644
--- a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_a2de25();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl
index 1e92fe7..faf58bf 100644
--- a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = clamp(1u, 1u, 1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_a2de25();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl
index eb9e17f..b04222a 100644
--- a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_b07c65();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl
index f702d9f..c863403 100644
--- a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = clamp(1, 1, 1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_b07c65();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl
index 1ee7ca0..05addc7b 100644
--- a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_bd43ce();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl
index e774770..73773c7 100644
--- a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl
+++ b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = clamp(uint4(), uint4(), uint4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   clamp_bd43ce();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl b/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl
index d6155d1..e084a63 100644
--- a/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cos/16dc15.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_16dc15();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl b/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl
index 083cc8e..e78ce75 100644
--- a/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl
+++ b/test/intrinsics/gen/cos/16dc15.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = cos(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_16dc15();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl b/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl
index b58da1b..533d022 100644
--- a/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cos/29d66d.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_29d66d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl b/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl
index 432218b..c760b40 100644
--- a/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl
+++ b/test/intrinsics/gen/cos/29d66d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = cos(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_29d66d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl b/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl
index fa0b5b2..9f1eb43 100644
--- a/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cos/c3b486.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_c3b486();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl b/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl
index c09cc02..9b68bf5 100644
--- a/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl
+++ b/test/intrinsics/gen/cos/c3b486.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = cos(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_c3b486();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl
index f90c205..71a6612 100644
--- a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_c5c28e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl
index 547bb12..85e85df 100644
--- a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl
+++ b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = cos(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cos_c5c28e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl
index 8175fae..d971375 100644
--- a/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cosh/377652.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_377652();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.msl b/test/intrinsics/gen/cosh/377652.wgsl.expected.msl
index b9dd371..cd51d35 100644
--- a/test/intrinsics/gen/cosh/377652.wgsl.expected.msl
+++ b/test/intrinsics/gen/cosh/377652.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = cosh(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_377652();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl
index 91de6c1..0274e95 100644
--- a/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cosh/c13756.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_c13756();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl b/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl
index 1cb1cc9..f4cb6c9 100644
--- a/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl
+++ b/test/intrinsics/gen/cosh/c13756.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = cosh(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_c13756();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl
index fab9283..3e1ede3 100644
--- a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_da92dd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl
index 9a53964..a59cebb 100644
--- a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl
+++ b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = cosh(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_da92dd();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl
index 7faf6ac..6701aa0 100644
--- a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_e0c1de();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl
index 30c334b..d464715 100644
--- a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl
+++ b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = cosh(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cosh_e0c1de();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl
index 7a4be61..f51aa8f 100644
--- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_0d0e46();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl
index 010ad82..d4a4bbe 100644
--- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = popcount(uint4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_0d0e46();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl
index 8c79b6e..1093720 100644
--- a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_0f7980();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl
index 78a9670..baa7886 100644
--- a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = popcount(int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_0f7980();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl
index 44cad4a..cc8e851 100644
--- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_65d2ae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl
index 7bb8d1f..b8fec94 100644
--- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = popcount(int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_65d2ae();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl
index 382a5ab..1490439 100644
--- a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_690cfc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl
index 3790052..abc54b7 100644
--- a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = popcount(uint3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_690cfc();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl
index 0983c0c..9487612 100644
--- a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_94fd81();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl
index 6648c06..3659c4a 100644
--- a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = popcount(uint2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_94fd81();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl
index daae521..cbd9641 100644
--- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_ae44f9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl
index 94e43c8..3ad8bd0 100644
--- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = popcount(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_ae44f9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl
index 8851c9a..faf8c7c 100644
--- a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_af90e2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl
index 5b4944e..2d03309 100644
--- a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = popcount(int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_af90e2();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl
index 497252a..bc4e676 100644
--- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_fd88b2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl
index 74a0621..765afb7 100644
--- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl
+++ b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = popcount(1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   countOneBits_fd88b2();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl b/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl
index a16d30c..a4c63fb 100644
--- a/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/cross/041cb0.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cross_041cb0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl b/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl
index 0b0432b..67ab3df 100644
--- a/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl
+++ b/test/intrinsics/gen/cross/041cb0.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = cross(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   cross_041cb0();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl
index dbbacfb..5f7441e 100644
--- a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   determinant_2b62ba();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl
index aa4fabf..291d916 100644
--- a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl
+++ b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = determinant(float3x3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   determinant_2b62ba();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl
index 8cd79f9..a1c3513 100644
--- a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   determinant_a0a87c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl
index 188a9d3..e3ef160 100644
--- a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl
+++ b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = determinant(float4x4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   determinant_a0a87c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl b/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl
index a9077f0..ea91292 100644
--- a/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/determinant/e19305.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   determinant_e19305();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl b/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl
index c902c38..48c7ad0 100644
--- a/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl
+++ b/test/intrinsics/gen/determinant/e19305.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = determinant(float2x2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   determinant_e19305();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl b/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl
index 2a24c71..42d0549 100644
--- a/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/distance/0657d4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_0657d4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl b/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl
index 3c80f04..1880b73 100644
--- a/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl
+++ b/test/intrinsics/gen/distance/0657d4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = distance(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_0657d4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl b/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl
index 4ca0c1f..7ed7793 100644
--- a/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/distance/9646ea.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_9646ea();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl b/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl
index b9690c3..649f037 100644
--- a/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl
+++ b/test/intrinsics/gen/distance/9646ea.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = distance(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_9646ea();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl b/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl
index 4a24941..2c2b43a 100644
--- a/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/distance/aa4055.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_aa4055();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl b/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl
index ae20aaa..6a449ac 100644
--- a/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl
+++ b/test/intrinsics/gen/distance/aa4055.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = distance(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_aa4055();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl b/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl
index 4d26388..1d0c208 100644
--- a/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/distance/cfed73.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_cfed73();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl b/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl
index d06dfb2..2649170 100644
--- a/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl
+++ b/test/intrinsics/gen/distance/cfed73.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fabs(1.0f - 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   distance_cfed73();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl b/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl
index eb3ac36..a563bee 100644
--- a/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/dot/0c577b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   dot_0c577b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl b/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl
index c354cf7..e1f5adb 100644
--- a/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl
+++ b/test/intrinsics/gen/dot/0c577b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = dot(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   dot_0c577b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl b/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl
index a3d0f45..23f4b80 100644
--- a/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/dot/883f0e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   dot_883f0e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl b/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl
index f099d39..1dfda90 100644
--- a/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl
+++ b/test/intrinsics/gen/dot/883f0e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = dot(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   dot_883f0e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl b/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl
index d208e99..d34ad4d 100644
--- a/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/dot/ba4246.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   dot_ba4246();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl b/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl
index b67deb5..517643e 100644
--- a/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl
+++ b/test/intrinsics/gen/dot/ba4246.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = dot(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   dot_ba4246();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl
index c71e07a..34e1937 100644
--- a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_0f70eb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl
index 022ea5d..83ba5fa 100644
--- a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = exp(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_0f70eb();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl b/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl
index d015d9b..ec350a7 100644
--- a/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp/1951e7.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_1951e7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl b/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl
index 2123f97..0f03e9f 100644
--- a/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp/1951e7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = exp(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_1951e7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl b/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl
index d3d3234..f8298b4 100644
--- a/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp/771fd2.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_771fd2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl b/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl
index 345a5f8..8464078 100644
--- a/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp/771fd2.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = exp(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_771fd2();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl b/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl
index 59c8f2c..0da8849 100644
--- a/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp/d98450.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_d98450();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.msl b/test/intrinsics/gen/exp/d98450.wgsl.expected.msl
index 073deec..32c830b 100644
--- a/test/intrinsics/gen/exp/d98450.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp/d98450.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = exp(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp_d98450();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl
index 93dbbe4..4277495 100644
--- a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_1f8680();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl
index 4929bd0..cde78da 100644
--- a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = exp2(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_1f8680();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl
index 458a3e1..f1964de 100644
--- a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_a9d0a7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl
index d727ef8..6202c97 100644
--- a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = exp2(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_a9d0a7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl
index 37ea6ab..77ec076 100644
--- a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_d6777c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl
index 71e0186..62f0d93 100644
--- a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = exp2(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_d6777c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl b/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl
index 46a56fc..4c0dd53 100644
--- a/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/exp2/dea523.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_dea523();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl b/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl
index 7eba951..cb5f8b7 100644
--- a/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl
+++ b/test/intrinsics/gen/exp2/dea523.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = exp2(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   exp2_dea523();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl
index 44000ac..219cd7e 100644
--- a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   faceForward_5afbd5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl
index 8e29e89..00496ff 100644
--- a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl
+++ b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = faceforward(float3(), float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   faceForward_5afbd5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl
index 7791bd0..4ffbf8f 100644
--- a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   faceForward_b316e5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl
index 1ca663a..fc6ee22 100644
--- a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl
+++ b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = faceforward(float4(), float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   faceForward_b316e5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl
index bee1a6a..079aebe 100644
--- a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   faceForward_e6908b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl
index 0136e3a..d5a6782 100644
--- a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl
+++ b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = faceforward(float2(), float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   faceForward_e6908b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl
index 99e4150..b3646e4 100644
--- a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_3bccc4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl
index 50ec31e..e75d603 100644
--- a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl
+++ b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = floor(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_3bccc4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl
index 7bce1c3..8a10c2d 100644
--- a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_5fc9ac();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl
index f50587a..8cdbf02 100644
--- a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl
+++ b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = floor(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_5fc9ac();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl
index d1657b3..fd7578a 100644
--- a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_60d7ea();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl
index 8ed07d4..c03feae 100644
--- a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl
+++ b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = floor(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_60d7ea();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl b/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl
index 95dd96e..2809aff 100644
--- a/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/floor/66f154.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_66f154();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.msl b/test/intrinsics/gen/floor/66f154.wgsl.expected.msl
index a5b9f9d..943538f 100644
--- a/test/intrinsics/gen/floor/66f154.wgsl.expected.msl
+++ b/test/intrinsics/gen/floor/66f154.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = floor(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   floor_66f154();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl
index c9733c7..534f1fb 100644
--- a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_26a7a9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl
index f9349e9..6d9c885 100644
--- a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl
+++ b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = fma(float2(), float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_26a7a9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl b/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl
index d6d98d3..c550df4 100644
--- a/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fma/6a3283.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_6a3283();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl b/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl
index f964054..070e615 100644
--- a/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl
+++ b/test/intrinsics/gen/fma/6a3283.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = fma(float4(), float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_6a3283();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl
index eead041..d4eb7cf 100644
--- a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_c10ba3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl
index 0f9a195..4a296c6 100644
--- a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl
+++ b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fma(1.0f, 1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_c10ba3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl
index 958567b..486a595 100644
--- a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_e17c5c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl
index e606075..61d7cd4 100644
--- a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl
+++ b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = fma(float3(), float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fma_e17c5c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl
index 09bd4ec..f77b849 100644
--- a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_8bc1e9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl
index b786696..c82b9ed 100644
--- a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl
+++ b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = fract(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_8bc1e9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl b/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl
index 9354ed9..a5c4e2a 100644
--- a/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fract/943cb1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_943cb1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl b/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl
index c8596ab..ec6e76a 100644
--- a/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl
+++ b/test/intrinsics/gen/fract/943cb1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = fract(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_943cb1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl b/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl
index 9b658fc..37f641a 100644
--- a/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fract/a49758.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_a49758();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.msl b/test/intrinsics/gen/fract/a49758.wgsl.expected.msl
index 1dbebec..a57d717 100644
--- a/test/intrinsics/gen/fract/a49758.wgsl.expected.msl
+++ b/test/intrinsics/gen/fract/a49758.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = fract(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_a49758();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl
index c8839c4..f8d423d 100644
--- a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_fa5c71();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl
index 03f3ed2..4997b0a 100644
--- a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl
+++ b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fract(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   fract_fa5c71();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl
index 8a964ed..fe14b50 100644
--- a/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/013caa.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_013caa();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl b/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl
index bd2fdbd..7548afc 100644
--- a/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/013caa.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float4 res = tint_frexp(float4(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_013caa();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl
index a5b0199..db4e43a 100644
--- a/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/0da285.wgsl.expected.hlsl
@@ -19,13 +19,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = 0;
   }
   GroupMemoryBarrierWithGroupSync();
   frexp_0da285();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl b/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl
index db21f10..a87b780 100644
--- a/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/0da285.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return sig;
 }
 
-void frexp_0da285(threadgroup int* const tint_symbol_1) {
-  float res = tint_frexp(1.0f, tint_symbol_1);
+void frexp_0da285(threadgroup int* const tint_symbol) {
+  float res = tint_frexp(1.0f, tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = int();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  frexp_0da285(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup int tint_symbol_2;
-  {
-    tint_symbol_2 = int();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  frexp_0da285(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl
index caf7961..64b8dfb 100644
--- a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_12f1da();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl
index cf7b0cb..735940d 100644
--- a/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/12f1da.wgsl.expected.msl
@@ -20,10 +20,16 @@
   frexp_result res = tint_frexp(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_12f1da();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl
index 446b4b9..1addf38 100644
--- a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_15edf3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl
index 0a3ab3e..930f7c6 100644
--- a/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/15edf3.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float2 res = tint_frexp(float2(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_15edf3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl
index 40eef60..10ee0c9 100644
--- a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_19ab15();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl
index b2c38fe..31ca96b 100644
--- a/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/19ab15.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float4 res = tint_frexp(float4(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_19ab15();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl
index 32b7550..27a65a0 100644
--- a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_2052e9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl
index c3c1293..169c048 100644
--- a/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/2052e9.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float4 res = tint_frexp(float4(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_2052e9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl
index 4a9c15d..e07da57 100644
--- a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.hlsl
@@ -19,13 +19,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = int3(0, 0, 0);
   }
   GroupMemoryBarrierWithGroupSync();
   frexp_40fc9b();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl
index ded1f19..a62b3dc 100644
--- a/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/40fc9b.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return sig;
 }
 
-void frexp_40fc9b(threadgroup int3* const tint_symbol_1) {
-  float3 res = tint_frexp(float3(), tint_symbol_1);
+void frexp_40fc9b(threadgroup int3* const tint_symbol) {
+  float3 res = tint_frexp(float3(), tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup int3* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = int3();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  frexp_40fc9b(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup int3 tint_symbol_2;
-  {
-    tint_symbol_2 = int3();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  frexp_40fc9b(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl
index da408a3..8227fdd 100644
--- a/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/41e931.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_41e931();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl b/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl
index 9e60f17..c0b63f4 100644
--- a/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/41e931.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float res = tint_frexp(1.0f, &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_41e931();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl
index ef6c94e..d58a5cb 100644
--- a/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/481e59.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_481e59();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl b/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl
index cb21d9b..73cf6da 100644
--- a/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/481e59.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float res = tint_frexp(1.0f, &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_481e59();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl
index 84a57f9..c22fce9 100644
--- a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_5a141e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl
index fc06cdb..fdf9ae0 100644
--- a/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/5a141e.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float3 res = tint_frexp(float3(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_5a141e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl
index eddcbc5..043f9b4 100644
--- a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_6d0058();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl
index 0c30348..79b0346 100644
--- a/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/6d0058.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float3 res = tint_frexp(float3(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_6d0058();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl
index d967d1c..58f3af8 100644
--- a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.hlsl
@@ -19,10 +19,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_6efa09();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl
index 047a0ee..083b4b1 100644
--- a/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/6efa09.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void frexp_6efa09(thread int3* const tint_symbol_2) {
-  float3 res = tint_frexp(float3(), tint_symbol_2);
+void frexp_6efa09(thread int3* const tint_symbol_1) {
+  float3 res = tint_frexp(float3(), tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread int3* const tint_symbol_2) {
+  frexp_6efa09(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread int3 tint_symbol_3 = 0;
-  frexp_6efa09(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl
index 2ca0a68..7ecb49f 100644
--- a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_a0eb3b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl
index 6ca1b90..b162f29 100644
--- a/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/a0eb3b.wgsl.expected.msl
@@ -20,10 +20,16 @@
   frexp_result_vec3 res = tint_frexp(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_a0eb3b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl
index df13399..530aa26 100644
--- a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.hlsl
@@ -19,10 +19,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_a2a617();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl
index 8ec2844..2c2d8dd 100644
--- a/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/a2a617.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void frexp_a2a617(thread int* const tint_symbol_2) {
-  float res = tint_frexp(1.0f, tint_symbol_2);
+void frexp_a2a617(thread int* const tint_symbol_1) {
+  float res = tint_frexp(1.0f, tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread int* const tint_symbol_2) {
+  frexp_a2a617(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread int tint_symbol_3 = 0;
-  frexp_a2a617(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl
index 0ab2dd2..80b8ce4 100644
--- a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.hlsl
@@ -19,13 +19,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = int2(0, 0);
   }
   GroupMemoryBarrierWithGroupSync();
   frexp_a3f940();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl
index fb24d37..556bbbf 100644
--- a/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/a3f940.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return sig;
 }
 
-void frexp_a3f940(threadgroup int2* const tint_symbol_1) {
-  float2 res = tint_frexp(float2(), tint_symbol_1);
+void frexp_a3f940(threadgroup int2* const tint_symbol) {
+  float2 res = tint_frexp(float2(), tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup int2* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = int2();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  frexp_a3f940(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup int2 tint_symbol_2;
-  {
-    tint_symbol_2 = int2();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  frexp_a3f940(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl
index 88c9565..62c2175 100644
--- a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_a951b5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl
index 56dd076..a995704 100644
--- a/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/a951b5.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float2 res = tint_frexp(float2(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_a951b5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl
index 28ee0ea..5959903 100644
--- a/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/b45525.wgsl.expected.hlsl
@@ -19,10 +19,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_b45525();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl b/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl
index 44aca08..6a0ccc9 100644
--- a/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/b45525.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void frexp_b45525(thread int4* const tint_symbol_2) {
-  float4 res = tint_frexp(float4(), tint_symbol_2);
+void frexp_b45525(thread int4* const tint_symbol_1) {
+  float4 res = tint_frexp(float4(), tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread int4* const tint_symbol_2) {
+  frexp_b45525(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread int4 tint_symbol_3 = 0;
-  frexp_b45525(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl
index 1941d2b..e0efe14 100644
--- a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.hlsl
@@ -19,13 +19,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = int4(0, 0, 0, 0);
   }
   GroupMemoryBarrierWithGroupSync();
   frexp_b87f4e();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl
index 1edfa88..bea791d 100644
--- a/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/b87f4e.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return sig;
 }
 
-void frexp_b87f4e(threadgroup int4* const tint_symbol_1) {
-  float4 res = tint_frexp(float4(), tint_symbol_1);
+void frexp_b87f4e(threadgroup int4* const tint_symbol) {
+  float4 res = tint_frexp(float4(), tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup int4* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = int4();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  frexp_b87f4e(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup int4 tint_symbol_2;
-  {
-    tint_symbol_2 = int4();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  frexp_b87f4e(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl
index 527404b..60df4fc 100644
--- a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_b9e4de();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl
index 937b87f..d850e12 100644
--- a/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/b9e4de.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float3 res = tint_frexp(float3(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_b9e4de();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl
index b264ed9..7e7f79c 100644
--- a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.hlsl
@@ -19,10 +19,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_c084e3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl
index 407ee45..bfe4559 100644
--- a/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/c084e3.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void frexp_c084e3(thread int2* const tint_symbol_2) {
-  float2 res = tint_frexp(float2(), tint_symbol_2);
+void frexp_c084e3(thread int2* const tint_symbol_1) {
+  float2 res = tint_frexp(float2(), tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread int2* const tint_symbol_2) {
+  frexp_c084e3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread int2 tint_symbol_3 = 0;
-  frexp_c084e3(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl
index 1efdb62..d03a5b1 100644
--- a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_d06c2c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl
index 8f580e1..cafa8c9 100644
--- a/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/d06c2c.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float2 res = tint_frexp(float2(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_d06c2c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl
index 18b14d4..33c3463 100644
--- a/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/d80367.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_d80367();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl b/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl
index 036089b..95ae2e8 100644
--- a/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/d80367.wgsl.expected.msl
@@ -20,10 +20,16 @@
   frexp_result_vec4 res = tint_frexp(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_d80367();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl
index 8ae0b21..cc2cde6 100644
--- a/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/db0637.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_db0637();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl b/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl
index 26b3332..e40d13d 100644
--- a/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/db0637.wgsl.expected.msl
@@ -20,10 +20,16 @@
   frexp_result_vec2 res = tint_frexp(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_db0637();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl
index 3fd7e82..636e19a 100644
--- a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.hlsl
@@ -18,10 +18,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_e061dd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl
index a773306..7ef1000 100644
--- a/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl
+++ b/test/intrinsics/gen/frexp/e061dd.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float res = tint_frexp(1.0f, &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   frexp_e061dd();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl
index 3b6a45c..37fb93e 100644
--- a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_2a6ac2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl
index 5b89993..0f71f07 100644
--- a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_2a6ac2(depth2d_ms<float, access::read> tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_2a6ac2(depth2d_ms<float, access::read> tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  ignore_2a6ac2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  ignore_2a6ac2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl
index 283d9bd..ce36295 100644
--- a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_5016e5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl
index 5580f86..c7bf190 100644
--- a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_5016e5(sampler tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_5016e5(sampler tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(sampler tint_symbol_2) {
+  ignore_5016e5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(sampler tint_symbol_3 [[sampler(0)]]) {
-  ignore_5016e5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(sampler tint_symbol_4 [[sampler(0)]]) {
diff --git a/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl
index 5df586a..4ea3772 100644
--- a/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/509355.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_509355();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/509355.wgsl.expected.msl b/test/intrinsics/gen/ignore/509355.wgsl.expected.msl
index e99a3cc..3c291f8 100644
--- a/test/intrinsics/gen/ignore/509355.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/509355.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_509355(depthcube<float, access::sample> tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_509355(depthcube<float, access::sample> tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  ignore_509355(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  ignore_509355(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl
index 2a28f20..a9112fa 100644
--- a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_51aeb7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl
index 81c39a8..d5924e3 100644
--- a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   (void) 1;
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_51aeb7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl
index c8f96cf..fd9bab2 100644
--- a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_5c9edf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl
index 046928e..6ee9b3b 100644
--- a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_5c9edf(texture2d<float, access::sample> tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_5c9edf(texture2d<float, access::sample> tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  ignore_5c9edf(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  ignore_5c9edf(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl
index 5bb770d..00a4aca 100644
--- a/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/6698df.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_6698df();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl b/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl
index bd000b2..7e1f379 100644
--- a/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/6698df.wgsl.expected.msl
@@ -9,10 +9,16 @@
   (void) 1u;
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_6698df();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl
index bef69a0..c2b9e67 100644
--- a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_ad88be();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl
index c29ad22..c609818 100644
--- a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_ad88be(depthcube_array<float, access::sample> tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_ad88be(depthcube_array<float, access::sample> tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  ignore_ad88be(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  ignore_ad88be(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl
index 9a6d9ee..f2d3935 100644
--- a/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/b469af.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_b469af();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl b/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl
index 1bd4303..fd56b58 100644
--- a/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/b469af.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_b469af(sampler tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_b469af(sampler tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(sampler tint_symbol_2) {
+  ignore_b469af(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(sampler tint_symbol_3 [[sampler(0)]]) {
-  ignore_b469af(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(sampler tint_symbol_4 [[sampler(0)]]) {
diff --git a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl
index 3df1f83..123a8a0 100644
--- a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_c8a0ee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl
index cdc9af3..bf3ca69 100644
--- a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_c8a0ee(depth2d_array<float, access::sample> tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_c8a0ee(depth2d_array<float, access::sample> tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  ignore_c8a0ee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  ignore_c8a0ee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl
index 55c4fe9..467fe18 100644
--- a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_d91a2f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl
index b34d6f5..fefc1de 100644
--- a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   (void) 1.0f;
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_d91a2f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl
index 955a25e..08e8da6 100644
--- a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_e0187b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl
index 86180d9..1af6d52 100644
--- a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void ignore_e0187b(depth2d<float, access::sample> tint_symbol_2) {
-  (void) tint_symbol_2;
+void ignore_e0187b(depth2d<float, access::sample> tint_symbol_1) {
+  (void) tint_symbol_1;
+}
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  ignore_e0187b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  ignore_e0187b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl
index 17d7a9b..0023d0c 100644
--- a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_f414a6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl
index fb990eb..149e8aa 100644
--- a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl
+++ b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   (void) bool();
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ignore_f414a6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl
index 0650ed05c..7f8b61e 100644
--- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_84407e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl
index 07861bc..a164dc9 100644
--- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl
+++ b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = rsqrt(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_84407e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl
index f2a9c1f..35554d4 100644
--- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_8f2bd2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl
index fdc64f9..c214ab5 100644
--- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl
+++ b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = rsqrt(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_8f2bd2();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl
index 793a23e..67c0a2f 100644
--- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_b197b1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl
index 65ebe3a..2c10c65 100644
--- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl
+++ b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = rsqrt(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_b197b1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl
index b9be140..ee22cf1 100644
--- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_c22347();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl
index 891de7e..e2ce89e 100644
--- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl
+++ b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = rsqrt(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   inverseSqrt_c22347();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl
index b848416..6e714e9 100644
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_34d32b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl
index d6adc3b..e1ab4d1 100644
--- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl
+++ b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool2 res = isfinite(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_34d32b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl
index b50f91f..2172678 100644
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_426f9f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl
index 7b88dba..86bfad4 100644
--- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl
+++ b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = isfinite(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_426f9f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl
index 7dee6d6..cf8469f 100644
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_8a23ad();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl
index c0f197b..aea5696 100644
--- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl
+++ b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool3 res = isfinite(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_8a23ad();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl
index 23dd93d..98228ec 100644
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_f31987();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl
index 775a799..f171041 100644
--- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl
+++ b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool4 res = isfinite(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isFinite_f31987();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl
index 96f0a8d..a3f3669 100644
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_666f2a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl
index 61fdda6..18a8dc1 100644
--- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl
+++ b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool3 res = isinf(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_666f2a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl
index 450f57e..59f1127 100644
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_7bd98f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl
index 0850ae5..a253ae2 100644
--- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl
+++ b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = isinf(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_7bd98f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl
index c7cb98b..44c9917 100644
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_7e81b5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl
index 0362bce..197b078 100644
--- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl
+++ b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool4 res = isinf(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_7e81b5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl
index 27b9849..156d470 100644
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_a46d6f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl
index e5ed9f2..47772df 100644
--- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl
+++ b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool2 res = isinf(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isInf_a46d6f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl
index 64b9ace..84ad032 100644
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool3 res = isnan(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNan_1280ab();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl
index b8a2e22..47e387b 100644
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool4 res = isnan(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNan_4d280d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl
index 932d0cc..03f0a4e 100644
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool2 res = isnan(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNan_67ecd3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl
index 728c6fd..e4b762e 100644
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNan_e4978e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl
index c94a9af..ddbe121 100644
--- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = isnan(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNan_e4978e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl
index cd32654..c88fb51 100644
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_863dcd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl
index b086c06..309085f 100644
--- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool4 res = isnormal(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_863dcd();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl
index dbf1580..3faca74 100644
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_b00ab1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl
index 6bcb392..f2a2931 100644
--- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool2 res = isnormal(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_b00ab1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl
index 8f3ddd5..94681fa 100644
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_c286b7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl
index f3e7527..a2c3952 100644
--- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool3 res = isnormal(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_c286b7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl
index 475e918..e4dffbc 100644
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_c6e880();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl
index e5b54cb..529b23a 100644
--- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl
+++ b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = isnormal(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   isNormal_c6e880();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl
index 5ba1ac5..6d596f8 100644
--- a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_a31cdc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl
index ad04640..3511264 100644
--- a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl
+++ b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = ldexp(float3(), int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_a31cdc();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl
index 73f68e0..57d331e 100644
--- a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_abd718();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl
index ca0e3a5..965657d 100644
--- a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl
+++ b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = ldexp(float2(), int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_abd718();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl
index 28e5c76..6e44999 100644
--- a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_cc9cde();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl
index 5a3b811..d36b5b4 100644
--- a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl
+++ b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = ldexp(float4(), int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_cc9cde();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl
index 91105e7..7592faa 100644
--- a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_db8b49();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl
index 650cce2..0449b75 100644
--- a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl
+++ b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = ldexp(1.0f, 1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   ldexp_db8b49();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.hlsl b/test/intrinsics/gen/length/056071.wgsl.expected.hlsl
index 5ea50c0..a3309a9 100644
--- a/test/intrinsics/gen/length/056071.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/length/056071.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_056071();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.msl b/test/intrinsics/gen/length/056071.wgsl.expected.msl
index fb40a90..963de37 100644
--- a/test/intrinsics/gen/length/056071.wgsl.expected.msl
+++ b/test/intrinsics/gen/length/056071.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = length(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_056071();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl b/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl
index cdc5661..bee0d88 100644
--- a/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/length/602a17.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_602a17();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.msl b/test/intrinsics/gen/length/602a17.wgsl.expected.msl
index 4116991..4555bbc 100644
--- a/test/intrinsics/gen/length/602a17.wgsl.expected.msl
+++ b/test/intrinsics/gen/length/602a17.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fabs(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_602a17();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl b/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl
index a875f42..21ac4ed 100644
--- a/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/length/afde8b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_afde8b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.msl b/test/intrinsics/gen/length/afde8b.wgsl.expected.msl
index 6587bc0..46a073c 100644
--- a/test/intrinsics/gen/length/afde8b.wgsl.expected.msl
+++ b/test/intrinsics/gen/length/afde8b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = length(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_afde8b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl b/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl
index 9e9b6e7..825e99c 100644
--- a/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/length/becebf.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_becebf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.msl b/test/intrinsics/gen/length/becebf.wgsl.expected.msl
index 4fa8cd2..1ffc1d2 100644
--- a/test/intrinsics/gen/length/becebf.wgsl.expected.msl
+++ b/test/intrinsics/gen/length/becebf.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = length(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   length_becebf();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl b/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl
index 357157a..d406a40 100644
--- a/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log/3da25a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_3da25a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.msl b/test/intrinsics/gen/log/3da25a.wgsl.expected.msl
index c5e7404..fcb512d 100644
--- a/test/intrinsics/gen/log/3da25a.wgsl.expected.msl
+++ b/test/intrinsics/gen/log/3da25a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = log(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_3da25a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl b/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl
index 41fcb79..3b786d2 100644
--- a/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log/7114a6.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_7114a6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.msl b/test/intrinsics/gen/log/7114a6.wgsl.expected.msl
index 72b940a..82dd4d7 100644
--- a/test/intrinsics/gen/log/7114a6.wgsl.expected.msl
+++ b/test/intrinsics/gen/log/7114a6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = log(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_7114a6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl b/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl
index 02b6dd7..dc14337 100644
--- a/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log/b2ce28.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_b2ce28();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl b/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl
index 576f8af..63978b8 100644
--- a/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl
+++ b/test/intrinsics/gen/log/b2ce28.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = log(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_b2ce28();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl b/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl
index ef0069f..5e8332f 100644
--- a/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log/f4c570.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_f4c570();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.msl b/test/intrinsics/gen/log/f4c570.wgsl.expected.msl
index a89a44b..c54fe04 100644
--- a/test/intrinsics/gen/log/f4c570.wgsl.expected.msl
+++ b/test/intrinsics/gen/log/f4c570.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = log(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log_f4c570();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl b/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl
index 6fce734..2428a28 100644
--- a/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log2/4036ed.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_4036ed();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl b/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl
index a5303eb..4cafdca 100644
--- a/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl
+++ b/test/intrinsics/gen/log2/4036ed.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = log2(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_4036ed();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl b/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl
index 9d60126..ad66bdb 100644
--- a/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log2/902988.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_902988();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.msl b/test/intrinsics/gen/log2/902988.wgsl.expected.msl
index 292fbee..a45104b 100644
--- a/test/intrinsics/gen/log2/902988.wgsl.expected.msl
+++ b/test/intrinsics/gen/log2/902988.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = log2(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_902988();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl b/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl
index 9dc101f..4d6cbf2 100644
--- a/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log2/adb233.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_adb233();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.msl b/test/intrinsics/gen/log2/adb233.wgsl.expected.msl
index 7ccc7f4..f591c83 100644
--- a/test/intrinsics/gen/log2/adb233.wgsl.expected.msl
+++ b/test/intrinsics/gen/log2/adb233.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = log2(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_adb233();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl b/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl
index 448f134..ebc6208 100644
--- a/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/log2/aea659.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_aea659();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.msl b/test/intrinsics/gen/log2/aea659.wgsl.expected.msl
index f603d99..8cc3dda 100644
--- a/test/intrinsics/gen/log2/aea659.wgsl.expected.msl
+++ b/test/intrinsics/gen/log2/aea659.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = log2(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   log2_aea659();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl b/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl
index b812b28..4e9b6d2 100644
--- a/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/0c0aae.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_0c0aae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl b/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl
index 2c07924..400ec27 100644
--- a/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/0c0aae.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = max(1u, 1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_0c0aae();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl b/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl
index 5ae78c8..69cb466 100644
--- a/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/25eafe.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_25eafe();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.msl b/test/intrinsics/gen/max/25eafe.wgsl.expected.msl
index ff0ddf5..1705907 100644
--- a/test/intrinsics/gen/max/25eafe.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/25eafe.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = max(int3(), int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_25eafe();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.hlsl b/test/intrinsics/gen/max/320815.wgsl.expected.hlsl
index 8108f19..5c38cdf 100644
--- a/test/intrinsics/gen/max/320815.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/320815.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_320815();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.msl b/test/intrinsics/gen/max/320815.wgsl.expected.msl
index 4a75eea..0f5ffdd 100644
--- a/test/intrinsics/gen/max/320815.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/320815.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = max(uint2(), uint2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_320815();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl b/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl
index 474e381..4dd3467 100644
--- a/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/44a39d.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_44a39d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.msl b/test/intrinsics/gen/max/44a39d.wgsl.expected.msl
index 1ed6073..8d18edf 100644
--- a/test/intrinsics/gen/max/44a39d.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/44a39d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fmax(1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_44a39d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl b/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl
index 496be90..6e0f354 100644
--- a/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/453e04.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_453e04();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.msl b/test/intrinsics/gen/max/453e04.wgsl.expected.msl
index 8d03301..6891927 100644
--- a/test/intrinsics/gen/max/453e04.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/453e04.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = max(uint4(), uint4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_453e04();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.hlsl b/test/intrinsics/gen/max/462050.wgsl.expected.hlsl
index 0ba3a04..4aa4f13 100644
--- a/test/intrinsics/gen/max/462050.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/462050.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_462050();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.msl b/test/intrinsics/gen/max/462050.wgsl.expected.msl
index be9f1c6..71ab570 100644
--- a/test/intrinsics/gen/max/462050.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/462050.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = fmax(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_462050();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl b/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl
index ecc4c1e..1d7ec78 100644
--- a/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/4883ac.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_4883ac();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.msl b/test/intrinsics/gen/max/4883ac.wgsl.expected.msl
index 42a266f..802c27b 100644
--- a/test/intrinsics/gen/max/4883ac.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/4883ac.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = fmax(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_4883ac();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl b/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl
index d64e608..e2189eb 100644
--- a/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/85e6bc.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_85e6bc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl b/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl
index 0728359..85b4a75 100644
--- a/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/85e6bc.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = max(int4(), int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_85e6bc();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl b/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl
index 98599e9..8d95265 100644
--- a/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/a93419.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_a93419();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.msl b/test/intrinsics/gen/max/a93419.wgsl.expected.msl
index edf5f84..ba628fd 100644
--- a/test/intrinsics/gen/max/a93419.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/a93419.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = fmax(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_a93419();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl b/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl
index 531e496..5cc620a 100644
--- a/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/b1b73a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_b1b73a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl b/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl
index 401b97f..c721edb 100644
--- a/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/b1b73a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = max(uint3(), uint3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_b1b73a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl b/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl
index ada95a0..f348871 100644
--- a/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/ce7c30.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_ce7c30();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl b/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl
index 041e137..76113dc 100644
--- a/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/ce7c30.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = max(1, 1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_ce7c30();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl b/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl
index 1f4b38e..9dd5a22 100644
--- a/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/max/e8192f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_e8192f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.msl b/test/intrinsics/gen/max/e8192f.wgsl.expected.msl
index 5c158fa..8c22fae 100644
--- a/test/intrinsics/gen/max/e8192f.wgsl.expected.msl
+++ b/test/intrinsics/gen/max/e8192f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = max(int2(), int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   max_e8192f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl b/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl
index d12d908..94f9c4b 100644
--- a/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/03c7e3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_03c7e3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl b/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl
index 0d57026..8c76659 100644
--- a/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/03c7e3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = min(int2(), int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_03c7e3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl b/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl
index 989a854..3515079 100644
--- a/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/0dc614.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_0dc614();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.msl b/test/intrinsics/gen/min/0dc614.wgsl.expected.msl
index f179d77..a38f386 100644
--- a/test/intrinsics/gen/min/0dc614.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/0dc614.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = min(uint4(), uint4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_0dc614();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl b/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl
index be28f09..a629597 100644
--- a/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/3941e1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_3941e1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.msl b/test/intrinsics/gen/min/3941e1.wgsl.expected.msl
index cc0012f..07dbf3c 100644
--- a/test/intrinsics/gen/min/3941e1.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/3941e1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = min(int4(), int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_3941e1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl b/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl
index 182b371..53ca8c0 100644
--- a/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/46c5d3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_46c5d3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl b/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl
index 5ab20e3..736c305 100644
--- a/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/46c5d3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = min(1u, 1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_46c5d3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl b/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl
index f473322..70d28cb 100644
--- a/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/82b28f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_82b28f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.msl b/test/intrinsics/gen/min/82b28f.wgsl.expected.msl
index 5b2913c..b0aac8c 100644
--- a/test/intrinsics/gen/min/82b28f.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/82b28f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = min(uint2(), uint2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_82b28f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl b/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl
index b3a98f5..b6200c1 100644
--- a/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/93cfc4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_93cfc4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl b/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl
index f102283..e6bf1c4 100644
--- a/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/93cfc4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = fmin(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_93cfc4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl b/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl
index 25e54bc..7e5e159 100644
--- a/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/a45171.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_a45171();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.msl b/test/intrinsics/gen/min/a45171.wgsl.expected.msl
index 3f9bfb1..b6a8f9e 100644
--- a/test/intrinsics/gen/min/a45171.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/a45171.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = min(int3(), int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_a45171();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl b/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl
index 225d671..cb437e2 100644
--- a/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/aa28ad.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_aa28ad();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl b/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl
index 64cfee3..c393a51 100644
--- a/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/aa28ad.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = fmin(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_aa28ad();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl b/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl
index 20a61cb..2ec6e9f 100644
--- a/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/af326d.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_af326d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.msl b/test/intrinsics/gen/min/af326d.wgsl.expected.msl
index c8d4c23..60010da 100644
--- a/test/intrinsics/gen/min/af326d.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/af326d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = fmin(1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_af326d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl b/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl
index c3e5fed..5dbaff7 100644
--- a/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/c70bb7.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_c70bb7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl b/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl
index c1968a2..6fb97f0 100644
--- a/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/c70bb7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = min(uint3(), uint3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_c70bb7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl b/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl
index 7c6d8a9..f58afc8 100644
--- a/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/c73147.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_c73147();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.msl b/test/intrinsics/gen/min/c73147.wgsl.expected.msl
index 45fd9b0..9873e62 100644
--- a/test/intrinsics/gen/min/c73147.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/c73147.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = min(1, 1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_c73147();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl b/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl
index 49d053b..de0b7ca 100644
--- a/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/min/c76fa6.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_c76fa6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl b/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl
index bed1dc6..a1dedfa 100644
--- a/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl
+++ b/test/intrinsics/gen/min/c76fa6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = fmin(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   min_c76fa6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl
index ddf487e..941e165 100644
--- a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_0c8c33();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl
index 2e50a70..dbeda2b 100644
--- a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = mix(float3(), float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_0c8c33();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl
index 6853b3e..b3c3536 100644
--- a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_1faeb1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl
index 981c9e4..b42db51 100644
--- a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = mix(float4(), float4(), 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_1faeb1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl b/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl
index cb6d6e3..2aa89fb 100644
--- a/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/2fadab.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_2fadab();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl b/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl
index 2d88484..8ad84f4 100644
--- a/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/2fadab.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = mix(float2(), float2(), 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_2fadab();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl b/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl
index ac16431..a389a34 100644
--- a/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/315264.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_315264();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.msl b/test/intrinsics/gen/mix/315264.wgsl.expected.msl
index 9f8f2d2..65c7fa3 100644
--- a/test/intrinsics/gen/mix/315264.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/315264.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = mix(float3(), float3(), 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_315264();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl
index 98fba76..f30ed99 100644
--- a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_4f0b5e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl
index 98d7121..b2a1c58 100644
--- a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = mix(1.0f, 1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_4f0b5e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl
index 8509f0e..8116870 100644
--- a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_6f8adc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl
index d205533..fcd8a42 100644
--- a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = mix(float2(), float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_6f8adc();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl b/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl
index c90ce31..622c3da 100644
--- a/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/mix/c37ede.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_c37ede();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl b/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl
index c4434f9..837f4f7 100644
--- a/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl
+++ b/test/intrinsics/gen/mix/c37ede.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = mix(float4(), float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   mix_c37ede();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl
index e8f8a17..8099d2e 100644
--- a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.hlsl
@@ -12,13 +12,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   GroupMemoryBarrierWithGroupSync();
   modf_1d59e5();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl
index 9d2ffc9..1db9b27 100644
--- a/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/1d59e5.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return fract;
 }
 
-void modf_1d59e5(threadgroup float4* const tint_symbol_1) {
-  float4 res = tint_modf(float4(), tint_symbol_1);
+void modf_1d59e5(threadgroup float4* const tint_symbol) {
+  float4 res = tint_modf(float4(), tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup float4* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = float4();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  modf_1d59e5(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup float4 tint_symbol_2;
-  {
-    tint_symbol_2 = float4();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  modf_1d59e5(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl b/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl
index 9b4570e..d1f518f 100644
--- a/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/2199f1.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_2199f1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl b/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl
index 233b91c..4acf18d 100644
--- a/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/2199f1.wgsl.expected.msl
@@ -20,10 +20,16 @@
   modf_result_vec3 res = tint_modf(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_2199f1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl b/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl
index 7661a49..99e0a30 100644
--- a/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/353f7d.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_353f7d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl b/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl
index 67dafcf..652a15a 100644
--- a/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/353f7d.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float res = tint_modf(1.0f, &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_353f7d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl
index 7d4c708..925974b 100644
--- a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_3b79d5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl
index 2881b41..dfeb8e2 100644
--- a/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/3b79d5.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float3 res = tint_modf(float3(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_3b79d5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl
index 5f97ee4..4791733 100644
--- a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_3d00e2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl
index 6b31676..273d98b 100644
--- a/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/3d00e2.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void modf_3d00e2(thread float4* const tint_symbol_2) {
-  float4 res = tint_modf(float4(), tint_symbol_2);
+void modf_3d00e2(thread float4* const tint_symbol_1) {
+  float4 res = tint_modf(float4(), tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread float4* const tint_symbol_2) {
+  modf_3d00e2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread float4 tint_symbol_3 = 0.0f;
-  modf_3d00e2(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl b/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl
index caf030c..73afb4f 100644
--- a/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/4bb324.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_4bb324();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl b/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl
index e87e26c..f808dfb 100644
--- a/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/4bb324.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float4 res = tint_modf(float4(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_4bb324();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl
index 2731d81..7428221 100644
--- a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_4fe3d9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl
index 66c8950..decfe81 100644
--- a/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/4fe3d9.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float3 res = tint_modf(float3(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_4fe3d9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl
index 0d22edf..530ecd0 100644
--- a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_51e4c6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl
index ad760d5..10b36f8 100644
--- a/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/51e4c6.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float2 res = tint_modf(float2(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_51e4c6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl b/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl
index 1fcd41c..4a7a1ee 100644
--- a/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/546e09.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_546e09();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/546e09.wgsl.expected.msl b/test/intrinsics/gen/modf/546e09.wgsl.expected.msl
index a00cf02..eb30dcd 100644
--- a/test/intrinsics/gen/modf/546e09.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/546e09.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float res = tint_modf(1.0f, &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_546e09();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl b/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl
index dbe27e6..5797b91 100644
--- a/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/5e8476.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_5e8476();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl b/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl
index b8f6053..3928eb1 100644
--- a/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/5e8476.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void modf_5e8476(thread float* const tint_symbol_2) {
-  float res = tint_modf(1.0f, tint_symbol_2);
+void modf_5e8476(thread float* const tint_symbol_1) {
+  float res = tint_modf(1.0f, tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread float* const tint_symbol_2) {
+  modf_5e8476(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread float tint_symbol_3 = 0.0f;
-  modf_5e8476(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl b/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl
index 77b05b7..9dbff28 100644
--- a/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/684d46.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_684d46();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/684d46.wgsl.expected.msl b/test/intrinsics/gen/modf/684d46.wgsl.expected.msl
index 9944617..ff5576c 100644
--- a/test/intrinsics/gen/modf/684d46.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/684d46.wgsl.expected.msl
@@ -20,10 +20,16 @@
   modf_result res = tint_modf(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_684d46();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl b/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl
index 8106372..e90b73b 100644
--- a/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/86441c.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_86441c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/86441c.wgsl.expected.msl b/test/intrinsics/gen/modf/86441c.wgsl.expected.msl
index bd5a595..1a77dc9 100644
--- a/test/intrinsics/gen/modf/86441c.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/86441c.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float2 res = tint_modf(float2(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_86441c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl b/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl
index de9a0a0..284d837 100644
--- a/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/955651.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_955651();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/955651.wgsl.expected.msl b/test/intrinsics/gen/modf/955651.wgsl.expected.msl
index 937fbe1..dd3121d 100644
--- a/test/intrinsics/gen/modf/955651.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/955651.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float3 res = tint_modf(float3(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_955651();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl
index 56faa20..e255b67 100644
--- a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_9b44a9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl
index 86541b3..8154ee6 100644
--- a/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/9b44a9.wgsl.expected.msl
@@ -20,10 +20,16 @@
   modf_result_vec4 res = tint_modf(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_9b44a9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl
index 112167d..afb6b72 100644
--- a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_9c6a91();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl
index d3c4857..5bd8a41 100644
--- a/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/9c6a91.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void modf_9c6a91(thread float2* const tint_symbol_2) {
-  float2 res = tint_modf(float2(), tint_symbol_2);
+void modf_9c6a91(thread float2* const tint_symbol_1) {
+  float2 res = tint_modf(float2(), tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread float2* const tint_symbol_2) {
+  modf_9c6a91(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread float2 tint_symbol_3 = 0.0f;
-  modf_9c6a91(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl
index 1197885..2491128 100644
--- a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_9cecfc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl
index f332522..caca996 100644
--- a/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/9cecfc.wgsl.expected.msl
@@ -17,15 +17,21 @@
   float4 value [[position]];
 };
 
-void modf_9cecfc(thread float3* const tint_symbol_2) {
-  float3 res = tint_modf(float3(), tint_symbol_2);
+void modf_9cecfc(thread float3* const tint_symbol_1) {
+  float3 res = tint_modf(float3(), tint_symbol_1);
+}
+
+float4 vertex_main_inner(thread float3* const tint_symbol_2) {
+  modf_9cecfc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main() {
   thread float3 tint_symbol_3 = 0.0f;
-  modf_9cecfc(&(tint_symbol_3));
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(&(tint_symbol_3));
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl b/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl
index 814962f..7f3ef8f 100644
--- a/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/a128ab.wgsl.expected.hlsl
@@ -12,13 +12,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = float2(0.0f, 0.0f);
   }
   GroupMemoryBarrierWithGroupSync();
   modf_a128ab();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl b/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl
index c475584..b83625b 100644
--- a/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/a128ab.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return fract;
 }
 
-void modf_a128ab(threadgroup float2* const tint_symbol_1) {
-  float2 res = tint_modf(float2(), tint_symbol_1);
+void modf_a128ab(threadgroup float2* const tint_symbol) {
+  float2 res = tint_modf(float2(), tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup float2* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = float2();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  modf_a128ab(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup float2 tint_symbol_2;
-  {
-    tint_symbol_2 = float2();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  modf_a128ab(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl b/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl
index d3ed29a..be7e072 100644
--- a/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/a54eca.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_a54eca();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl b/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl
index 94ea876..4ae68e5 100644
--- a/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/a54eca.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float2 res = tint_modf(float2(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_a54eca();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl b/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl
index 66b0014..80a527f 100644
--- a/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/bb9088.wgsl.expected.hlsl
@@ -12,13 +12,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = float3(0.0f, 0.0f, 0.0f);
   }
   GroupMemoryBarrierWithGroupSync();
   modf_bb9088();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl b/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl
index 10b3ff5..b5eda27 100644
--- a/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/bb9088.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return fract;
 }
 
-void modf_bb9088(threadgroup float3* const tint_symbol_1) {
-  float3 res = tint_modf(float3(), tint_symbol_1);
+void modf_bb9088(threadgroup float3* const tint_symbol) {
+  float3 res = tint_modf(float3(), tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup float3* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = float3();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  modf_bb9088(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup float3 tint_symbol_2;
-  {
-    tint_symbol_2 = float3();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  modf_bb9088(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl b/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl
index bffd646..cb302c3 100644
--- a/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/c87851.wgsl.expected.hlsl
@@ -17,10 +17,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_c87851();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/c87851.wgsl.expected.msl b/test/intrinsics/gen/modf/c87851.wgsl.expected.msl
index 4bcc460..aed9fd7 100644
--- a/test/intrinsics/gen/modf/c87851.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/c87851.wgsl.expected.msl
@@ -20,10 +20,16 @@
   modf_result_vec2 res = tint_modf(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_c87851();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl
index f017b20..3878a2f 100644
--- a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_d1d6f6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl
index 549d90e..b62640b 100644
--- a/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/d1d6f6.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float4 res = tint_modf(float4(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_d1d6f6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl
index b140605..535f842 100644
--- a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.hlsl
@@ -12,13 +12,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void compute_main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void compute_main_inner(uint local_invocation_index) {
   {
     arg_1 = 0.0f;
   }
   GroupMemoryBarrierWithGroupSync();
   modf_e38ae6();
+}
+
+[numthreads(1, 1, 1)]
+void compute_main(tint_symbol_1 tint_symbol) {
+  compute_main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl
index bb6ccdf..0cd2c45 100644
--- a/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/e38ae6.wgsl.expected.msl
@@ -13,17 +13,21 @@
   return fract;
 }
 
-void modf_e38ae6(threadgroup float* const tint_symbol_1) {
-  float res = tint_modf(1.0f, tint_symbol_1);
+void modf_e38ae6(threadgroup float* const tint_symbol) {
+  float res = tint_modf(1.0f, tint_symbol);
+}
+
+void compute_main_inner(uint local_invocation_index, threadgroup float* const tint_symbol_1) {
+  {
+    *(tint_symbol_1) = float();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  modf_e38ae6(tint_symbol_1);
 }
 
 kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
   threadgroup float tint_symbol_2;
-  {
-    tint_symbol_2 = float();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  modf_e38ae6(&(tint_symbol_2));
+  compute_main_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl b/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl
index dbc6c6e..d47801b 100644
--- a/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/e83560.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_e83560();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/e83560.wgsl.expected.msl b/test/intrinsics/gen/modf/e83560.wgsl.expected.msl
index 28bee9f..d99b55f 100644
--- a/test/intrinsics/gen/modf/e83560.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/e83560.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float4 res = tint_modf(float4(), &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_e83560();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl b/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl
index 7255685..3150e29 100644
--- a/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/modf/f90945.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_f90945();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/modf/f90945.wgsl.expected.msl b/test/intrinsics/gen/modf/f90945.wgsl.expected.msl
index 795e7ef..28b66fb 100644
--- a/test/intrinsics/gen/modf/f90945.wgsl.expected.msl
+++ b/test/intrinsics/gen/modf/f90945.wgsl.expected.msl
@@ -22,10 +22,16 @@
   float res = tint_modf(1.0f, &(arg_1));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   modf_f90945();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl
index f04a581..b639e63 100644
--- a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   normalize_64d8c0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl
index 3886bbd..5b15b59 100644
--- a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl
+++ b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = normalize(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   normalize_64d8c0();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl
index 273f93f..ae9ef5f 100644
--- a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   normalize_9a0aab();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl
index 85b9339..a8d81cb 100644
--- a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl
+++ b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = normalize(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   normalize_9a0aab();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl
index d024e8f..8657268 100644
--- a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   normalize_fc2ef1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl
index 09c836c..7d98555 100644
--- a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl
+++ b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = normalize(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   normalize_fc2ef1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl
index f18593b..7ab94b6 100644
--- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack2x16float_0e97b3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl
index eaf483e..62fedd2 100644
--- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl
+++ b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = as_type<uint>(half2(float2()));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack2x16float_0e97b3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl
index 8a50c57..9a8348f 100644
--- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack2x16snorm_6c169b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl
index 8acd8d9..02f839b 100644
--- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl
+++ b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = pack_float_to_snorm2x16(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack2x16snorm_6c169b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl
index 3426817..51432db 100644
--- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack2x16unorm_0f08e4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl
index 0c21bdc..d1928cc 100644
--- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl
+++ b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = pack_float_to_unorm2x16(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack2x16unorm_0f08e4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl
index 8d96abf..b543993 100644
--- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack4x8snorm_4d22e7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl
index e07cd5d..97b19e0 100644
--- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl
+++ b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = pack_float_to_snorm4x8(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack4x8snorm_4d22e7();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl
index 3ed399c..f365757 100644
--- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack4x8unorm_95c456();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl
index 91aabb4..88ccdaf 100644
--- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl
+++ b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = pack_float_to_unorm4x8(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pack4x8unorm_95c456();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl b/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl
index 6bc1871..bd4e176 100644
--- a/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pow/04a908.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_04a908();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.msl b/test/intrinsics/gen/pow/04a908.wgsl.expected.msl
index 90e90cd..2f9b2a7 100644
--- a/test/intrinsics/gen/pow/04a908.wgsl.expected.msl
+++ b/test/intrinsics/gen/pow/04a908.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = pow(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_04a908();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl b/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl
index 73d302d..85b5ee0 100644
--- a/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pow/46e029.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_46e029();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.msl b/test/intrinsics/gen/pow/46e029.wgsl.expected.msl
index 84e867b..5192fec 100644
--- a/test/intrinsics/gen/pow/46e029.wgsl.expected.msl
+++ b/test/intrinsics/gen/pow/46e029.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = pow(1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_46e029();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl
index d0d9ca9..2136c74 100644
--- a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_4a46c9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl
index caebacf..5e68719 100644
--- a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl
+++ b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = pow(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_4a46c9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl
index d4a2493..467efc3 100644
--- a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_e60ea5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl
index 7bb9fc4..bc4e9a2 100644
--- a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl
+++ b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = pow(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   pow_e60ea5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl b/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl
index 49f9b2d..ffa296c 100644
--- a/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reflect/05357e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reflect_05357e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl b/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl
index b61d634..0b22eec 100644
--- a/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl
+++ b/test/intrinsics/gen/reflect/05357e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = reflect(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reflect_05357e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl
index 7fddf4c..0fae655 100644
--- a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reflect_b61e10();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl
index c10208d..5d92438 100644
--- a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl
+++ b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = reflect(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reflect_b61e10();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl
index 82dc220..6cb1cea 100644
--- a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reflect_f47fdb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl
index 9032eca..93d48de 100644
--- a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl
+++ b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = reflect(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reflect_f47fdb();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl
index 2824c00..98105d4 100644
--- a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   refract_7e02e6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl
index e8167b9..9a66026 100644
--- a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl
+++ b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = refract(float4(), float4(), 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   refract_7e02e6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl
index f1f9c46..a3ef164 100644
--- a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   refract_cbc1d2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl
index ca4697f..3ee38ac 100644
--- a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl
+++ b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = refract(float3(), float3(), 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   refract_cbc1d2();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl b/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl
index 36cd191..075d4c6 100644
--- a/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/refract/cd905f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   refract_cd905f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl b/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl
index e3aab5f..2a3e898 100644
--- a/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl
+++ b/test/intrinsics/gen/refract/cd905f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = refract(float2(), float2(), 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   refract_cd905f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl
index b8761ac..6ee1cc4 100644
--- a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_222177();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl
index 525e9d1..a5df325 100644
--- a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = reverse_bits(int2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_222177();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl
index b76eaa4..4923fa2 100644
--- a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_35fea9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl
index 8aee00a..ae0cd42 100644
--- a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = reverse_bits(uint4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_35fea9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl
index ecc8655..b3c0a73 100644
--- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_4dbd6f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl
index 966cfe2..6025abd 100644
--- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = reverse_bits(int4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_4dbd6f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl
index 87d8b37..03edd62 100644
--- a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_7c4269();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl
index ed2c1db..2fc2f84 100644
--- a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = reverse_bits(1);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_7c4269();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl
index 3e7f0e8..c2c6fca 100644
--- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_a6ccd4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl
index 72fbdb0..dd61298 100644
--- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = reverse_bits(uint3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_a6ccd4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl
index 0758ae9..c7f6c48 100644
--- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_c21bc1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl
index 442fcae..dd74edb 100644
--- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = reverse_bits(int3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_c21bc1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl
index 423812b..b8948c5 100644
--- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_e1f4c1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl
index 069f1d2..caf2e65 100644
--- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = reverse_bits(uint2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_e1f4c1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl
index 75c1d48..cb3c52b 100644
--- a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_e31adf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl
index 14abcb8..e80be35 100644
--- a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl
+++ b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = reverse_bits(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   reverseBits_e31adf();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl b/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl
index 604e3a3..5645e98 100644
--- a/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/round/106c0b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_106c0b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.msl b/test/intrinsics/gen/round/106c0b.wgsl.expected.msl
index 280de5d..7acb365 100644
--- a/test/intrinsics/gen/round/106c0b.wgsl.expected.msl
+++ b/test/intrinsics/gen/round/106c0b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = rint(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_106c0b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl b/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl
index 29369ed..d03c4a4 100644
--- a/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/round/1c7897.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_1c7897();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.msl b/test/intrinsics/gen/round/1c7897.wgsl.expected.msl
index d9c7757..305f9fe 100644
--- a/test/intrinsics/gen/round/1c7897.wgsl.expected.msl
+++ b/test/intrinsics/gen/round/1c7897.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = rint(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_1c7897();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl b/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl
index 0f0c0d1..684c4c7 100644
--- a/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/round/52c84d.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_52c84d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.msl b/test/intrinsics/gen/round/52c84d.wgsl.expected.msl
index 06d2683..3f93205 100644
--- a/test/intrinsics/gen/round/52c84d.wgsl.expected.msl
+++ b/test/intrinsics/gen/round/52c84d.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = rint(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_52c84d();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl b/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl
index 2012d8f..451fc1c 100644
--- a/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/round/9edc38.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_9edc38();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.msl b/test/intrinsics/gen/round/9edc38.wgsl.expected.msl
index f970449..229b708 100644
--- a/test/intrinsics/gen/round/9edc38.wgsl.expected.msl
+++ b/test/intrinsics/gen/round/9edc38.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = rint(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   round_9edc38();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl b/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl
index f15e35e..b410bbf 100644
--- a/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/00b848.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_00b848();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.msl b/test/intrinsics/gen/select/00b848.wgsl.expected.msl
index 4541cbd..03f191d 100644
--- a/test/intrinsics/gen/select/00b848.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/00b848.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = select(int2(), int2(), bool2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_00b848();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl b/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl
index d3d8316..5708773 100644
--- a/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/01e2cd.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_01e2cd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl b/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl
index 57e3844..2cef21a 100644
--- a/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/01e2cd.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = select(int3(), int3(), bool3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_01e2cd();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl b/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl
index 61f6ecf..b7aa284 100644
--- a/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/087ea4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_087ea4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.msl b/test/intrinsics/gen/select/087ea4.wgsl.expected.msl
index 4dc4600..05ab4d2 100644
--- a/test/intrinsics/gen/select/087ea4.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/087ea4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = select(uint4(), uint4(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_087ea4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl b/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl
index ff79547..89f728d 100644
--- a/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/1e960b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_1e960b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.msl b/test/intrinsics/gen/select/1e960b.wgsl.expected.msl
index ed4c2d6..08587c9 100644
--- a/test/intrinsics/gen/select/1e960b.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/1e960b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = select(uint2(), uint2(), bool2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_1e960b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl b/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl
index b03ee5a..2c94570 100644
--- a/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/266aff.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_266aff();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.msl b/test/intrinsics/gen/select/266aff.wgsl.expected.msl
index 167dca3..b822f68 100644
--- a/test/intrinsics/gen/select/266aff.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/266aff.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = select(float2(), float2(), bool2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_266aff();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl b/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl
index cf43395..16a5d8c 100644
--- a/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/28a27e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_28a27e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.msl b/test/intrinsics/gen/select/28a27e.wgsl.expected.msl
index 813376f..6571af4 100644
--- a/test/intrinsics/gen/select/28a27e.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/28a27e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = select(uint3(), uint3(), bool3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_28a27e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl b/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl
index 7708a73..913c1b9 100644
--- a/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/3c25ce.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_3c25ce();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl b/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl
index bea0da0..a0aea42 100644
--- a/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/3c25ce.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool3 res = select(bool3(), bool3(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_3c25ce();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl b/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl
index 61ca130..1f21685 100644
--- a/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/416e14.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_416e14();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.msl b/test/intrinsics/gen/select/416e14.wgsl.expected.msl
index 728f9e1..798efaa 100644
--- a/test/intrinsics/gen/select/416e14.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/416e14.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = select(1.0f, 1.0f, bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_416e14();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl b/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl
index 1ce5cf3..716ee85 100644
--- a/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/51b047.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_51b047();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.msl b/test/intrinsics/gen/select/51b047.wgsl.expected.msl
index 5cbeb2e..e6309d0 100644
--- a/test/intrinsics/gen/select/51b047.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/51b047.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint2 res = select(uint2(), uint2(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_51b047();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.hlsl b/test/intrinsics/gen/select/713567.wgsl.expected.hlsl
index 354a836..ee5426d 100644
--- a/test/intrinsics/gen/select/713567.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/713567.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_713567();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.msl b/test/intrinsics/gen/select/713567.wgsl.expected.msl
index b3c19d4..3130a7e 100644
--- a/test/intrinsics/gen/select/713567.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/713567.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = select(float4(), float4(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_713567();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl b/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl
index b7c86be..bc48941 100644
--- a/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/78be5f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_78be5f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.msl b/test/intrinsics/gen/select/78be5f.wgsl.expected.msl
index 3565145..1cce498 100644
--- a/test/intrinsics/gen/select/78be5f.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/78be5f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = select(float3(), float3(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_78be5f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl b/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl
index 662d56b..c3071bb 100644
--- a/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/80a9a9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_80a9a9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl b/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl
index 0e8e4b9..dcc8d5d 100644
--- a/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/80a9a9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool3 res = select(bool3(), bool3(), bool3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_80a9a9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl b/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl
index 84eb1a1..2ec6462 100644
--- a/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/8fa62c.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_8fa62c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl b/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl
index 4e3abd8..f9d0f6f 100644
--- a/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/8fa62c.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int3 res = select(int3(), int3(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_8fa62c();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl b/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl
index 04477fa..603d18a 100644
--- a/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/99f883.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_99f883();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.msl b/test/intrinsics/gen/select/99f883.wgsl.expected.msl
index fde3d24..5e9591a 100644
--- a/test/intrinsics/gen/select/99f883.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/99f883.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint res = select(1u, 1u, bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_99f883();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl b/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl
index 9ffc729..be8b47a 100644
--- a/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/a2860e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_a2860e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.msl b/test/intrinsics/gen/select/a2860e.wgsl.expected.msl
index 992519d..2d2e322 100644
--- a/test/intrinsics/gen/select/a2860e.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/a2860e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = select(int4(), int4(), bool4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_a2860e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl b/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl
index 3f413fc..800300c 100644
--- a/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/ab069f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_ab069f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.msl b/test/intrinsics/gen/select/ab069f.wgsl.expected.msl
index 8994816..c947937 100644
--- a/test/intrinsics/gen/select/ab069f.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/ab069f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int4 res = select(int4(), int4(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_ab069f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl b/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl
index 010d8fb..030d205 100644
--- a/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/b04721.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_b04721();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.msl b/test/intrinsics/gen/select/b04721.wgsl.expected.msl
index 9be5c2c..7a21e91 100644
--- a/test/intrinsics/gen/select/b04721.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/b04721.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint3 res = select(uint3(), uint3(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_b04721();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl b/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl
index ad6bd7a..079cec6 100644
--- a/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/bb447f.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_bb447f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.msl b/test/intrinsics/gen/select/bb447f.wgsl.expected.msl
index c3ab110..d242cd5 100644
--- a/test/intrinsics/gen/select/bb447f.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/bb447f.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int2 res = select(int2(), int2(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_bb447f();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl b/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl
index 4ab9d4e..3c84b8f 100644
--- a/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/bb8aae.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_bb8aae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl b/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl
index 23ef980..41a021b 100644
--- a/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/bb8aae.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = select(float4(), float4(), bool4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_bb8aae();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl b/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl
index ff86e24..fcfca7d 100644
--- a/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/bf3d29.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_bf3d29();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl b/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl
index 81b1d17..ba58d5b 100644
--- a/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/bf3d29.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = select(float2(), float2(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_bf3d29();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl b/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl
index 10235c0..9cf520f 100644
--- a/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/c31f9e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_c31f9e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl b/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl
index f348bbb..bd1d3b9 100644
--- a/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/c31f9e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool res = select(bool(), bool(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_c31f9e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl b/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl
index 553018f..d5e8edc 100644
--- a/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/c41bd1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_c41bd1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl b/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl
index 4d9b08d..0f8e67b 100644
--- a/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/c41bd1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool4 res = select(bool4(), bool4(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_c41bd1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl
index d85b83c..ef96f44 100644
--- a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_c4a4ef();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl
index 5de96a5..a963df9 100644
--- a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.msl
@@ -9,10 +9,16 @@
   uint4 res = select(uint4(), uint4(), bool4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_c4a4ef();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl b/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl
index cc33bff..27eeed4 100644
--- a/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/cb9301.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_cb9301();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.msl b/test/intrinsics/gen/select/cb9301.wgsl.expected.msl
index 975962f..4e4d9bd 100644
--- a/test/intrinsics/gen/select/cb9301.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/cb9301.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool2 res = select(bool2(), bool2(), bool2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_cb9301();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl b/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl
index 58f8a7c..20e3edf 100644
--- a/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/e3e028.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_e3e028();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.msl b/test/intrinsics/gen/select/e3e028.wgsl.expected.msl
index 659778e..56f88a6 100644
--- a/test/intrinsics/gen/select/e3e028.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/e3e028.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool4 res = select(bool4(), bool4(), bool4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_e3e028();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl b/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl
index 8fe538c..8dd54f2 100644
--- a/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/ebfea2.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_ebfea2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl b/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl
index a4c6a13..df91f64 100644
--- a/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/ebfea2.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = select(float3(), float3(), bool3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_ebfea2();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl b/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl
index 8f13427..e550b58 100644
--- a/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/ed8a15.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_ed8a15();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl b/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl
index e2ec08e..75aa87d 100644
--- a/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/ed8a15.wgsl.expected.msl
@@ -9,10 +9,16 @@
   int res = select(1, 1, bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_ed8a15();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl b/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl
index 7d8ae9d..05fa3bc 100644
--- a/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/select/fb7e53.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_fb7e53();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl b/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl
index 7d321fb..ced4250 100644
--- a/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl
+++ b/test/intrinsics/gen/select/fb7e53.wgsl.expected.msl
@@ -9,10 +9,16 @@
   bool2 res = select(bool2(), bool2(), bool());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   select_fb7e53();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl b/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl
index fd8a732..64d4d76 100644
--- a/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sign/159665.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_159665();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.msl b/test/intrinsics/gen/sign/159665.wgsl.expected.msl
index 63ef07d..4c75814 100644
--- a/test/intrinsics/gen/sign/159665.wgsl.expected.msl
+++ b/test/intrinsics/gen/sign/159665.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = sign(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_159665();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl b/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl
index 7564ac1..129de07 100644
--- a/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sign/b8f634.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_b8f634();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl b/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl
index ede9127..b5b2a47 100644
--- a/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl
+++ b/test/intrinsics/gen/sign/b8f634.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = sign(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_b8f634();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl b/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl
index 0a1b005..e6a06fa 100644
--- a/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sign/d065d8.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_d065d8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl b/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl
index dfe0aa9..f445351 100644
--- a/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl
+++ b/test/intrinsics/gen/sign/d065d8.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = sign(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_d065d8();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl b/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl
index e01d548..e55a8ac 100644
--- a/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sign/dd790e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_dd790e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl b/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl
index 756a812..a3bb007 100644
--- a/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl
+++ b/test/intrinsics/gen/sign/dd790e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = sign(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sign_dd790e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl b/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl
index f845909..5fc47fa 100644
--- a/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sin/01f241.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_01f241();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.msl b/test/intrinsics/gen/sin/01f241.wgsl.expected.msl
index 656086c..7f4629a 100644
--- a/test/intrinsics/gen/sin/01f241.wgsl.expected.msl
+++ b/test/intrinsics/gen/sin/01f241.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = sin(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_01f241();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl b/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl
index 17a525d..d9ccc2e 100644
--- a/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sin/4e3979.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_4e3979();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl b/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl
index fbce764..5677bfe 100644
--- a/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl
+++ b/test/intrinsics/gen/sin/4e3979.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = sin(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_4e3979();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl b/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl
index c83dc4e..05a839b 100644
--- a/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sin/b78c91.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_b78c91();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl b/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl
index 2b5020f..2a253a7 100644
--- a/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl
+++ b/test/intrinsics/gen/sin/b78c91.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = sin(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_b78c91();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl
index 6c295aa..934d5c6 100644
--- a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_fc8bc4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl
index 63129b8..d0767a6 100644
--- a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl
+++ b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = sin(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sin_fc8bc4();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl
index 1d1fab6..de05681 100644
--- a/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sinh/445e33.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_445e33();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl b/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl
index 78d2be0..ee93c86 100644
--- a/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl
+++ b/test/intrinsics/gen/sinh/445e33.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = sinh(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_445e33();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl
index fbb79e5..4fadd51 100644
--- a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_7bb598();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl
index 79ca78d..5fa463b 100644
--- a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl
+++ b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = sinh(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_7bb598();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl
index 5a04423..9bb2731 100644
--- a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_b9860e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl
index 2122b18..5a9085d 100644
--- a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl
+++ b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = sinh(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_b9860e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl
index 33d8036..7aeaa65 100644
--- a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_c9a5eb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl
index 27475f4..9526f42 100644
--- a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl
+++ b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = sinh(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sinh_c9a5eb();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl
index f714d05..224772d 100644
--- a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_5f615b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl
index 8ab52a3..cad5dfe 100644
--- a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl
+++ b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = smoothstep(float4(), float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_5f615b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl
index bd611c7..443e4a7 100644
--- a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_658be3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl
index 097061c..7401ef0 100644
--- a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl
+++ b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = smoothstep(float3(), float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_658be3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl
index 236ec14..f438264 100644
--- a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_c11eef();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl
index 2d1f4a4..314e298 100644
--- a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl
+++ b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = smoothstep(float2(), float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_c11eef();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl
index c8b54f7..28e5a81 100644
--- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_cb0bfb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl
index dda677c..12a37fb 100644
--- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl
+++ b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = smoothstep(1.0f, 1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   smoothStep_cb0bfb();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl
index 99eda3e..ff521bb 100644
--- a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_20c74e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl
index c8dff4a..81184ee 100644
--- a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl
+++ b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = sqrt(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_20c74e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl
index d829840..077c121 100644
--- a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_8c7024();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl
index f36c0bc..3636dcc 100644
--- a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl
+++ b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = sqrt(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_8c7024();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl
index 72054cf..58f339e 100644
--- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_aa0d7a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl
index d0b0a61..4462596 100644
--- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl
+++ b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = sqrt(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_aa0d7a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl
index adf5402..5bbd797 100644
--- a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_f8c59a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl
index b39cb0c..b61342c 100644
--- a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl
+++ b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = sqrt(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   sqrt_f8c59a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl b/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl
index be42d83..baff281 100644
--- a/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/step/0b073b.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_0b073b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.msl b/test/intrinsics/gen/step/0b073b.wgsl.expected.msl
index b5d5d02..83bba3b 100644
--- a/test/intrinsics/gen/step/0b073b.wgsl.expected.msl
+++ b/test/intrinsics/gen/step/0b073b.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = step(1.0f, 1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_0b073b();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl b/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl
index cffd53c..d9d8c6c 100644
--- a/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/step/19accd.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_19accd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.msl b/test/intrinsics/gen/step/19accd.wgsl.expected.msl
index 51c0088..fac1cc2 100644
--- a/test/intrinsics/gen/step/19accd.wgsl.expected.msl
+++ b/test/intrinsics/gen/step/19accd.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = step(float2(), float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_19accd();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.hlsl b/test/intrinsics/gen/step/334303.wgsl.expected.hlsl
index 3020166..e407c78 100644
--- a/test/intrinsics/gen/step/334303.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/step/334303.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_334303();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.msl b/test/intrinsics/gen/step/334303.wgsl.expected.msl
index 82916a6..e6d7c41 100644
--- a/test/intrinsics/gen/step/334303.wgsl.expected.msl
+++ b/test/intrinsics/gen/step/334303.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = step(float3(), float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_334303();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl b/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl
index ee8706a..17e2f9d 100644
--- a/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/step/e2b337.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_e2b337();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.msl b/test/intrinsics/gen/step/e2b337.wgsl.expected.msl
index cb536db..8463933 100644
--- a/test/intrinsics/gen/step/e2b337.wgsl.expected.msl
+++ b/test/intrinsics/gen/step/e2b337.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = step(float4(), float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   step_e2b337();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl b/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl
index 2d1c99d..11e40a2 100644
--- a/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tan/244e2a.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_244e2a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl b/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl
index d1b34a4..962c601 100644
--- a/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl
+++ b/test/intrinsics/gen/tan/244e2a.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = tan(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_244e2a();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl b/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl
index eb6676d..b7cf9e1 100644
--- a/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tan/2f030e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_2f030e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl b/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl
index 81c0766..7a69f2c 100644
--- a/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl
+++ b/test/intrinsics/gen/tan/2f030e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = tan(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_2f030e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl b/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl
index 8c0c860..20c8c76 100644
--- a/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tan/7ea104.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_7ea104();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl b/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl
index 89db1ac..45a9ab3 100644
--- a/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl
+++ b/test/intrinsics/gen/tan/7ea104.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = tan(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_7ea104();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl
index e916d83..2fce0cd 100644
--- a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_8ce3e9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl
index e460fae..bdb9257 100644
--- a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl
+++ b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = tan(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tan_8ce3e9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl
index 1a2fc3f..f74f2ad 100644
--- a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_5663c5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl
index 5a82feb..664ac5b 100644
--- a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl
+++ b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = tanh(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_5663c5();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl
index ad42edb..be84750 100644
--- a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_5724b3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl
index 878775f..9c87d67 100644
--- a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl
+++ b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = tanh(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_5724b3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl
index 8f371b3..7470a05 100644
--- a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_9f9fb9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl
index b93aca0..7a3fb85 100644
--- a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl
+++ b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = tanh(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_9f9fb9();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl
index bbf0e4a..27b68c0 100644
--- a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_c15fdb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl
index be4a4b6..9b20d17 100644
--- a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl
+++ b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = tanh(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   tanh_c15fdb();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl
index 73b274c..bf45f40 100644
--- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_002b2a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl
index f0a2f46..73f998f 100644
--- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_002b2a(texture1d<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_002b2a(texture1d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_002b2a(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_002b2a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl
index 1c7d1f7..60766e2 100644
--- a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_012b82();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl
index 4f64e04..5a6992c 100644
--- a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_012b82(texture2d_array<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_012b82(texture2d_array<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_012b82(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_012b82(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl
index 45a46bb..7bfb276 100644
--- a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_08753d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl
index 0759078..881c7e2 100644
--- a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_08753d(texture1d<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_08753d(texture1d<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_08753d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_08753d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl
index bcecfaa..6a88619 100644
--- a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_08a62e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl
index f0f7937..0778330 100644
--- a/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/08a62e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_08a62e(texture1d<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_08a62e(texture1d<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureDimensions_08a62e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_08a62e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl
index e5c665f..42b13d0 100644
--- a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0a5fcf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl
index c832aaa..cbcbad0 100644
--- a/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0a5fcf.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0a5fcf(texture2d_array<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_0a5fcf(texture2d_array<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureDimensions_0a5fcf(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0a5fcf(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl
index b45ebd3..b6704d7 100644
--- a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0bab57();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl
index a67843f5..96bd0b8 100644
--- a/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0bab57.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0bab57(texture3d<int, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_0bab57(texture3d<int, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureDimensions_0bab57(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0bab57(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl
index e006c2b..573849a 100644
--- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0c4772();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl
index c939d4c..640ff51 100644
--- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0c4772(texture3d<float, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_0c4772(texture3d<float, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_0c4772(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0c4772(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl
index beb2252..8c733a2 100644
--- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0cce40();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl
index 7fb64de..58d7d3e 100644
--- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0cce40(texture1d<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_0cce40(texture1d<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_0cce40(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0cce40(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl
index b992d4a..301fb17 100644
--- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0cf2ff();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl
index 699cdc3..676d1ed 100644
--- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0cf2ff(texture2d<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_0cf2ff(texture2d<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_0cf2ff(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0cf2ff(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl
index dc8a03d..787e81a 100644
--- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0d8b7e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl
index 9c78642..365e34e 100644
--- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0d8b7e(texture2d_array<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_0d8b7e(texture2d_array<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_0d8b7e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0d8b7e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl
index 2c67f2a..ab26ea3 100644
--- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0e32ee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl
index 72b3ab6..ab2c649 100644
--- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0e32ee(texture3d<uint, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_0e32ee(texture3d<uint, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_0e32ee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0e32ee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl
index 95257b8..6a15db4 100644
--- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_0f3c50();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl
index 88a1190..20a7f39 100644
--- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_0f3c50(texture2d_array<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_0f3c50(texture2d_array<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_0f3c50(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_0f3c50(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl
index 9fe6d63..3257271 100644
--- a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1147d6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl
index 649e4f4..bb3dcd0 100644
--- a/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1147d6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1147d6(texture2d_array<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_1147d6(texture2d_array<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureDimensions_1147d6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1147d6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl
index facdaf8..0700fb0 100644
--- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1191a5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl
index fbcd00a..f6268f2 100644
--- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1191a5(texture2d<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_1191a5(texture2d<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_1191a5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1191a5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl
index c5b8ecc..2076c84 100644
--- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_12c9bb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl
index b57d4e7..b3f3f59 100644
--- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_12c9bb(depth2d<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_12c9bb(depth2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_12c9bb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_12c9bb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl
index f474a68..bbda25c 100644
--- a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_147998();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl
index 24a7d9b..c350f80 100644
--- a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_147998(texture2d<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_147998(texture2d<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_147998(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_147998(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl
index 262a1f4..8478f6a 100644
--- a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_16036c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl
index 7d8a425..ed7ed8d 100644
--- a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_16036c(texture2d_array<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_16036c(texture2d_array<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_16036c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_16036c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl
index c7695cc..9575a8a 100644
--- a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_168fcc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl
index 52b4c26..cc414b3 100644
--- a/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/168fcc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_168fcc(texture2d<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_168fcc(texture2d<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureDimensions_168fcc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_168fcc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl
index 4aad0e3..8eba869 100644
--- a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_18bd57();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl
index 7db854a..a2bf62b 100644
--- a/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/18bd57.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_18bd57(texture2d_array<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_18bd57(texture2d_array<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureDimensions_18bd57(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_18bd57(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl
index b128367..9ffde0f 100644
--- a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_19bffc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl
index b24ac12..3899fc1 100644
--- a/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/19bffc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_19bffc(texture3d<int, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_19bffc(texture3d<int, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureDimensions_19bffc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_19bffc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl
index c3d3c07..c76087a 100644
--- a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1a58e7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl
index 9592acf..88d6843 100644
--- a/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1a58e7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1a58e7(texture2d_array<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_1a58e7(texture2d_array<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureDimensions_1a58e7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1a58e7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl
index 2d7bddf..ae83ade 100644
--- a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1aa199();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl
index 85b5ae6..db7f796 100644
--- a/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1aa199.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1aa199(texture2d_array<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_1aa199(texture2d_array<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureDimensions_1aa199(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1aa199(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl
index 81010d5..3807015 100644
--- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1b71f0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl
index 673514d..3a0980d 100644
--- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1b71f0(texture3d<int, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_1b71f0(texture3d<int, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_1b71f0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1b71f0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl
index 5b30fd0..f6a80bf 100644
--- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1d6c26();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl
index f0a48af..6336706 100644
--- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1d6c26(texture2d_array<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_1d6c26(texture2d_array<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_1d6c26(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1d6c26(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl
index 55e5f43..bbc7739 100644
--- a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1e189c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl
index 6c0bd84..a79d9af 100644
--- a/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1e189c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1e189c(texture3d<int, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_1e189c(texture3d<int, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureDimensions_1e189c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1e189c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl
index 5c5a6f8..4fc4886 100644
--- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1e9e39();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl
index 137e221..f7ea514 100644
--- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1e9e39(texture1d<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_1e9e39(texture1d<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_1e9e39(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1e9e39(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl
index 6ce76cc..482f78b 100644
--- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_1f20c5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl
index 1bf6766..c3196ad 100644
--- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_1f20c5(texture2d_array<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_1f20c5(texture2d_array<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_1f20c5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_1f20c5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl
index b4a5c47..f8b5085 100644
--- a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_214b7b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl
index 17de1cb..1bdb2b4 100644
--- a/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/214b7b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_214b7b(texture1d<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_214b7b(texture1d<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureDimensions_214b7b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_214b7b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl
index 33fdaff..3266f6f 100644
--- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_214dd4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl
index 1775391..36ddac3 100644
--- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_214dd4(texture3d<int, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_214dd4(texture3d<int, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_214dd4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_214dd4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl
index 6905b16..3d9c9f5 100644
--- a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_221f22();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl
index ca08ead..4007f21 100644
--- a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_221f22(texturecube_array<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_221f22(texturecube_array<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_221f22(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_221f22(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl
index c405f33..e17bbeb 100644
--- a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_267788();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl
index e51eced..0f21f84 100644
--- a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_267788(texture2d_array<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_267788(texture2d_array<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_267788(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_267788(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl
index 2789974..f7b5e00 100644
--- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_26bdfa();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl
index 9f8544b..d65df23 100644
--- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_26bdfa(texture3d<float, access::sample> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0), tint_symbol_2.get_depth(0));
+void textureDimensions_26bdfa(texture3d<float, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0), tint_symbol_1.get_depth(0));
+}
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_26bdfa(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_26bdfa(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl
index 6b67d88..4044c0e 100644
--- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_26ef6c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl
index 4d31ec0..692a2be 100644
--- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_26ef6c(texture2d_array<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_26ef6c(texture2d_array<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_26ef6c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_26ef6c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl
index 27d99d4..fed6aa3 100644
--- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_2ad087();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl
index dcae9df..48b104f 100644
--- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_2ad087(texture2d<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_2ad087(texture2d<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_2ad087(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_2ad087(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl
index a4f6198..8ea6d4f 100644
--- a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_2d32ae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl
index 8690ddc..c0a162b 100644
--- a/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/2d32ae.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_2d32ae(texture3d<uint, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_2d32ae(texture3d<uint, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureDimensions_2d32ae(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_2d32ae(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl
index 02bbad5..6c1466a 100644
--- a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_2e0662();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl
index cad0288..4bb2eda 100644
--- a/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/2e0662.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_2e0662(texture2d<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_2e0662(texture2d<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureDimensions_2e0662(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_2e0662(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl
index 60d38be..5ea5c3e 100644
--- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_2efa05();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl
index e2c96aa..370a66e 100644
--- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_2efa05(texture3d<uint, access::sample> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0), tint_symbol_2.get_depth(0));
+void textureDimensions_2efa05(texture3d<uint, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0), tint_symbol_1.get_depth(0));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_2efa05(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_2efa05(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl
index 4e736ec..4adc44e 100644
--- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_2f289f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl
index 619e2cc..b1daa7e 100644
--- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_2f289f(texture3d<int, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_2f289f(texture3d<int, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_2f289f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_2f289f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl
index 7a2011d..83bb458 100644
--- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_2fe1cc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl
index 1c43903..72a77bc 100644
--- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_2fe1cc(texture2d<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_2fe1cc(texture2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_2fe1cc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_2fe1cc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl
index b9fc885..75080a7 100644
--- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_318ecc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl
index d3fac46..c373afd 100644
--- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_318ecc(texture1d<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_318ecc(texture1d<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_318ecc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_318ecc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl
index 6643e90..93b038d 100644
--- a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_340d06();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl
index 330cf6a..605424a 100644
--- a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_340d06(texture3d<uint, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_340d06(texture3d<uint, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_340d06(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_340d06(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl
index 44e97e5..fe14ce7 100644
--- a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_398e30();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl
index 2dd70be..65ea6c2 100644
--- a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_398e30(texture2d_array<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_398e30(texture2d_array<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_398e30(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_398e30(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl
index 2f4c809..43050a0 100644
--- a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_39a600();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl
index 75d2a3a..a9d077c 100644
--- a/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/39a600.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_39a600(texture2d_array<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_39a600(texture2d_array<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureDimensions_39a600(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_39a600(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl
index 43c1adc..f3fb0f0 100644
--- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_3a94ea();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl
index 3936b9e..964cf06 100644
--- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_3a94ea(texture2d<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_3a94ea(texture2d<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_3a94ea(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_3a94ea(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl
index 0c27bc4..210915d 100644
--- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_3aca08();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl
index 8d1dc1f..d8bf7b4 100644
--- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_3aca08(texture1d<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_3aca08(texture1d<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_3aca08(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_3aca08(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl
index 9cce3f4..2523598 100644
--- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_3c5ad8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl
index 48d369a..55bc955 100644
--- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_3c5ad8(texture2d<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_3c5ad8(texture2d<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_3c5ad8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_3c5ad8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl
index 6b0146c..a398c9a 100644
--- a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_3d5817();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl
index 5b42cbd..c959d2e 100644
--- a/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/3d5817.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_3d5817(texture1d<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_3d5817(texture1d<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureDimensions_3d5817(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_3d5817(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl
index 629907a..9155192 100644
--- a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_40bc10();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl
index 6868c2e..df410a4 100644
--- a/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/40bc10.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_40bc10(texture1d<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_40bc10(texture1d<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureDimensions_40bc10(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_40bc10(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl
index bb071aa..f83e35d 100644
--- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_4152a6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl
index cc33fd3..21c7da3 100644
--- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_4152a6(texturecube_array<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_4152a6(texturecube_array<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_4152a6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_4152a6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl
index a806234..48d6c9a 100644
--- a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_423f99();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl
index 0ff7dea..168004b 100644
--- a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_423f99(texture1d<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_423f99(texture1d<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_423f99(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_423f99(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl
index 3946e1a..3e1886f 100644
--- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_4267ee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl
index 22b7a77..a172cf5 100644
--- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_4267ee(texture2d<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_4267ee(texture2d<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_4267ee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_4267ee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl
index 973565b..23b4adc 100644
--- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_42d4e6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl
index b398ce3..e377d8d 100644
--- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_42d4e6(texture1d<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_42d4e6(texture1d<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_42d4e6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_42d4e6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl
index 3c39a18..9f48f45 100644
--- a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_441392();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl
index 6c90ca2..61be803 100644
--- a/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/441392.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_441392(texture1d<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_441392(texture1d<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureDimensions_441392(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_441392(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl
index 04effaf..c6168e4 100644
--- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_48cb89();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl
index d119c1e..dc35032 100644
--- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_48cb89(texture2d<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_48cb89(texture2d<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_48cb89(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_48cb89(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl
index ae064b8..75271e8 100644
--- a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_48cbb2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl
index de78f98..2fda926 100644
--- a/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/48cbb2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_48cbb2(texture2d_array<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_48cbb2(texture2d_array<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureDimensions_48cbb2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_48cbb2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl
index ebacb24..38cb78e 100644
--- a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_48f360();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl
index 754c094..0ac8dff 100644
--- a/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/48f360.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_48f360(texture2d<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_48f360(texture2d<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureDimensions_48f360(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_48f360(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl
index 52f3fb5..a87072e 100644
--- a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_49d274();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl
index 0df06b2..096c898 100644
--- a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_49d274(texture2d_array<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_49d274(texture2d_array<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_49d274(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_49d274(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl
index 288e0ca..cbc7087 100644
--- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_4df9a8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl
index ae35a49..00beb11 100644
--- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_4df9a8(texture1d<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_4df9a8(texture1d<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_4df9a8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_4df9a8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl
index 20ac9bb..73140c6 100644
--- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_50a9ee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl
index 7752e97..6d921d1 100644
--- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_50a9ee(texturecube_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_50a9ee(texturecube_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_50a9ee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_50a9ee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl
index 044faad..0017424 100644
--- a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_52045c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl
index 22f09ad..0d3cb41 100644
--- a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_52045c(texture1d<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width(0));
+void textureDimensions_52045c(texture1d<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_52045c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_52045c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl
index cdf6e23..43d1ca2 100644
--- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_55b23e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl
index ca7a221..c3532a3 100644
--- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_55b23e(texture1d<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_55b23e(texture1d<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_55b23e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_55b23e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl
index f13cc2c..8af7f0b 100644
--- a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_56ccfa();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl
index ccecc8b..54de7f6 100644
--- a/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/56ccfa.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_56ccfa(texture3d<float, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_56ccfa(texture3d<float, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureDimensions_56ccfa(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_56ccfa(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl
index 0bff944..111f8dc 100644
--- a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_579629();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl
index 0aac0b6..2cfb158 100644
--- a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_579629(texture2d_ms<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_579629(texture2d_ms<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+  textureDimensions_579629(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_579629(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl
index cf0919e..fca05c4 100644
--- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_57da0b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl
index c5ece87..010a701 100644
--- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_57da0b(texture1d<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_57da0b(texture1d<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_57da0b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_57da0b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl
index 0e3f59c..8c0a56f 100644
--- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_57e28f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl
index 15dec6d..b8f10ea 100644
--- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_57e28f(depthcube<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_57e28f(depthcube<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_57e28f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_57e28f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl
index a28cfb9..c577725 100644
--- a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_57e7b3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl
index 44c924c..77a73ba 100644
--- a/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/57e7b3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_57e7b3(texture3d<float, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_57e7b3(texture3d<float, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureDimensions_57e7b3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_57e7b3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl
index de43df1..878a448 100644
--- a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_58a515();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl
index 4e189b6..a1985a9 100644
--- a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_58a515(texture2d_array<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_58a515(texture2d_array<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_58a515(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_58a515(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl
index c04ecb4..bedc763 100644
--- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_5985f3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl
index d1e91f8..d02b064 100644
--- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_5985f3(texture2d_array<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_5985f3(texture2d_array<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_5985f3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_5985f3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl
index 1818f10..229e558 100644
--- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_5caa5e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl
index 0ca4064..1d7db80 100644
--- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_5caa5e(texture1d<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_5caa5e(texture1d<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_5caa5e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_5caa5e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl
index 6130200..417d817 100644
--- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_5e295d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl
index 2dabc24..d871096 100644
--- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_5e295d(texture2d_array<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_5e295d(texture2d_array<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_5e295d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_5e295d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl
index c6cccc9..32730fd 100644
--- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_60bf54();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl
index ff91e5c..3adf17c 100644
--- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_60bf54(texture3d<int, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_60bf54(texture3d<int, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_60bf54(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_60bf54(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl
index 16e4e0b..68da62d 100644
--- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_63f3cf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl
index 953f336..7beb7d2 100644
--- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_63f3cf(texture3d<float, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_63f3cf(texture3d<float, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_63f3cf(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_63f3cf(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl
index f5a65dd..9640966 100644
--- a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_66dc4e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl
index 413dadf..c63df45 100644
--- a/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/66dc4e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_66dc4e(texture2d_array<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_66dc4e(texture2d_array<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureDimensions_66dc4e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_66dc4e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl
index 72494c9..ae9acd9 100644
--- a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_670d90();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl
index 2efae3c..ced98dc 100644
--- a/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/670d90.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_670d90(texture3d<float, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_670d90(texture3d<float, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureDimensions_670d90(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_670d90(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl
index 4e4d61e..362af75 100644
--- a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_68105c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl
index fe75ae9..5790d25 100644
--- a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_68105c(texture2d<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_68105c(texture2d<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_68105c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_68105c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl
index 751dbd9..f96c776 100644
--- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_686ef2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl
index d6e55a9..21d8260 100644
--- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_686ef2(texturecube<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_686ef2(texturecube<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_686ef2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_686ef2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl
index 4319d82..b000f3e 100644
--- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_6adac6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl
index 0f1b763..03a4f5b 100644
--- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_6adac6(texture1d<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_6adac6(texture1d<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_6adac6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_6adac6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl
index ab27c7b..a147dd2 100644
--- a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_6c08ab();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl
index 1ae9906..0a73d8b 100644
--- a/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/6c08ab.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_6c08ab(texture1d<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_6c08ab(texture1d<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureDimensions_6c08ab(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_6c08ab(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl
index 16756e5..3a3b227 100644
--- a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_6e2d12();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl
index 5e8a1ed..75f81e5 100644
--- a/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/6e2d12.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_6e2d12(texture1d<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_6e2d12(texture1d<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureDimensions_6e2d12(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_6e2d12(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl
index b72ef5b..148ca9a 100644
--- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_6ec1b4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl
index ef90a6d..d1f686e 100644
--- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_6ec1b4(texture3d<uint, access::sample> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_6ec1b4(texture3d<uint, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_6ec1b4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_6ec1b4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl
index 4ae5623..eef51f4 100644
--- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_6f0d79();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl
index 0919062..d784789 100644
--- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_6f0d79(texture2d_array<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_6f0d79(texture2d_array<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_6f0d79(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_6f0d79(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl
index fa6c8d4..8ce443a 100644
--- a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_702c53();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl
index 01f28c5..9a0bb54 100644
--- a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_702c53(texture2d<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_702c53(texture2d<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_702c53(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_702c53(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl
index 5d73615..d75545d 100644
--- a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_70e26a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl
index 640f076..25b04cd 100644
--- a/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/70e26a.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_70e26a(texture1d<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_70e26a(texture1d<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureDimensions_70e26a(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_70e26a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl
index 1768d0d..7a0e27a 100644
--- a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_71e8f7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl
index 55e3b38..7f0020e 100644
--- a/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/71e8f7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_71e8f7(texture2d<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_71e8f7(texture2d<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureDimensions_71e8f7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_71e8f7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl
index 66a07ad..62bf752 100644
--- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_72e5d6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl
index 0dac5b2..cab3ad7 100644
--- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_72e5d6(depth2d_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_72e5d6(depth2d_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_72e5d6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_72e5d6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl
index 3df768f..a1a791a 100644
--- a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_770103();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl
index 1586977..6403d1e 100644
--- a/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/770103.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_770103(texture3d<float, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_770103(texture3d<float, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureDimensions_770103(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_770103(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl
index f5c0aa5..604dffa 100644
--- a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_79df87();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl
index fbb7d73..d021683 100644
--- a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_79df87(texture1d<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width(0));
+void textureDimensions_79df87(texture1d<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_79df87(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_79df87(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl
index ee84547..729140b 100644
--- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_7bf826();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl
index 9d42595..fdd6201 100644
--- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_7bf826(depth2d_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_7bf826(depth2d_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_7bf826(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_7bf826(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl
index 0318e50..7b7c994 100644
--- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_7f5c2e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl
index ebcf1dc..ec78cea 100644
--- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_7f5c2e(texture2d<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_7f5c2e(texture2d<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_7f5c2e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_7f5c2e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl
index 0701af9..0db3091 100644
--- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8028f3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl
index 8ddef21..ee91a57 100644
--- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8028f3(texture3d<float, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_8028f3(texture3d<float, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_8028f3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8028f3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl
index c1ccc4f..25f0217 100644
--- a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_811679();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl
index 432b5a9..3f92b25 100644
--- a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_811679(texture3d<uint, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_811679(texture3d<uint, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_811679(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_811679(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl
index 6175f41..2c7c646 100644
--- a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_820596();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl
index d93f23d..bcea742 100644
--- a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_820596(texture3d<uint, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_820596(texture3d<uint, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_820596(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_820596(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl
index 0dbe912..1f2d1e5 100644
--- a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_82138e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl
index 6f661c8..139a274 100644
--- a/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/82138e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_82138e(texture2d<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_82138e(texture2d<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureDimensions_82138e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_82138e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl
index c5d0901..84d60ac 100644
--- a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8347ab();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl
index 580ac20..c4cb7a8 100644
--- a/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8347ab.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8347ab(texture1d<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_8347ab(texture1d<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureDimensions_8347ab(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8347ab(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl
index b1d9086..c705d5c 100644
--- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_83ee5a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl
index 22390e1..ae657f3 100644
--- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_83ee5a(texture2d<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_83ee5a(texture2d<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_83ee5a(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_83ee5a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl
index f85cb73..2b030c6 100644
--- a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_85d556();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl
index 14a71d5..6db7094 100644
--- a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_85d556(texture2d_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_85d556(texture2d_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_85d556(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_85d556(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl
index 86b3b89..70a83d1 100644
--- a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8799ee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl
index e1a8e80..1c265e2 100644
--- a/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8799ee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8799ee(texture3d<int, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_8799ee(texture3d<int, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureDimensions_8799ee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8799ee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl
index f836987..9d37232 100644
--- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_88ad17();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl
index 4c22410..3a51779 100644
--- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_88ad17(texturecube<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_88ad17(texturecube<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_88ad17(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_88ad17(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl
index 64aa384..e6bb59d 100644
--- a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_89a864();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl
index 484cd8e..fd69f0f 100644
--- a/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/89a864.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_89a864(texture2d<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_89a864(texture2d<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureDimensions_89a864(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_89a864(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl
index 06cb050..da11350 100644
--- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8aa4c4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl
index 53d6576..1fc97aa 100644
--- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8aa4c4(texture3d<float, access::sample> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_8aa4c4(texture3d<float, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_8aa4c4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8aa4c4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl
index beaf14b..8cdfa61 100644
--- a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8b4fff();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl
index b92c382..d5e68d5 100644
--- a/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8b4fff.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8b4fff(texture2d<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_8b4fff(texture2d<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureDimensions_8b4fff(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8b4fff(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl
index 087075d..fed7b1d 100644
--- a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8d89f8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl
index ac9eae7..4895ab3 100644
--- a/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8d89f8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8d89f8(texture1d<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_8d89f8(texture1d<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureDimensions_8d89f8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8d89f8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl
index b93b2ff..4655fdc 100644
--- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8deb5e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl
index cd45aa5..863eb13 100644
--- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8deb5e(texture3d<int, access::sample> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_8deb5e(texture3d<int, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_8deb5e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8deb5e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl
index 6c6fa65..ae67075 100644
--- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8f20bf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl
index 5246f3f..edc42af 100644
--- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8f20bf(texturecube_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_8f20bf(texturecube_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_8f20bf(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8f20bf(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl
index 2b26ad0..61af3df 100644
--- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_8fca0f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl
index 26ef2cf..8ba811d 100644
--- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_8fca0f(texture3d<float, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_8fca0f(texture3d<float, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_8fca0f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_8fca0f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl
index e6c4a4e..29df48b 100644
--- a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_90340b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl
index 27ab85e..958aad9 100644
--- a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_90340b(depthcube_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_90340b(depthcube_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_90340b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_90340b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl
index 42922ef..50741ea 100644
--- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9042ab();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl
index 7b0908d..4674efe 100644
--- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9042ab(texture2d_array<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_9042ab(texture2d_array<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_9042ab(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9042ab(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl
index b7678f6..8e2e6a4 100644
--- a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_924742();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl
index 01cfc36..2d3075d 100644
--- a/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/924742.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_924742(texture3d<uint, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_924742(texture3d<uint, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureDimensions_924742(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_924742(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl
index 6c4dc92..d0d1d50 100644
--- a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_92ad20();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl
index 4a6f7be..b9dda62 100644
--- a/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/92ad20.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_92ad20(texture3d<uint, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_92ad20(texture3d<uint, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureDimensions_92ad20(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_92ad20(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl
index 15f57cf..1a2117b 100644
--- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9393b0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl
index 8da4697..c6a5a89 100644
--- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9393b0(depthcube<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_9393b0(depthcube<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_9393b0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9393b0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl
index 51a58d5..aeee272 100644
--- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_939fdb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl
index 05b5279..75a8192 100644
--- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_939fdb(depth2d<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_939fdb(depth2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_939fdb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_939fdb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl
index 5cffe3f..517c9ba 100644
--- a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9572e5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl
index 4fcfc03..daf5cc1 100644
--- a/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9572e5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9572e5(texture3d<float, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_9572e5(texture3d<float, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureDimensions_9572e5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9572e5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl
index a227731..5203820 100644
--- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_962dcd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl
index a329b9c..8ff752c 100644
--- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_962dcd(texturecube<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_962dcd(texturecube<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_962dcd(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_962dcd(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl
index db80a85..d0ef495 100644
--- a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_998f6b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl
index 02f4e38..a3191ae 100644
--- a/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/998f6b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_998f6b(texture2d_array<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_998f6b(texture2d_array<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureDimensions_998f6b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_998f6b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl
index 59d549b..eadba40 100644
--- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9abfe5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl
index 11d7780..1d9e4af 100644
--- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9abfe5(texture2d_array<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_9abfe5(texture2d_array<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_9abfe5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9abfe5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl
index d4045da..91fe9a1 100644
--- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9c9c57();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl
index c82553c..6b6c20b 100644
--- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9c9c57(texture2d_array<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_9c9c57(texture2d_array<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_9c9c57(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9c9c57(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl
index 516614a..2c46792 100644
--- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9da9e2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl
index f89d050..f94dbe0 100644
--- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9da9e2(texture1d<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_9da9e2(texture1d<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_9da9e2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9da9e2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl
index 20c1bd7..7416438 100644
--- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9eb8d8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl
index 9f4cb27..ef8e102 100644
--- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9eb8d8(texture2d<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_9eb8d8(texture2d<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_9eb8d8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9eb8d8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl
index 376e017..eef30d0 100644
--- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_9f8e46();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl
index 16f228f..a823aa4 100644
--- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_9f8e46(texture2d<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_9f8e46(texture2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_9f8e46(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_9f8e46(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl
index 6d07acc..b4253db 100644
--- a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_a01845();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl
index 8b354ae..6fe18da 100644
--- a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_a01845(depthcube_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_a01845(depthcube_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_a01845(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_a01845(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl
index 2823ef6..ddef3c0 100644
--- a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_a0aad1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl
index 19d1cca..c3151b2 100644
--- a/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/a0aad1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_a0aad1(texture2d<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_a0aad1(texture2d<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureDimensions_a0aad1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_a0aad1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl
index 17f92cc..e1f4e62 100644
--- a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_a0e4ec();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl
index b8473fe..8cd2e7c 100644
--- a/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/a0e4ec.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_a0e4ec(texture3d<int, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_a0e4ec(texture3d<int, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureDimensions_a0e4ec(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_a0e4ec(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl
index d07cc4d..fa1f8f0 100644
--- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_a7d565();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl
index 99881f0..d317de8 100644
--- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_a7d565(texture1d<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_a7d565(texture1d<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_a7d565(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_a7d565(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl
index 1966fdf..5827d94 100644
--- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_a863f2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl
index 3cc1502..989df4d 100644
--- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_a863f2(texture1d<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_a863f2(texture1d<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_a863f2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_a863f2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl
index 4ce2382..cfe96f1 100644
--- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_a9c9c1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl
index 9bc22b2..5d5c01c 100644
--- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_a9c9c1(texturecube<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_a9c9c1(texturecube<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_a9c9c1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_a9c9c1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl
index 134eea5..a5f1b3b 100644
--- a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_ae457f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl
index fcdd22c..1d6600b 100644
--- a/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/ae457f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_ae457f(texture2d_array<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_ae457f(texture2d_array<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureDimensions_ae457f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_ae457f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl
index 04aeb4d..70279db 100644
--- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_b0e16d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl
index 45768ed..0179517 100644
--- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_b0e16d(texture2d<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_b0e16d(texture2d<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_b0e16d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_b0e16d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl
index ef81755..db28c37 100644
--- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_b3c954();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl
index 8fb7df1..38d9160 100644
--- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_b3c954(texturecube<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_b3c954(texturecube<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_b3c954(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_b3c954(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl
index 43682c8..0407213 100644
--- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_b3e407();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl
index f14e2cb..124c951 100644
--- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_b3e407(texture1d<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width(0));
+void textureDimensions_b3e407(texture1d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_b3e407(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_b3e407(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl
index df91bd8..228c045 100644
--- a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_b91240();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl
index d5e95cf..f45b6a6 100644
--- a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_b91240(texture2d<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_b91240(texture2d<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_b91240(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_b91240(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl
index 6f1312d..ef89299 100644
--- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_ba1481();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl
index d17c84e..a4061f5 100644
--- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_ba1481(texture2d<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_ba1481(texture2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_ba1481(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_ba1481(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl
index 8ddceca..753e15a 100644
--- a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_ba6e15();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl
index e4a32a9..443894f 100644
--- a/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/ba6e15.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_ba6e15(texture2d<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_ba6e15(texture2d<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureDimensions_ba6e15(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_ba6e15(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl
index 32e4fa0..51eb32f 100644
--- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_bb3dde();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl
index df43e6a..6b79d76 100644
--- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_bb3dde(texture3d<int, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_bb3dde(texture3d<int, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_bb3dde(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_bb3dde(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl
index 46aecf6..d4ab15b 100644
--- a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_c2215f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl
index 0ccf456..8f93f48 100644
--- a/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/c2215f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_c2215f(texture2d_array<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_c2215f(texture2d_array<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureDimensions_c2215f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_c2215f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl
index 2c572f8..4e75754 100644
--- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_c30e75();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl
index 80ec0fd..7c7f94a 100644
--- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_c30e75(texture2d<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_c30e75(texture2d<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_c30e75(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_c30e75(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl
index 1a27212..63586a6 100644
--- a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_c60b66();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl
index 8b823d0..18ed4f3 100644
--- a/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/c60b66.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_c60b66(texture1d<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_c60b66(texture1d<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureDimensions_c60b66(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_c60b66(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl
index 7fe1132..01fbf35 100644
--- a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_c74533();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl
index 3a74224..006d200 100644
--- a/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/c74533.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_c74533(texture2d<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_c74533(texture2d<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureDimensions_c74533(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_c74533(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl
index 0dca855..cf6de5a 100644
--- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_c7943d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl
index 0800954..38ba882 100644
--- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_c7943d(texture2d<uint, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_c7943d(texture2d<uint, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_c7943d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_c7943d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl
index b1571d1..b29004e 100644
--- a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_caaabb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl
index 44e18ef..fb9f63e 100644
--- a/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/caaabb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_caaabb(texture2d_array<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_caaabb(texture2d_array<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureDimensions_caaabb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_caaabb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl
index 3dd6c4a..da22ba1 100644
--- a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cc5478();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl
index bd3ff23..8fed381 100644
--- a/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cc5478.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cc5478(texture1d<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_cc5478(texture1d<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureDimensions_cc5478(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cc5478(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl
index 6f5cbe5..b123be2 100644
--- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cc968c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl
index 437f99c..849aa30 100644
--- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cc968c(texture1d<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_cc968c(texture1d<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_cc968c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cc968c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl
index 3f7daad..d33b7c7 100644
--- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cccc8f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl
index f039b30..e4d0218 100644
--- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cccc8f(texture1d<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_cccc8f(texture1d<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_cccc8f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cccc8f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl
index f0e67fa..910792e 100644
--- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cd76a7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl
index 20daf70..3cf1c78 100644
--- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cd76a7(texture3d<float, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_cd76a7(texture3d<float, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_cd76a7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cd76a7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl
index e07a03c..430b968 100644
--- a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cdaff9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl
index b2f453d..818ca1a 100644
--- a/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cdaff9.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cdaff9(texture3d<float, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_cdaff9(texture3d<float, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureDimensions_cdaff9(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cdaff9(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl
index 1118928..5b02297 100644
--- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cdf473();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl
index 5745017..62699bb 100644
--- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cdf473(texture2d_array<int, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_cdf473(texture2d_array<int, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_cdf473(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cdf473(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl
index 35e10bb..f46ffb6 100644
--- a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cec841();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl
index b3688fa..e664498 100644
--- a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cec841(texture2d_array<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_cec841(texture2d_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_cec841(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cec841(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl
index f5333dc..00a4e6c 100644
--- a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cf1d42();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl
index 20bd51d..6b70bc0 100644
--- a/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cf1d42.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cf1d42(texture1d<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_cf1d42(texture1d<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureDimensions_cf1d42(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cf1d42(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl
index 666d3c0..0d72ab7 100644
--- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_cf7e43();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl
index a4d7f34..9850e71 100644
--- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_cf7e43(texture3d<float, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_cf7e43(texture3d<float, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_cf7e43(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_cf7e43(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl
index 66a5b43..9ce515f 100644
--- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_d125bc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl
index 70d522a..93527ec 100644
--- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_d125bc(texturecube<float, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_d125bc(texturecube<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_d125bc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_d125bc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl
index 66ac1b7..82496df 100644
--- a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_d40b9e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl
index eb9ac14..e2a0a81 100644
--- a/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/d40b9e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_d40b9e(texture2d<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_d40b9e(texture2d<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureDimensions_d40b9e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_d40b9e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl
index d79aff5..5d2fdc9 100644
--- a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_d4106f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl
index d5dca92..dfc8105 100644
--- a/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/d4106f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_d4106f(texture2d<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_d4106f(texture2d<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureDimensions_d4106f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_d4106f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl
index c79bd7a..fe401bc 100644
--- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_d83c45();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl
index 92c3471..1e41914 100644
--- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_d83c45(texturecube_array<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_d83c45(texturecube_array<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_d83c45(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_d83c45(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl
index b30e569..7443f2f 100644
--- a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_d8f951();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl
index 9de7a83..aebf66d 100644
--- a/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/d8f951.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_d8f951(texture1d<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_d8f951(texture1d<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureDimensions_d8f951(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_d8f951(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl
index 016d1e2..5e91002 100644
--- a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_da3099();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl
index 10643e9..5d79ee6 100644
--- a/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/da3099.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_da3099(texture3d<uint, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_da3099(texture3d<uint, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureDimensions_da3099(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_da3099(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl
index d6ff20a..a99beb7 100644
--- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_daf7c0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl
index ff1d7f8..4518537 100644
--- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_daf7c0(texture2d_ms<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_daf7c0(texture2d_ms<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+  textureDimensions_daf7c0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_daf7c0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl
index 355217c..8bc7681 100644
--- a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_dba47c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl
index f3b4139..ee47c98 100644
--- a/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/dba47c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_dba47c(texture1d<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_dba47c(texture1d<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureDimensions_dba47c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_dba47c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl
index 91f067a..ab40431 100644
--- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_dc2dd0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl
index 4c9cd2c..f8e141a 100644
--- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_dc2dd0(texture1d<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_dc2dd0(texture1d<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_dc2dd0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_dc2dd0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl
index be41536..c8edf59 100644
--- a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e10157();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl
index 87b491a..1c43655 100644
--- a/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e10157.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e10157(texture2d<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_e10157(texture2d<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureDimensions_e10157(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e10157(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl
index 5d1e082..9dea807 100644
--- a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e927be();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl
index 03c8f72..738c210 100644
--- a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e927be(texturecube_array<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_e927be(texturecube_array<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_e927be(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e927be(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl
index 24c42c2..de06d73 100644
--- a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e93464();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl
index 39312ac..29bd4d8 100644
--- a/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e93464.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e93464(texture1d<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_width());
+void textureDimensions_e93464(texture1d<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width());
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureDimensions_e93464(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e93464(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl
index c34ecd5..779750b 100644
--- a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e9628c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl
index 8b37edf..f3c4ae6 100644
--- a/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e9628c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e9628c(texture2d_array<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_e9628c(texture2d_array<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureDimensions_e9628c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e9628c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl
index 596da6d..14a43e0 100644
--- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e9e96c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl
index a7d7c29..8adc475 100644
--- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e9e96c(texture2d_array<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_e9e96c(texture2d_array<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_e9e96c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e9e96c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl
index dedba84..a989d5e 100644
--- a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e9fe54();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl
index c3db723..3fed85e 100644
--- a/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e9fe54.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e9fe54(texture2d<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_e9fe54(texture2d<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureDimensions_e9fe54(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e9fe54(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl
index 6d7b1fa..f725de7 100644
--- a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_e9fe58();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl
index d36a085..6ce7ae3 100644
--- a/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/e9fe58.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_e9fe58(texture2d_array<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_e9fe58(texture2d_array<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureDimensions_e9fe58(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_e9fe58(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl
index c02956c..754db5b 100644
--- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_ef5b89();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl
index 0b8bea3..a1573f0 100644
--- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_ef5b89(texture2d_ms<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_ef5b89(texture2d_ms<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+  textureDimensions_ef5b89(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_ef5b89(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl
index 68dee58..4b98a0a 100644
--- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_efc8a4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl
index b137191..26c0bc5 100644
--- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_efc8a4(texture3d<int, access::sample> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0), tint_symbol_2.get_depth(0));
+void textureDimensions_efc8a4(texture3d<int, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0), tint_symbol_1.get_depth(0));
+}
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_efc8a4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_efc8a4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl
index 5063af5..5fe058b 100644
--- a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_f1b72b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl
index 03d1410..2ad9f97 100644
--- a/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/f1b72b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_f1b72b(texture2d<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_f1b72b(texture2d<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureDimensions_f1b72b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_f1b72b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl
index b1c7273..4af1093 100644
--- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_f60bdb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl
index 5cf3b7a..2a4fdce 100644
--- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_f60bdb(depth2d_ms<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_f60bdb(depth2d_ms<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  textureDimensions_f60bdb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_f60bdb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl
index 02cd89f..6b11640 100644
--- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_f7145b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl
index f1cff27..71be199 100644
--- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_f7145b(texture2d<uint, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
+void textureDimensions_f7145b(texture2d<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(0), tint_symbol_1.get_height(0));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_f7145b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_f7145b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl
index de9eff7..e29bca5 100644
--- a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_f7aa9e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl
index 52112bc..787e04d 100644
--- a/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/f7aa9e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_f7aa9e(texture2d_array<int, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_f7aa9e(texture2d_array<int, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureDimensions_f7aa9e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_f7aa9e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl
index 3023327..33b5438 100644
--- a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_f7e436();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl
index bb7d49e..74a8323 100644
--- a/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/f7e436.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_f7e436(texture2d_array<uint, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_f7e436(texture2d_array<uint, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureDimensions_f7e436(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_f7e436(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl
index 3bcdf4c..6237cac 100644
--- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_f931c7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl
index 495657b..0523c76 100644
--- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_f931c7(texture2d<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_f931c7(texture2d<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_f931c7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_f931c7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl
index 43199e2..aa72d34 100644
--- a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_fa90e1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl
index 4275f66..91ab262 100644
--- a/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/fa90e1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_fa90e1(texture2d<float, access::read> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_fa90e1(texture2d<float, access::read> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureDimensions_fa90e1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_fa90e1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl
index f78ea0d..20ec180 100644
--- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_fa9859();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl
index 38e0620..89b8eff 100644
--- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_fa9859(texture2d<int, access::sample> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_fa9859(texture2d<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_fa9859(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_fa9859(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl
index bcd3def..858a187 100644
--- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_fb5670();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl
index ac2553f..0640b97 100644
--- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_fb5670(texture2d_array<float, access::write> tint_symbol_2) {
-  int2 res = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
+void textureDimensions_fb5670(texture2d_array<float, access::write> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_fb5670(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_fb5670(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl
index 809ff2a..8613777 100644
--- a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_fbbe4d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl
index 3353e4c..aab3224 100644
--- a/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/fbbe4d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_fbbe4d(texture3d<uint, access::read> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_fbbe4d(texture3d<uint, access::read> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureDimensions_fbbe4d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_fbbe4d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl
index a10f001..e1bacc9 100644
--- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureDimensions_fcac78();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl
index 36e420b..3b3c463 100644
--- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureDimensions_fcac78(texture3d<uint, access::write> tint_symbol_2) {
-  int3 res = int3(tint_symbol_2.get_width(), tint_symbol_2.get_height(), tint_symbol_2.get_depth());
+void textureDimensions_fcac78(texture3d<uint, access::write> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_fcac78(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureDimensions_fcac78(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl
index 670770f..4a48d6d 100644
--- a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_050c33();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl
index d665e71..1708a46 100644
--- a/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/050c33.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_050c33(texture2d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_050c33(texture2d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureLoad_050c33(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_050c33(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl
index ccf2ee6..b68a7f5 100644
--- a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_072e26();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl
index d150b51..b3ad18f 100644
--- a/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/072e26.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_072e26(texture2d_array<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_072e26(texture2d_array<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureLoad_072e26(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_072e26(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl
index 7104fda..8e30c79 100644
--- a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_078bc4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl
index c6fa255..634a459 100644
--- a/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/078bc4.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_078bc4(texture2d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_078bc4(texture2d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureLoad_078bc4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_078bc4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl
index 7f23d9b..4bf4489 100644
--- a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_127e12();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl
index b3ab0f6..f0514c1 100644
--- a/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/127e12.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_127e12(texture2d_array<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_127e12(texture2d_array<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureLoad_127e12(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_127e12(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl
index 42da3f3..9cbe429 100644
--- a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_1561a7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl
index ab1ae80..84e2245 100644
--- a/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/1561a7.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_1561a7(texture1d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint(1));
+void textureLoad_1561a7(texture1d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureLoad_1561a7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_1561a7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl
index 554c2db..745c99c 100644
--- a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_19cf87();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl
index ba5d335..e06a862 100644
--- a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_19cf87(depth2d<float, access::sample> tint_symbol_2) {
-  float res = tint_symbol_2.read(uint2(int2()), 0);
+void textureLoad_19cf87(depth2d<float, access::sample> tint_symbol_1) {
+  float res = tint_symbol_1.read(uint2(int2()), 0);
+}
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureLoad_19cf87(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_19cf87(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl
index d080ae2..fc10480 100644
--- a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_1a062f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl
index e01eca3..20bcf88 100644
--- a/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/1a062f.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_1a062f(texture2d_array<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_1a062f(texture2d_array<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureLoad_1a062f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_1a062f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl
index e8fc35b..16a4b1c 100644
--- a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_1a8452();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl
index 57653a0..49f79b6 100644
--- a/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/1a8452.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_1a8452(texture1d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint(1));
+void textureLoad_1a8452(texture1d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureLoad_1a8452(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_1a8452(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl
index c2ee2f7..9e928ac 100644
--- a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_1b8588();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl
index 6a87c63..f5f44e8 100644
--- a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_1b8588(texture1d<uint, access::sample> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint(1), 0);
+void textureLoad_1b8588(texture1d<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1), 0);
+}
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureLoad_1b8588(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_1b8588(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl
index 0830c11..d4daa46 100644
--- a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_1f2016();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl
index 59c6ae9..4186f51 100644
--- a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_1f2016(texture3d<float, access::sample> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()), 0);
+void textureLoad_1f2016(texture3d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()), 0);
+}
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureLoad_1f2016(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_1f2016(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl
index 5abaeaf..8943506 100644
--- a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_20fa2f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl
index e589139..3b66ea4 100644
--- a/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/20fa2f.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_20fa2f(texture2d_array<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_20fa2f(texture2d_array<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureLoad_20fa2f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_20fa2f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl
index 25336df..cef1b28 100644
--- a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_276a2c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl
index ec2a90c..16bddfa9 100644
--- a/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/276a2c.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_276a2c(texture1d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint(1));
+void textureLoad_276a2c(texture1d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureLoad_276a2c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_276a2c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl
index f3a215a..4901115 100644
--- a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_2887d7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl
index a407990..c012feb 100644
--- a/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/2887d7.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_2887d7(texture1d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1));
+void textureLoad_2887d7(texture1d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureLoad_2887d7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_2887d7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl
index 9a44528..33a5d4d 100644
--- a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_2ae485();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl
index d120f61..183e7a9 100644
--- a/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/2ae485.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_2ae485(texture2d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_2ae485(texture2d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureLoad_2ae485(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_2ae485(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl
index 1566ea9..5205c01 100644
--- a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_2d6cf7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl
index 2e5cc15..e721286 100644
--- a/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/2d6cf7.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_2d6cf7(texture1d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint(1));
+void textureLoad_2d6cf7(texture1d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureLoad_2d6cf7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_2d6cf7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl
index 84c44d5..f374510 100644
--- a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_3c0d9e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl
index 4c2e887..62514f8 100644
--- a/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/3c0d9e.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_3c0d9e(texture2d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_3c0d9e(texture2d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureLoad_3c0d9e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_3c0d9e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl
index 9329a11..b4c57c5 100644
--- a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_3c9587();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl
index 95fb5dc..6ed1a44 100644
--- a/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/3c9587.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_3c9587(texture2d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_3c9587(texture2d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureLoad_3c9587(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_3c9587(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl
index ed6d580..b096fa0 100644
--- a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_3d001b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl
index 0855502..dba9fa6 100644
--- a/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/3d001b.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_3d001b(texture3d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_3d001b(texture3d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureLoad_3d001b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_3d001b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl
index 279da99..0ab66c2 100644
--- a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_3d9c90();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl
index e87e7ce..efb0420 100644
--- a/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/3d9c90.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_3d9c90(texture3d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_3d9c90(texture3d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureLoad_3d9c90(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_3d9c90(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl
index 1822b01..58e8d61 100644
--- a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_484344();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl
index fd34daa..4fb7b02 100644
--- a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_484344(texture2d<float, access::sample> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 0);
+void textureLoad_484344(texture2d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 0);
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureLoad_484344(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_484344(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl
index 0f08b51..02e3104 100644
--- a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_4fd803();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl
index 1d265dd..a83494a 100644
--- a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_4fd803(texture3d<int, access::sample> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint3(int3()), 0);
+void textureLoad_4fd803(texture3d<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(int3()), 0);
+}
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureLoad_4fd803(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_4fd803(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl
index 7c268a6..897582b 100644
--- a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_505aa2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl
index 76bee29..c62f8e4 100644
--- a/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/505aa2.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_505aa2(texture3d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_505aa2(texture3d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureLoad_505aa2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_505aa2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl
index c32c387..01f1d4d 100644
--- a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_519ab5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl
index 63bb7a7..549ef6e 100644
--- a/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/519ab5.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_519ab5(texture1d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1));
+void textureLoad_519ab5(texture1d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureLoad_519ab5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_519ab5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl
index 96ede18..c79ca0f 100644
--- a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_53378a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl
index d0de61a..0549980 100644
--- a/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/53378a.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_53378a(texture2d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_53378a(texture2d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureLoad_53378a(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_53378a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl
index e3cb062..54b726d 100644
--- a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_560573();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl
index 9360c34..fa40b9f 100644
--- a/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/560573.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_560573(texture2d_array<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_560573(texture2d_array<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureLoad_560573(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_560573(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl
index 4e06912..7060970 100644
--- a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_582015();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl
index abde512..a2bb31a 100644
--- a/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/582015.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_582015(texture2d_array<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_582015(texture2d_array<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureLoad_582015(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_582015(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl
index cbcacca..a35e83e 100644
--- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_5a2f9d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl
index 321459d..10d9133 100644
--- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_5a2f9d(texture1d<int, access::sample> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint(1), 0);
+void textureLoad_5a2f9d(texture1d<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1), 0);
+}
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureLoad_5a2f9d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_5a2f9d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl
index 4ce01dd..e3c6baa 100644
--- a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_5bb7fb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl
index 0bd8944..3a2bae4 100644
--- a/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/5bb7fb.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_5bb7fb(texture1d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint(1));
+void textureLoad_5bb7fb(texture1d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureLoad_5bb7fb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_5bb7fb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl
index c69ba33..bb38fd7 100644
--- a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_5d0a2f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl
index 0e284c2..c2ea011 100644
--- a/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/5d0a2f.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_5d0a2f(texture2d_array<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_5d0a2f(texture2d_array<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureLoad_5d0a2f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_5d0a2f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl
index 6ab4c19..1230e78 100644
--- a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_6154d4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl
index 1e09e76..9fdd4a4 100644
--- a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_6154d4(texture2d<uint, access::sample> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 0);
+void textureLoad_6154d4(texture2d<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 0);
+}
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureLoad_6154d4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_6154d4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl
index 71cfaf3..61d263e 100644
--- a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_6273b1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl
index c389b38..69c6257 100644
--- a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_2) {
-  float res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_1) {
+  float res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  textureLoad_6273b1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_6273b1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl
index 93d4722..d48cc5b 100644
--- a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_62d125();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl
index 24c7ff5..5c85888 100644
--- a/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/62d125.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_62d125(texture3d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_62d125(texture3d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureLoad_62d125(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_62d125(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl
index eaae8b2..2332196 100644
--- a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_6678b6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl
index ae62df1..e2644f3 100644
--- a/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/6678b6.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_6678b6(texture1d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint(1));
+void textureLoad_6678b6(texture1d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureLoad_6678b6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_6678b6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl
index 232a0e0..4571e92 100644
--- a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_67edca();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl
index db2355e..97fdf44 100644
--- a/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/67edca.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_67edca(texture3d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_67edca(texture3d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureLoad_67edca(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_67edca(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl
index dd4a52d..046682e 100644
--- a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_749704();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl
index 37d5288..5321c14 100644
--- a/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/749704.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_749704(texture2d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_749704(texture2d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureLoad_749704(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_749704(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl
index c6c8722..9995b1e 100644
--- a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_79e697();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl
index de78089..1a92b23 100644
--- a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_79e697(texture2d_array<int, access::sample> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1, 0);
+void textureLoad_79e697(texture2d_array<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1, 0);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureLoad_79e697(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_79e697(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl
index be53320..eeb32ec 100644
--- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_7c90e5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl
index 044fd52..463f1a9 100644
--- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_7c90e5(texture2d_array<uint, access::sample> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1, 0);
+void textureLoad_7c90e5(texture2d_array<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1, 0);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureLoad_7c90e5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_7c90e5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl
index 20e1742..7d692a0 100644
--- a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_81c381();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl
index 1ca1a43..d3d567d 100644
--- a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_81c381(texture1d<float, access::sample> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1), 0);
+void textureLoad_81c381(texture1d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1), 0);
+}
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureLoad_81c381(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_81c381(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl
index 627cc92..683de66 100644
--- a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_83cea4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl
index 53aedff..5002e23 100644
--- a/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/83cea4.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_83cea4(texture1d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint(1));
+void textureLoad_83cea4(texture1d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_2) {
+  textureLoad_83cea4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_83cea4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl
index d0546f7..51b24d4 100644
--- a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_87be85();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl
index 3959083..7746c5b 100644
--- a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_87be85(texture2d_array<float, access::sample> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1, 0);
+void textureLoad_87be85(texture2d_array<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1, 0);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureLoad_87be85(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_87be85(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl
index 3e21a82..4bfd217 100644
--- a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_8acf41();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl
index a98d05e..3a747df 100644
--- a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_8acf41(texture2d<float, access::sample> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 0);
+void textureLoad_8acf41(texture2d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 0);
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureLoad_8acf41(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_8acf41(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl
index 55c0a6d..547df77 100644
--- a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_8e5032();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl
index b44229c..3eec472 100644
--- a/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/8e5032.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_8e5032(texture2d_array<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_8e5032(texture2d_array<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureLoad_8e5032(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_8e5032(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl
index 97cfacb..fa31b4c 100644
--- a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_936952();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl
index 2ca0fe6..930e783 100644
--- a/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/936952.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_936952(texture2d_array<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_936952(texture2d_array<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureLoad_936952(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_936952(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl
index d650884..cccfb5a 100644
--- a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_9a7c90();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl
index 6e8037b..d78849d 100644
--- a/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/9a7c90.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_9a7c90(texture3d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_9a7c90(texture3d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureLoad_9a7c90(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_9a7c90(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl
index 5d72107..ad15913 100644
--- a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_9b2667();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl
index cb7023e..59d52ac 100644
--- a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_9b2667(depth2d_array<float, access::sample> tint_symbol_2) {
-  float res = tint_symbol_2.read(uint2(int2()), 1, 0);
+void textureLoad_9b2667(depth2d_array<float, access::sample> tint_symbol_1) {
+  float res = tint_symbol_1.read(uint2(int2()), 1, 0);
+}
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureLoad_9b2667(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_9b2667(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl
index d54dc54..0af29cf 100644
--- a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_9c2a14();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl
index ed1817e..fc8bfb6 100644
--- a/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/9c2a14.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_9c2a14(texture2d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_9c2a14(texture2d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureLoad_9c2a14(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_9c2a14(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl
index cfeed50..41f3f98 100644
--- a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_a583c9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl
index 3d286b5..0d0a47f 100644
--- a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_a583c9(texture2d_ms<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_a583c9(texture2d_ms<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+  textureLoad_a583c9(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_a583c9(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl
index 82fbda9..86f30d8 100644
--- a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_a6a85a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl
index 3da69a8..368b371 100644
--- a/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/a6a85a.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_a6a85a(texture3d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_a6a85a(texture3d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureLoad_a6a85a(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_a6a85a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl
index bf0d87d..5e5263a 100644
--- a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_a6b61d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl
index dc5f66d..f1125cc 100644
--- a/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/a6b61d.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_a6b61d(texture2d_array<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_a6b61d(texture2d_array<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureLoad_a6b61d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_a6b61d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl
index d9acf61..5999e43 100644
--- a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_a7a3c3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl
index 83a639b..57a5f5a 100644
--- a/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/a7a3c3.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_a7a3c3(texture3d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_a7a3c3(texture3d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureLoad_a7a3c3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_a7a3c3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl
index edbeec8..d5eb2c8 100644
--- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_a9a9f5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl
index 9967f2b..35cd32a 100644
--- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_a9a9f5(texture3d<uint, access::sample> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint3(int3()), 0);
+void textureLoad_a9a9f5(texture3d<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(int3()), 0);
+}
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureLoad_a9a9f5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_a9a9f5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl
index a926a00..166cf3e 100644
--- a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_b1bf79();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl
index b3e18af..49cde1d 100644
--- a/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/b1bf79.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_b1bf79(texture3d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_b1bf79(texture3d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureLoad_b1bf79(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_b1bf79(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl
index c8575cb..3741b1c 100644
--- a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_b58c6d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl
index 34357c8..40301b7 100644
--- a/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/b58c6d.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_b58c6d(texture2d_array<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_b58c6d(texture2d_array<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureLoad_b58c6d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_b58c6d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl
index 58734f9..962ed40 100644
--- a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_b6c458();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl
index 4d8c55e..b11df76 100644
--- a/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/b6c458.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_b6c458(texture2d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_b6c458(texture2d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureLoad_b6c458(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_b6c458(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl
index 4f2abbe..aef20ba 100644
--- a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_bfd154();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl
index 3aa2522..3d002d8 100644
--- a/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/bfd154.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_bfd154(texture3d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_bfd154(texture3d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureLoad_bfd154(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_bfd154(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl
index bb03d74..0b67c3d 100644
--- a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c02b74();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl
index de110b5..9646722 100644
--- a/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c02b74.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c02b74(texture1d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1));
+void textureLoad_c02b74(texture1d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureLoad_c02b74(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c02b74(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl
index 37721e1..fb9f4cd 100644
--- a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c07013();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl
index b4648f9..31c42bc 100644
--- a/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c07013.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c07013(texture2d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_c07013(texture2d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureLoad_c07013(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c07013(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl
index bc62315..7144884 100644
--- a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c2a480();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl
index 438fce1..645ed0f 100644
--- a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c2a480(texture2d<int, access::sample> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 0);
+void textureLoad_c2a480(texture2d<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 0);
+}
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureLoad_c2a480(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c2a480(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl
index d1da070..f8a1b42 100644
--- a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c378ee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl
index 83a8003..282257c 100644
--- a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c378ee(texture2d_ms<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_c378ee(texture2d_ms<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+  textureLoad_c378ee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c378ee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl
index 4406d38..a64e8d0 100644
--- a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c40dcb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl
index c0878ea..978e62e 100644
--- a/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c40dcb.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c40dcb(texture2d_array<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_c40dcb(texture2d_array<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureLoad_c40dcb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c40dcb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl
index 6651780..a8e51a1 100644
--- a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c456bc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl
index 57f7f80..3d6648f 100644
--- a/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c456bc.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c456bc(texture3d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_c456bc(texture3d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureLoad_c456bc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c456bc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl
index fdf3e7e..696a14a 100644
--- a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c7cbed();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl
index bb8ca4c..398e55c 100644
--- a/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c7cbed.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c7cbed(texture1d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1));
+void textureLoad_c7cbed(texture1d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureLoad_c7cbed(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c7cbed(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl
index a4e221a..b3d52e7 100644
--- a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_c9cc40();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl
index 688f152..9956489 100644
--- a/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/c9cc40.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_c9cc40(texture1d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint(1));
+void textureLoad_c9cc40(texture1d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureLoad_c9cc40(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_c9cc40(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl
index 623b5ec..d1fc316 100644
--- a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_d5c48d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl
index 779df84..7ce7b01 100644
--- a/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/d5c48d.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_d5c48d(texture2d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_d5c48d(texture2d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureLoad_d5c48d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_d5c48d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl
index e8e4c29..0816747 100644
--- a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_d81c57();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl
index b5c8a96..cb89b9c 100644
--- a/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/d81c57.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_d81c57(texture1d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1));
+void textureLoad_d81c57(texture1d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureLoad_d81c57(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_d81c57(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl
index 6d00258..8f1f443 100644
--- a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_d8617f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl
index bec271a..e936681 100644
--- a/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/d8617f.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_d8617f(texture2d_array<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_d8617f(texture2d_array<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureLoad_d8617f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_d8617f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl
index 5d1f27a..46091ee 100644
--- a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_dbd554();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl
index 944ead2..f744119 100644
--- a/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/dbd554.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_dbd554(texture2d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_dbd554(texture2d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureLoad_dbd554(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_dbd554(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl
index 240d994..8149e79 100644
--- a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_ddeed3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl
index c00941a..e9ca3a4 100644
--- a/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/ddeed3.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_ddeed3(texture1d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint(1));
+void textureLoad_ddeed3(texture1d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureLoad_ddeed3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_ddeed3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl
index 4a93c04..75d4d95 100644
--- a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_dee8e7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl
index c672c84..dd88b08 100644
--- a/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/dee8e7.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_dee8e7(texture2d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_dee8e7(texture2d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureLoad_dee8e7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_dee8e7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl
index 977c75f..eb0cd78 100644
--- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_e3d2cc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl
index 6a8bdb7..ff18046 100644
--- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_e3d2cc(texture2d_ms<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_e3d2cc(texture2d_ms<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+  textureLoad_e3d2cc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_e3d2cc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl
index 382385b..b61dd42 100644
--- a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_e65916();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl
index 3f4e425..25bb247 100644
--- a/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/e65916.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_e65916(texture3d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_e65916(texture3d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_2) {
+  textureLoad_e65916(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_e65916(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl
index 7689f7c..3bee800 100644
--- a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_e893d7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl
index 9abb212..a9c1f6d 100644
--- a/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/e893d7.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_e893d7(texture2d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_e893d7(texture2d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_2) {
+  textureLoad_e893d7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_e893d7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl
index 54223d8..2ac4a4c 100644
--- a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_eb573b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl
index 5e563a8..1fb4723 100644
--- a/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/eb573b.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_eb573b(texture2d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_eb573b(texture2d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_2) {
+  textureLoad_eb573b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_eb573b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl
index be6835e..7de5289 100644
--- a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_ecc823();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl
index bfe59d6..aa45660 100644
--- a/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/ecc823.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_ecc823(texture2d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()));
+void textureLoad_ecc823(texture2d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_2) {
+  textureLoad_ecc823(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_ecc823(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl
index 35e9445..6d34276 100644
--- a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_ef5405();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl
index fee857e..b7daadb 100644
--- a/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/ef5405.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_ef5405(texture3d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_ef5405(texture3d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureLoad_ef5405(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_ef5405(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl
index 035c43a..2cd781d 100644
--- a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_f06b69();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl
index e511056..b78e551 100644
--- a/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/f06b69.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_f06b69(texture1d<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint(1));
+void textureLoad_f06b69(texture1d<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_2) {
+  textureLoad_f06b69(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_f06b69(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl
index a57544b..d627536 100644
--- a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_f379e2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl
index bb3742a..49dd335 100644
--- a/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/f379e2.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_f379e2(texture2d_array<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_f379e2(texture2d_array<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureLoad_f379e2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_f379e2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl
index a71a08a..ad6c64a 100644
--- a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_f56e6f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl
index 29638ff..65ec0aa 100644
--- a/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/f56e6f.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_f56e6f(texture3d<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_f56e6f(texture3d<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_2) {
+  textureLoad_f56e6f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_f56e6f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl
index df40f2a..c947f50 100644
--- a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_f74bd8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl
index 10535f9..f43f9b5 100644
--- a/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/f74bd8.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_f74bd8(texture3d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_f74bd8(texture3d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureLoad_f74bd8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_f74bd8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl
index 429e62d..f1ebea1 100644
--- a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_fc6d36();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl
index cda4b34..26b5c46 100644
--- a/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/fc6d36.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_fc6d36(texture2d_array<int, access::read> tint_symbol_2) {
-  int4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_fc6d36(texture2d_array<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureLoad_fc6d36(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_fc6d36(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl
index a0a5f9d..03f5160 100644
--- a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_fdebd0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl
index 1e635df..22b0fb9 100644
--- a/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/fdebd0.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_fdebd0(texture2d_array<uint, access::read> tint_symbol_2) {
-  uint4 res = tint_symbol_2.read(uint2(int2()), 1);
+void textureLoad_fdebd0(texture2d_array<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureLoad_fdebd0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_fdebd0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl
index 76e9582..7ce653e 100644
--- a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_fe222a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl
index 0992418..c8f043e 100644
--- a/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/fe222a.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_fe222a(texture1d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint(1));
+void textureLoad_fe222a(texture1d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_2) {
+  textureLoad_fe222a(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_fe222a(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl
index 1fe6703..c5f126d 100644
--- a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureLoad_feab99();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl
index 072e027..187869c 100644
--- a/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureLoad/feab99.wgsl.expected.msl
@@ -9,14 +9,20 @@
   float4 value [[position]];
 };
 
-void textureLoad_feab99(texture3d<float, access::read> tint_symbol_2) {
-  float4 res = tint_symbol_2.read(uint3(int3()));
+void textureLoad_feab99(texture3d<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_2) {
+  textureLoad_feab99(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureLoad_feab99(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl
index 5408012..7ccc189 100644
--- a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_024820();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl
index b08d98a..4c7d325 100644
--- a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_024820(texture2d_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_024820(texture2d_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureNumLayers_024820(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_024820(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl
index 121eedc..97689f6 100644
--- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_053df7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl
index 09eef92..46a1852 100644
--- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_053df7(texturecube_array<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_053df7(texturecube_array<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureNumLayers_053df7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_053df7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl
index 88b65e0..725e642 100644
--- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_058cc3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl
index 7c2e7e3..7327477 100644
--- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_058cc3(texture2d_array<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_058cc3(texture2d_array<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureNumLayers_058cc3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_058cc3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl
index 5a8fd61..75cf60c 100644
--- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_09d05d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl
index 28157ad..7a4461b 100644
--- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_09d05d(texture2d_array<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_09d05d(texture2d_array<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureNumLayers_09d05d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_09d05d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl
index 4220184..1bfb035 100644
--- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_13b4ce();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl
index d48a68a..e91fc4b 100644
--- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_13b4ce(texture2d_array<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_13b4ce(texture2d_array<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureNumLayers_13b4ce(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_13b4ce(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl
index e22c7fb..46a495a 100644
--- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_22e53b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl
index 7fc1828..09c3768 100644
--- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_22e53b(texture2d_array<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_22e53b(texture2d_array<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureNumLayers_22e53b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_22e53b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl
index d8605ff..70f4f8e 100644
--- a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_2f6bb3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl
index 39a1ce0..640988f 100644
--- a/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/2f6bb3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_2f6bb3(texture2d_array<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_2f6bb3(texture2d_array<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureNumLayers_2f6bb3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_2f6bb3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl
index c89092b..9b0e9fe 100644
--- a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_315298();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl
index ce79ed8..38ba746 100644
--- a/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/315298.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_315298(texture2d_array<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_315298(texture2d_array<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureNumLayers_315298(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_315298(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl
index 32293ec..2624175 100644
--- a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_3615e3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl
index fa075f7..bf81a1c 100644
--- a/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/3615e3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_3615e3(texture2d_array<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_3615e3(texture2d_array<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureNumLayers_3615e3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_3615e3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl
index eb91acc..42f4d8c 100644
--- a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_390fd5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl
index 69cb563..c2b9c83 100644
--- a/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/390fd5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_390fd5(texture2d_array<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_390fd5(texture2d_array<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureNumLayers_390fd5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_390fd5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl
index da3140f..124ab6d 100644
--- a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_45155d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl
index 346ca65..552499b 100644
--- a/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/45155d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_45155d(texture2d_array<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_45155d(texture2d_array<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureNumLayers_45155d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_45155d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl
index 9ab86fd..5226985 100644
--- a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_4bf67b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl
index 9ec0df1..71df5e4 100644
--- a/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/4bf67b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_4bf67b(texture2d_array<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_4bf67b(texture2d_array<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureNumLayers_4bf67b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_4bf67b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl
index 7aa3f96..5fcd677 100644
--- a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_562013();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl
index 0bcbb68..aa1efc5 100644
--- a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_562013(texture2d_array<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_562013(texture2d_array<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureNumLayers_562013(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_562013(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl
index beb7478..f0a671f 100644
--- a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_57092f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl
index 1f4863c..e9f9323 100644
--- a/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/57092f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_57092f(texture2d_array<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_57092f(texture2d_array<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureNumLayers_57092f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_57092f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl
index 23b9859..9a46da2 100644
--- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_5d59cd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl
index 081ef51..023d182 100644
--- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_5d59cd(texturecube_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_5d59cd(texturecube_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureNumLayers_5d59cd(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_5d59cd(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl
index b894728..3b3e7c5 100644
--- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_68a65b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl
index 59335e9..bd4a550 100644
--- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_68a65b(texture2d_array<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_68a65b(texture2d_array<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureNumLayers_68a65b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_68a65b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl
index 9a29d96..fd57842 100644
--- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_778bd1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl
index 0253d3e..a953129 100644
--- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_778bd1(depthcube_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_778bd1(depthcube_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureNumLayers_778bd1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_778bd1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl
index 3183a27..a352bf5a 100644
--- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_7f1937();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl
index 222cf7d..d094de4 100644
--- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_7f1937(texture2d_array<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_7f1937(texture2d_array<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureNumLayers_7f1937(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_7f1937(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl
index 0799841..383ad27 100644
--- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_85f980();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl
index 3c7904b..0967c44 100644
--- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_85f980(texturecube_array<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_85f980(texturecube_array<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureNumLayers_85f980(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_85f980(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl
index 6209dc5..3833438 100644
--- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_87953e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl
index 4fb2af2..e64875b 100644
--- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_87953e(texture2d_array<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_87953e(texture2d_array<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureNumLayers_87953e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_87953e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl
index 0603e1f..5326a55 100644
--- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_893e7c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl
index fbab05e..ca4397b 100644
--- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_893e7c(texture2d_array<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_893e7c(texture2d_array<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureNumLayers_893e7c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_893e7c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl
index e12beac..a55a57b 100644
--- a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_938763();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl
index e33db79..a085d35 100644
--- a/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/938763.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_938763(texture2d_array<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_938763(texture2d_array<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureNumLayers_938763(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_938763(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl
index 15aea2d..463ebe2 100644
--- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_9700fb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl
index f71315f..7563653 100644
--- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_9700fb(texture2d_array<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_9700fb(texture2d_array<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureNumLayers_9700fb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_9700fb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl
index 339019e..dab107c 100644
--- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_a216d2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl
index 744b00e..dc42607 100644
--- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_a216d2(texture2d_array<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_a216d2(texture2d_array<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureNumLayers_a216d2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_a216d2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl
index 0f18614..bef0612 100644
--- a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_aa08a7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl
index 742c533..c0eb7ca 100644
--- a/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/aa08a7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_aa08a7(texture2d_array<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_aa08a7(texture2d_array<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureNumLayers_aa08a7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_aa08a7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl
index b983ecf..b3fde74 100644
--- a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_ab0c9b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl
index 1419272..071a947 100644
--- a/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/ab0c9b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_ab0c9b(texture2d_array<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_ab0c9b(texture2d_array<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureNumLayers_ab0c9b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_ab0c9b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl
index afe52d3..c99a1b3 100644
--- a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_b8cd76();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl
index 80b3c55..6c00f33 100644
--- a/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/b8cd76.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_b8cd76(texture2d_array<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_b8cd76(texture2d_array<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureNumLayers_b8cd76(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_b8cd76(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl
index 58ed81d..6ae1e4a 100644
--- a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_be1d70();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl
index e6be933..41158ad 100644
--- a/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/be1d70.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_be1d70(texture2d_array<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_be1d70(texture2d_array<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureNumLayers_be1d70(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_be1d70(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl
index 61b1d84..b1d63af 100644
--- a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_be3acb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl
index 74cae63..ded07b4 100644
--- a/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/be3acb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_be3acb(texture2d_array<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_be3acb(texture2d_array<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureNumLayers_be3acb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_be3acb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl
index d4e9f79..c398bb4 100644
--- a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_c09917();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl
index 33c9b86..a56a650 100644
--- a/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/c09917.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_c09917(texture2d_array<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_c09917(texture2d_array<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_2) {
+  textureNumLayers_c09917(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_c09917(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl
index 71a9624..23408e8 100644
--- a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_c7c7f2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl
index e417cdf..23cc7ab 100644
--- a/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/c7c7f2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_c7c7f2(texture2d_array<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_c7c7f2(texture2d_array<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_2) {
+  textureNumLayers_c7c7f2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_c7c7f2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl
index 026390a..fbcb123 100644
--- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_cd5dc8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl
index 8c49d95..43c8cdb 100644
--- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_cd5dc8(texture2d_array<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_cd5dc8(texture2d_array<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureNumLayers_cd5dc8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_cd5dc8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl
index 95ffefc..d8bc0a4 100644
--- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_d5b228();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl
index 8519317..89bc26e 100644
--- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_d5b228(texture2d_array<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_d5b228(texture2d_array<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureNumLayers_d5b228(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_d5b228(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl
index a209e24..43dd45a 100644
--- a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_e15642();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl
index 279401f..5b47547 100644
--- a/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/e15642.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_e15642(texture2d_array<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_e15642(texture2d_array<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_2) {
+  textureNumLayers_e15642(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_e15642(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl
index a7cfc8a..d41a821 100644
--- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_e31be1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl
index 74c73d2..037b86d 100644
--- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_e31be1(texture2d_array<float, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_e31be1(texture2d_array<float, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureNumLayers_e31be1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_e31be1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl
index cfed873..a15c460 100644
--- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_e653c0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl
index 6625911..6ef95ea 100644
--- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_e653c0(depth2d_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_e653c0(depth2d_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureNumLayers_e653c0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_e653c0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl
index b06ea98..110c6c9 100644
--- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_ee942f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl
index caa6978..bddf8a1 100644
--- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_ee942f(texture2d_array<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_ee942f(texture2d_array<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureNumLayers_ee942f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_ee942f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl
index 9b6e7a4..d6b9fa8 100644
--- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_f33005();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl
index 0aef002..37f4a9a 100644
--- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_f33005(texture2d_array<int, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_f33005(texture2d_array<int, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureNumLayers_f33005(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_f33005(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl
index 234f8a0..288d736 100644
--- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_fcec98();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl
index b19a43b..9e764d3 100644
--- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_fcec98(texture2d_array<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_fcec98(texture2d_array<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureNumLayers_fcec98(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_fcec98(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl
index 6689c51..0b420c2 100644
--- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLayers_ff5e89();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl
index 071635e..1d0a638 100644
--- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLayers_ff5e89(texture2d_array<uint, access::write> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_array_size());
+void textureNumLayers_ff5e89(texture2d_array<uint, access::write> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_array_size());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureNumLayers_ff5e89(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureNumLayers_ff5e89(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl
index 4014d82..404709c 100644
--- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_076cb5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl
index d43f837..14c225f 100644
--- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_076cb5(depthcube<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_076cb5(depthcube<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureNumLevels_076cb5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_076cb5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl
index 15ca251..039799d 100644
--- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_080d95();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl
index 1212cf0..b05f3ee 100644
--- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_080d95(texturecube<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_080d95(texturecube<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureNumLevels_080d95(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_080d95(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl
index 09cdf3a..a903d81 100644
--- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_09ddd0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl
index ab8fc7b..c1df2e6 100644
--- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_09ddd0(texture2d<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_09ddd0(texture2d<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureNumLevels_09ddd0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_09ddd0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl
index 4e0e12d..71be44d 100644
--- a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_105988();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl
index 9fba11e..3ed02e4 100644
--- a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_105988(texture2d_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_105988(texture2d_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureNumLevels_105988(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_105988(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl
index 0331090..4ef4ca8 100644
--- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_1e6f3b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl
index 8a84fac..bd923ca 100644
--- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_1e6f3b(texture1d<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_1e6f3b(texture1d<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureNumLevels_1e6f3b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_1e6f3b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl
index e619001..958afdc 100644
--- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_23f750();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl
index 69bf6aa..588b57b 100644
--- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_23f750(texture2d<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_23f750(texture2d<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureNumLevels_23f750(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_23f750(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl
index ef2d08b..7aa8570 100644
--- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_2c3575();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl
index 0326a45..4acb4d6 100644
--- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_2c3575(depthcube_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_2c3575(depthcube_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureNumLevels_2c3575(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_2c3575(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl
index 3d42d38..f22518c 100644
--- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_32a0ae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl
index 2b939bd..985edcb 100644
--- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_32a0ae(texture1d<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_32a0ae(texture1d<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureNumLevels_32a0ae(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_32a0ae(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl
index c8a722c..7091b8e 100644
--- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_5101cf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl
index d04511a..c675b3f 100644
--- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_5101cf(texture2d_array<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_5101cf(texture2d_array<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureNumLevels_5101cf(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_5101cf(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl
index 4fe8de8..40f25f2 100644
--- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_51b5bb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl
index cf592d9..c1bb13c 100644
--- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_51b5bb(texture1d<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_51b5bb(texture1d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureNumLevels_51b5bb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_51b5bb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl
index 771f219..acaeff7 100644
--- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_897aaf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl
index 0d4b582..2bf8904 100644
--- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_897aaf(texturecube<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_897aaf(texturecube<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureNumLevels_897aaf(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_897aaf(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl
index e12ce59..4e34c92 100644
--- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_9da7a5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl
index d3ff2df..f079eea 100644
--- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_9da7a5(texture3d<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_9da7a5(texture3d<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureNumLevels_9da7a5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_9da7a5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl
index 6a2f7d2..b93c10e 100644
--- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_a91c03();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl
index 2a9047d..52ef85b 100644
--- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_a91c03(texturecube_array<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_a91c03(texturecube_array<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureNumLevels_a91c03(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_a91c03(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl
index 9f46f5b..8408bc8 100644
--- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_aee7c8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl
index e8235f7..30353f3 100644
--- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_aee7c8(texturecube_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_aee7c8(texturecube_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureNumLevels_aee7c8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_aee7c8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl
index d3c0ca9..f69cf8c 100644
--- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_b1b12b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl
index bd18c15..ecaa1cc 100644
--- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_b1b12b(depth2d<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_b1b12b(depth2d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureNumLevels_b1b12b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_b1b12b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl
index 1baa2e0..b7ae80c 100644
--- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_b4f5ea();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl
index 2251f59..13415a6 100644
--- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_b4f5ea(texture3d<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_b4f5ea(texture3d<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureNumLevels_b4f5ea(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_b4f5ea(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl
index ccd62a4..c97a707 100644
--- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_d004a9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl
index b1ec41d..6dc92ef 100644
--- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_d004a9(texture2d_array<int, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_d004a9(texture2d_array<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureNumLevels_d004a9(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_d004a9(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl
index aaa711a..5c8af17 100644
--- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_dca09e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl
index 8fa8f41..b347341 100644
--- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_dca09e(texture3d<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_dca09e(texture3d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureNumLevels_dca09e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_dca09e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl
index 9313856..f0b07cc 100644
--- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_e67231();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl
index d2dffa1..2e89dbf 100644
--- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_e67231(texture2d<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_e67231(texture2d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureNumLevels_e67231(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_e67231(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl
index 80bbd45..60a817d 100644
--- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_ed078b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl
index e3caac8..a3c75b1 100644
--- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_ed078b(texturecube<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_ed078b(texturecube<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureNumLevels_ed078b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_ed078b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl
index a7bbe79..c6079db 100644
--- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_f46ec6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl
index ef13bc6..daa9048 100644
--- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_f46ec6(texturecube_array<uint, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_f46ec6(texturecube_array<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureNumLevels_f46ec6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_f46ec6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl
index 80a3ebb..3885eb1 100644
--- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumLevels_f5828d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl
index 91b3f31..9a85d11 100644
--- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumLevels_f5828d(depth2d_array<float, access::sample> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_mip_levels());
+void textureNumLevels_f5828d(depth2d_array<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_mip_levels());
+}
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureNumLevels_f5828d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  textureNumLevels_f5828d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl
index 520b0de..0e8148b 100644
--- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumSamples_2c6f14();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl
index c3b22ea..9da173f 100644
--- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumSamples_2c6f14(texture2d_ms<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_samples());
+void textureNumSamples_2c6f14(texture2d_ms<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_samples());
+}
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+  textureNumSamples_2c6f14(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumSamples_2c6f14(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl
index 0e7092e..4d7256e 100644
--- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumSamples_42f8bb();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl
index aa8bbd9..520f484 100644
--- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumSamples_42f8bb(texture2d_ms<uint, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_samples());
+void textureNumSamples_42f8bb(texture2d_ms<uint, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_samples());
+}
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+  textureNumSamples_42f8bb(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumSamples_42f8bb(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl
index 1ff9771..4cbc214 100644
--- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumSamples_449d23();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl
index 2b38a2b..7935aff 100644
--- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumSamples_449d23(texture2d_ms<int, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_samples());
+void textureNumSamples_449d23(texture2d_ms<int, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_samples());
+}
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+  textureNumSamples_449d23(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumSamples_449d23(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl
index a585b13..106cba4 100644
--- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.hlsl
@@ -10,10 +10,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureNumSamples_a3c8a0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl
index b2ba8c6..a5fbae4 100644
--- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureNumSamples_a3c8a0(depth2d_ms<float, access::read> tint_symbol_2) {
-  int res = int(tint_symbol_2.get_num_samples());
+void textureNumSamples_a3c8a0(depth2d_ms<float, access::read> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_num_samples());
+}
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  textureNumSamples_a3c8a0(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  textureNumSamples_a3c8a0(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl
index 6fb7e54..8662f0c 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleCompareLevel_011a8f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
index 1d5f63f..3b3c683 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleCompareLevel_011a8f(depth2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1, 1.0f, level(0), int2());
+void textureSampleCompareLevel_011a8f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1, 1.0f, level(0), int2());
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleCompareLevel_011a8f(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_011a8f(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleCompareLevel_011a8f(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleCompareLevel_011a8f(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleCompareLevel_011a8f(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleCompareLevel_011a8f(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl
index 32135fe..b37ef58 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleCompareLevel_1116ed();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
index 1501fc5..a960b68 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleCompareLevel_1116ed(depth2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1, 1.0f, level(0));
+void textureSampleCompareLevel_1116ed(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1, 1.0f, level(0));
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleCompareLevel_1116ed(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_1116ed(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleCompareLevel_1116ed(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleCompareLevel_1116ed(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleCompareLevel_1116ed(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleCompareLevel_1116ed(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl
index 4d3c9a9..0596d33 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleCompareLevel_1568e3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
index 6382fd5..d0d7d39 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleCompareLevel_1568e3(depthcube<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample_compare(tint_symbol_3, float3(), 1.0f, level(0));
+void textureSampleCompareLevel_1568e3(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(), 1.0f, level(0));
 }
 
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleCompareLevel_1568e3(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_1568e3(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleCompareLevel_1568e3(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleCompareLevel_1568e3(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleCompareLevel_1568e3(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleCompareLevel_1568e3(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl
index 52d0476..9b86db7 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleCompareLevel_2ad2b1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
index c838bed..ec4036b 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleCompareLevel_2ad2b1(depth2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1.0f, level(0));
+void textureSampleCompareLevel_2ad2b1(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1.0f, level(0));
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleCompareLevel_2ad2b1(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_2ad2b1(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleCompareLevel_2ad2b1(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleCompareLevel_2ad2b1(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleCompareLevel_2ad2b1(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleCompareLevel_2ad2b1(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl
index 7438832..6429d44 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleCompareLevel_4cf3a2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
index d7a3b56..6ff319f 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleCompareLevel_4cf3a2(depthcube_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample_compare(tint_symbol_3, float3(), 1, 1.0f, level(0));
+void textureSampleCompareLevel_4cf3a2(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(), 1, 1.0f, level(0));
 }
 
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleCompareLevel_4cf3a2(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_4cf3a2(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleCompareLevel_4cf3a2(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleCompareLevel_4cf3a2(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleCompareLevel_4cf3a2(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleCompareLevel_4cf3a2(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl
index 6013b19..a96b631 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleCompareLevel_f8121c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
index 485e108..13a12be 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleCompareLevel_f8121c(depth2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample_compare(tint_symbol_3, float2(), 1.0f, level(0), int2());
+void textureSampleCompareLevel_f8121c(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(), 1.0f, level(0), int2());
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleCompareLevel_f8121c(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_f8121c(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleCompareLevel_f8121c(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleCompareLevel_f8121c(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleCompareLevel_f8121c(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleCompareLevel_f8121c(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl
index cf45e6d..d983c75 100644
--- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_21402b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
index 219cb0f..a287050 100644
--- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_21402b(texture3d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), gradient3d(float3(), float3()));
+void textureSampleGrad_21402b(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), gradient3d(float3(), float3()));
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_21402b(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_21402b(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_21402b(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_21402b(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_21402b(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_21402b(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl
index 19eae0d..618dadc 100644
--- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_2ecd8f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
index 7c2dc9f..d358769 100644
--- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_2ecd8f(texture2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, gradient2d(float2(), float2()));
+void textureSampleGrad_2ecd8f(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, gradient2d(float2(), float2()));
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_2ecd8f(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_2ecd8f(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_2ecd8f(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_2ecd8f(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_2ecd8f(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_2ecd8f(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl
index 879825a..a3aa56f 100644
--- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_468f88();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
index 4e95d39..e51e717 100644
--- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_468f88(texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), gradient2d(float2(), float2()), int2());
+void textureSampleGrad_468f88(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), gradient2d(float2(), float2()), int2());
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_468f88(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_468f88(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_468f88(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_468f88(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_468f88(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_468f88(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl
index 1bfe914..434705b 100644
--- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_521263();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
index ade4b16..b777495 100644
--- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_521263(texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), gradient2d(float2(), float2()));
+void textureSampleGrad_521263(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), gradient2d(float2(), float2()));
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_521263(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_521263(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_521263(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_521263(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_521263(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_521263(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl
index f3bcc92..279979d 100644
--- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_5312f4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
index 4509bb3..8feeefc 100644
--- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_5312f4(texturecube<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), gradientcube(float3(), float3()));
+void textureSampleGrad_5312f4(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), gradientcube(float3(), float3()));
 }
 
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_5312f4(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_5312f4(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_5312f4(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_5312f4(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_5312f4(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_5312f4(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl
index 61740d2..6768f3a 100644
--- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_872f00();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
index f946dad..b343742 100644
--- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_872f00(texture2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, gradient2d(float2(), float2()), int2());
+void textureSampleGrad_872f00(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, gradient2d(float2(), float2()), int2());
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_872f00(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_872f00(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_872f00(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_872f00(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_872f00(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_872f00(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl
index 122b16a..72c2207 100644
--- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_e383db();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
index e25de9b..5316216 100644
--- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_e383db(texturecube_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), 1, gradientcube(float3(), float3()));
+void textureSampleGrad_e383db(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), 1, gradientcube(float3(), float3()));
 }
 
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_e383db(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_e383db(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_e383db(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_e383db(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_e383db(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_e383db(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl
index f76f445..a3855dd 100644
--- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleGrad_e9a2f7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
index 814d619..8da1b01 100644
--- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleGrad_e9a2f7(texture3d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), gradient3d(float3(), float3()), int3());
+void textureSampleGrad_e9a2f7(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), gradient3d(float3(), float3()), int3());
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleGrad_e9a2f7(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_e9a2f7(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleGrad_e9a2f7(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleGrad_e9a2f7(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleGrad_e9a2f7(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleGrad_e9a2f7(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl
index 78c5d89..0f2e171 100644
--- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_02be59();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
index 06b7ded..e044bbd 100644
--- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_02be59(depth2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample(tint_symbol_3, float2(), level(0));
+void textureSampleLevel_02be59(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(), level(0));
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_02be59(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_02be59(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_02be59(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_02be59(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_02be59(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_02be59(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl
index ac25ece..7998231 100644
--- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_0bdd9a();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
index b3008f4..1dedfaa 100644
--- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_0bdd9a(texturecube_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), 1, level(1.0f));
+void textureSampleLevel_0bdd9a(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), 1, level(1.0f));
 }
 
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_0bdd9a(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_0bdd9a(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_0bdd9a(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_0bdd9a(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_0bdd9a(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_0bdd9a(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl
index c137247..b21e9fd 100644
--- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_1b0291();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
index 3513f47..31fec00 100644
--- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_1b0291(depthcube<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample(tint_symbol_3, float3(), level(0));
+void textureSampleLevel_1b0291(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float3(), level(0));
 }
 
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_1b0291(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_1b0291(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_1b0291(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_1b0291(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_1b0291(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_1b0291(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl
index b9f8cb6..9231e91 100644
--- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_1bf73e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
index 0227e16..8a195e2 100644
--- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_1bf73e(depth2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(0));
+void textureSampleLevel_1bf73e(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(0));
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_1bf73e(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_1bf73e(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_1bf73e(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_1bf73e(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_1bf73e(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_1bf73e(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl
index f86a1fa..71a5560 100644
--- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_302be4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
index 67386fc..b0ab284 100644
--- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_302be4(texture2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(1.0f));
+void textureSampleLevel_302be4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(1.0f));
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_302be4(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_302be4(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_302be4(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_302be4(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_302be4(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_302be4(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl
index f7a0d52..0c1ee21 100644
--- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_47daa4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
index 7c0b3af..fed118a 100644
--- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_47daa4(depth2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample(tint_symbol_3, float2(), level(0), int2());
+void textureSampleLevel_47daa4(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(), level(0), int2());
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_47daa4(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_47daa4(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_47daa4(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_47daa4(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_47daa4(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_47daa4(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl
index 2afa96b..3e1fd56 100644
--- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_690d95();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
index 19335c7..a077b7d 100644
--- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_690d95(texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), level(1.0f), int2());
+void textureSampleLevel_690d95(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), level(1.0f), int2());
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_690d95(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_690d95(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_690d95(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_690d95(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_690d95(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_690d95(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl
index 436fd64..9a039f3 100644
--- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_979816();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
index 52e5e0d..9e703fc 100644
--- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_979816(texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), level(0.0f));
+void textureSampleLevel_979816(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), level(0.0f));
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_979816(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_979816(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_979816(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_979816(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_979816(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_979816(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl
index 62bf3fd..9d059de 100644
--- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_9bd37b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
index f7ba245..635aa58 100644
--- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_9bd37b(texture3d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f), int3());
+void textureSampleLevel_9bd37b(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), level(1.0f), int3());
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_9bd37b(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_9bd37b(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_9bd37b(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_9bd37b(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_9bd37b(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_9bd37b(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl
index 38f0bd1..c1d9157 100644
--- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_a4af26();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
index 777e17e..5d3ef95 100644
--- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_a4af26(texture2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(1.0f), int2());
+void textureSampleLevel_a4af26(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(1.0f), int2());
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_a4af26(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_a4af26(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_a4af26(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_a4af26(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_a4af26(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_a4af26(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl
index 8911de5..2110c77 100644
--- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_abfcc0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
index 1682004..5a60388 100644
--- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_abfcc0(texture3d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f));
+void textureSampleLevel_abfcc0(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), level(1.0f));
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_abfcc0(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_abfcc0(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_abfcc0(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_abfcc0(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_abfcc0(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_abfcc0(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl
index e20afdc..e03bc66 100644
--- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_ae5e39();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
index a538eed..47fae9b 100644
--- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_ae5e39(depthcube_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample(tint_symbol_3, float3(), 1, level(0));
+void textureSampleLevel_ae5e39(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float3(), 1, level(0));
 }
 
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_ae5e39(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_ae5e39(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_ae5e39(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_ae5e39(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_ae5e39(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_ae5e39(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl
index e5a0aee..c375c7c 100644
--- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_ba93b3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
index b10f15c..1bde28f 100644
--- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_ba93b3(depth2d_array<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float res = tint_symbol_2.sample(tint_symbol_3, float2(), 1, level(0), int2());
+void textureSampleLevel_ba93b3(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(), 1, level(0), int2());
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_ba93b3(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_ba93b3(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_ba93b3(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_ba93b3(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_ba93b3(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_ba93b3(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl
index 235499f..92b39bb 100644
--- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_c32df7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
index 62943ca..3a24298 100644
--- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_c32df7(texturecube<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f));
+void textureSampleLevel_c32df7(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(), level(1.0f));
 }
 
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_c32df7(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_c32df7(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_c32df7(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_c32df7(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_c32df7(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_c32df7(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl
index a0ea4e6..69ec00e 100644
--- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.hlsl
@@ -9,10 +9,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureSampleLevel_c6aca6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
index bbe7966..e3c3831 100644
--- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
@@ -5,23 +5,29 @@
   float4 value [[position]];
 };
 
-void textureSampleLevel_c6aca6(texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
-  float4 res = tint_symbol_2.sample(tint_symbol_3, float2(), level(1.0f));
+void textureSampleLevel_c6aca6(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(), level(1.0f));
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
-  textureSampleLevel_c6aca6(tint_symbol_4, tint_symbol_5);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_c6aca6(tint_symbol_3, tint_symbol_4);
+  return float4();
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
-  textureSampleLevel_c6aca6(tint_symbol_6, tint_symbol_7);
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+  textureSampleLevel_c6aca6(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
-  textureSampleLevel_c6aca6(tint_symbol_8, tint_symbol_9);
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+  textureSampleLevel_c6aca6(tint_symbol_9, tint_symbol_10);
   return;
 }
 
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl
index 6a0b802..ed04222 100644
--- a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_05ce15();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl
index 905ce5a..c041d58 100644
--- a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_05ce15(texture2d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()));
+void textureStore_05ce15(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_05ce15(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_05ce15(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl
index 00c6038..39c0185 100644
--- a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_064c7f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl
index fecd34e..6f99242 100644
--- a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_064c7f(texture2d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()));
+void textureStore_064c7f(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_064c7f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_064c7f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl
index d6c3092..e6cd71a 100644
--- a/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/068641.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_068641();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl b/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl
index efeb713..4853ced 100644
--- a/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/068641.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_068641(texture3d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint3(int3()));
+void textureStore_068641(texture3d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureStore_068641(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_068641(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl
index 86fef18..a7f40f7 100644
--- a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_0af6b5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl
index c8f9a60..1e3da7e 100644
--- a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_0af6b5(texture2d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()));
+void textureStore_0af6b5(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_0af6b5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_0af6b5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl
index 0718849..0ca7a42 100644
--- a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_0c3dff();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl
index 181dcde..e3cbd45 100644
--- a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_0c3dff(texture2d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()));
+void textureStore_0c3dff(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_0c3dff(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_0c3dff(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl
index 6b2b0d7..5ff0d44 100644
--- a/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/102722.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_102722();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl b/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl
index e6798fe..7857f9f 100644
--- a/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/102722.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_102722(texture1d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint(1));
+void textureStore_102722(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_102722(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_102722(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl
index f16d991..7394a04 100644
--- a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_1bbd08();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl
index 358a92c..dea867a 100644
--- a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_1bbd08(texture3d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint3(int3()));
+void textureStore_1bbd08(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_1bbd08(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_1bbd08(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl
index 4e59992..18e87d3 100644
--- a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_1c02e7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl
index dbadaba..d4cfdf2 100644
--- a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_1c02e7(texture2d_array<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()), 1);
+void textureStore_1c02e7(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_1c02e7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_1c02e7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl
index 354610a..3621eee 100644
--- a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_22d955();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl
index 96ab7ca..ae923cf 100644
--- a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_22d955(texture2d_array<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()), 1);
+void textureStore_22d955(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_22d955(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_22d955(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl
index 0f4f218..9e7dc61 100644
--- a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_26bf70();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl
index 0478e59..9a6b102 100644
--- a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_26bf70(texture2d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()));
+void textureStore_26bf70(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_26bf70(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_26bf70(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl
index e97dd7a..4a08b65 100644
--- a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_2796b4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl
index 22b40b0..be3965b 100644
--- a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_2796b4(texture3d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint3(int3()));
+void textureStore_2796b4(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_2796b4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_2796b4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl
index bdef603..07e338e 100644
--- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_2ac6c7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl
index 2262931..29ad314 100644
--- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_2ac6c7(texture1d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint(1));
+void textureStore_2ac6c7(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_2ac6c7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_2ac6c7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl
index dd4d347..7bdb1f6 100644
--- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_2eb2a4();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl
index b0c20f5..3fc966a 100644
--- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_2eb2a4(texture1d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint(1));
+void textureStore_2eb2a4(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_2eb2a4(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_2eb2a4(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl
index 891d155..a0822a0 100644
--- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_2ed2a3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl
index c5dfae2..6e9b584 100644
--- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_2ed2a3(texture1d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint(1));
+void textureStore_2ed2a3(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_2ed2a3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_2ed2a3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl
index 5fa3d20..c9378fa 100644
--- a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_31745b();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl
index a57589a..5fad319 100644
--- a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_31745b(texture2d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()));
+void textureStore_31745b(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_31745b(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_31745b(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl
index fa61fc3..35cb76f 100644
--- a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_32f368();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl
index 71c9245..be3045e 100644
--- a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_32f368(texture2d_array<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()), 1);
+void textureStore_32f368(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_32f368(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_32f368(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl
index 7429918..5a823d4 100644
--- a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_331aee();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl
index 0eeef88..62e62dd 100644
--- a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_331aee(texture3d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint3(int3()));
+void textureStore_331aee(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_331aee(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_331aee(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl
index dca4cfd..9ab5846 100644
--- a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_38e8d7();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl
index ac9cdd5..0a7fa79 100644
--- a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_38e8d7(texture2d_array<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()), 1);
+void textureStore_38e8d7(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_38e8d7(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_38e8d7(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl
index 27f3a36..7e1c172 100644
--- a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_3a52ac();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl
index 0c932b1..22fa157 100644
--- a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_3a52ac(texture2d_array<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()), 1);
+void textureStore_3a52ac(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_3a52ac(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_3a52ac(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl
index ebae98e..a81883c 100644
--- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_3bb7a1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl
index 1ae07e4..8f2e7cf 100644
--- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_3bb7a1(texture2d_array<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()), 1);
+void textureStore_3bb7a1(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_3bb7a1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_3bb7a1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl
index 080d475..a9f622d 100644
--- a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_3bec15();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl
index cda786e..3364232 100644
--- a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_3bec15(texture1d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint(1));
+void textureStore_3bec15(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_3bec15(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_3bec15(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl
index a79520f..593faf2 100644
--- a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_441ba8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl
index 4dd21a5..2f99fdf 100644
--- a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_441ba8(texture3d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint3(int3()));
+void textureStore_441ba8(texture3d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureStore_441ba8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_441ba8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl
index a899c7e..b8e3f68 100644
--- a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_4fc057();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl
index 39d0e12..631009a 100644
--- a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_4fc057(texture2d_array<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()), 1);
+void textureStore_4fc057(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_4fc057(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_4fc057(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl
index db02757..7fa35a8 100644
--- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_5a2f8f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl
index 2fa1d0e..fdbd1c5 100644
--- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_5a2f8f(texture1d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint(1));
+void textureStore_5a2f8f(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_5a2f8f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_5a2f8f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl
index 968507f..811a27c 100644
--- a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_60975f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl
index 1cde839..e9e4275 100644
--- a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_60975f(texture2d_array<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()), 1);
+void textureStore_60975f(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_60975f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_60975f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl
index a1b0987..95a07d3 100644
--- a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_682fd6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl
index 6b9bd64..457dcff 100644
--- a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_682fd6(texture2d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()));
+void textureStore_682fd6(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_682fd6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_682fd6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl
index 1f0ded5..d2c7cac 100644
--- a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_6b75c3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl
index bbedf08..457a6b2 100644
--- a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_6b75c3(texture1d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint(1));
+void textureStore_6b75c3(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_6b75c3(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_6b75c3(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl
index 1b1cbed..630297a 100644
--- a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_6b80d2();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl
index e6d79a8..fa97d97 100644
--- a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_6b80d2(texture1d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint(1));
+void textureStore_6b80d2(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_6b80d2(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_6b80d2(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl
index 1d3d6a6..e635599 100644
--- a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_6cff2e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl
index 46eb274..1653c87 100644
--- a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_6cff2e(texture2d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()));
+void textureStore_6cff2e(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_6cff2e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_6cff2e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl
index 10a2b76..a227f8f 100644
--- a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_6da692();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl
index d29caad..ac4c507 100644
--- a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_6da692(texture2d_array<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()), 1);
+void textureStore_6da692(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_6da692(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_6da692(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl
index 4d587bb..b13dd30 100644
--- a/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/731349.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_731349();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl b/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl
index fe597ea..29ceabc 100644
--- a/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/731349.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_731349(texture2d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()));
+void textureStore_731349(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_731349(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_731349(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl
index 68edf8a..5e8ed8a 100644
--- a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_752da6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl
index 28e75f7..999bc50 100644
--- a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_752da6(texture2d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()));
+void textureStore_752da6(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_752da6(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_752da6(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl
index 442a105..ad9871f 100644
--- a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_77c0ae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl
index 7ea0267..de193a5 100644
--- a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_77c0ae(texture2d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()));
+void textureStore_77c0ae(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_77c0ae(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_77c0ae(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl
index f0207bc..312c3d8 100644
--- a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_7cec8d();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl
index af5784b..5b1c950 100644
--- a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_7cec8d(texture2d_array<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()), 1);
+void textureStore_7cec8d(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_7cec8d(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_7cec8d(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl
index 51e509c..aa79640 100644
--- a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_7f7fae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl
index 0ace63b..b1482ce 100644
--- a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_7f7fae(texture1d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint(1));
+void textureStore_7f7fae(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_7f7fae(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_7f7fae(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl
index 1373d28..e8cf229 100644
--- a/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/804942.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_804942();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl b/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl
index 93097c5..e58994e 100644
--- a/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/804942.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_804942(texture2d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()));
+void textureStore_804942(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_804942(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_804942(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl
index f31ad09..1259ff3 100644
--- a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_805dae();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl
index a1c32f7..d8fa594 100644
--- a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_805dae(texture2d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()));
+void textureStore_805dae(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_805dae(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_805dae(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl
index 8adf950..c73ba1f 100644
--- a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_83bcc1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl
index 81093f4..ac927b7 100644
--- a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_83bcc1(texture1d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint(1));
+void textureStore_83bcc1(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_83bcc1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_83bcc1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl
index b2d9eaf..2f1f45b 100644
--- a/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/872747.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_872747();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl b/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl
index 3b310db..4cdef4d 100644
--- a/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/872747.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_872747(texture1d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint(1));
+void textureStore_872747(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_872747(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_872747(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl
index 59f63af..7ce2046 100644
--- a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_8e0479();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl
index 18d1a53..afda699 100644
--- a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_8e0479(texture2d_array<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()), 1);
+void textureStore_8e0479(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_8e0479(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_8e0479(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl
index dd64027..6a9b01f 100644
--- a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_8f71a1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl
index b05a007..9070535 100644
--- a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_8f71a1(texture3d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint3(int3()));
+void textureStore_8f71a1(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_8f71a1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_8f71a1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl
index 6aa3761..4ec5ed2 100644
--- a/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/969534.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_969534();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl b/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl
index 0314598..9ff764b 100644
--- a/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/969534.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_969534(texture1d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint(1));
+void textureStore_969534(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_969534(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_969534(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl
index ead5d45..f57c02d 100644
--- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_9a3ecc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl
index 922ad72..09a9db9 100644
--- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_9a3ecc(texture3d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint3(int3()));
+void textureStore_9a3ecc(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_9a3ecc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_9a3ecc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl
index 3467927..1f1816f 100644
--- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_9d9cd5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl
index 2b264c5..e08d4a1 100644
--- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_9d9cd5(texture2d_array<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()), 1);
+void textureStore_9d9cd5(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_9d9cd5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_9d9cd5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl
index eb90843..8dc4ac1 100644
--- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_9e3ec5();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl
index 85aa4c9..d08f76d 100644
--- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_9e3ec5(texture2d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()));
+void textureStore_9e3ec5(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_9e3ec5(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_9e3ec5(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl
index a71ff12..e80007e 100644
--- a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_ac67aa();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl
index 6d64746..47a142d 100644
--- a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_ac67aa(texture3d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint3(int3()));
+void textureStore_ac67aa(texture3d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureStore_ac67aa(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_ac67aa(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl
index 1d77639..60cde5e 100644
--- a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_b706b1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl
index 1136938..9d9c3f7 100644
--- a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_b706b1(texture3d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint3(int3()));
+void textureStore_b706b1(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_b706b1(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_b706b1(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl
index bf654d6..9b7d173 100644
--- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_bbcb7f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl
index 2d4ab0f..4e92cd5 100644
--- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_bbcb7f(texture2d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()));
+void textureStore_bbcb7f(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_bbcb7f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_bbcb7f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl
index 8299ac7..7e32849 100644
--- a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_be6e30();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl
index a9134c6..a5e126d 100644
--- a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_be6e30(texture2d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()));
+void textureStore_be6e30(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()));
+}
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_be6e30(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_be6e30(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl
index 03ef5bc..e7f85a4 100644
--- a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_bf775c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl
index 524037d..bbd28ed 100644
--- a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_bf775c(texture1d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint(1));
+void textureStore_bf775c(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_bf775c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_bf775c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl
index 5bf8ada..21f9e2c 100644
--- a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_c5af1e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl
index 15d4ba3..220943d 100644
--- a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_c5af1e(texture3d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint3(int3()));
+void textureStore_c5af1e(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_c5af1e(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_c5af1e(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl
index 4912eac..80266bd 100644
--- a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_c863be();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl
index 8803292..e55e2c4 100644
--- a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_c863be(texture2d_array<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint2(int2()), 1);
+void textureStore_c863be(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_c863be(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_c863be(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl
index 82ab661..d3ded48 100644
--- a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_d73b5c();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl
index fda662d..e41c439 100644
--- a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_d73b5c(texture1d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint(1));
+void textureStore_d73b5c(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_d73b5c(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_d73b5c(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl
index 383d958..c46b2b6 100644
--- a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_dd7d81();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl
index a838752..3e39038 100644
--- a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_dd7d81(texture3d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint3(int3()));
+void textureStore_dd7d81(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_dd7d81(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_dd7d81(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl
index 6775d47..ad7b855 100644
--- a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_dde364();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl
index aaea019..115e7ab 100644
--- a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_dde364(texture2d_array<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint2(int2()), 1);
+void textureStore_dde364(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_dde364(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_dde364(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl
index 2766a15..0cc502d 100644
--- a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_e885e8();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl
index 9d476ea..8ef1a12 100644
--- a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_e885e8(texture1d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint(1));
+void textureStore_e885e8(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_e885e8(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_e885e8(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl
index 90d8682..8d2e233 100644
--- a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_eb702f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl
index 6047f22..41d7c7f 100644
--- a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_eb702f(texture3d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint3(int3()));
+void textureStore_eb702f(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_eb702f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_eb702f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl
index b89b62b..1268ff7 100644
--- a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_eb78b9();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl
index 966e81b..c96a6be 100644
--- a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_eb78b9(texture3d<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint3(int3()));
+void textureStore_eb78b9(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_eb78b9(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_eb78b9(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl
index c432941..3b0c419 100644
--- a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_ee6acc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl
index 54dd77b..ff1b337 100644
--- a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_ee6acc(texture3d<float, access::write> tint_symbol_2) {
-  tint_symbol_2.write(float4(), uint3(int3()));
+void textureStore_ee6acc(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_ee6acc(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_ee6acc(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl
index 83c0963..65da5f3 100644
--- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_ef9f2f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl
index 155a239..ea717de 100644
--- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_ef9f2f(texture3d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint3(int3()));
+void textureStore_ef9f2f(texture3d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureStore_ef9f2f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_ef9f2f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl
index d2b20cb..dd2268a 100644
--- a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_f8dead();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl
index 21a8db2..86b857a 100644
--- a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_f8dead(texture3d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint3(int3()));
+void textureStore_f8dead(texture3d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint3(int3()));
+}
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureStore_f8dead(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_f8dead(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl
index 042fbff..6194d27 100644
--- a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_f9be83();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl
index b01a1a8..c8bb94f 100644
--- a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_f9be83(texture2d_array<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()), 1);
+void textureStore_f9be83(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_f9be83(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_f9be83(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl
index 7edd42c..8c233c3 100644
--- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_fb9a8f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl
index f324700..ee37f34 100644
--- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_fb9a8f(texture1d<uint, access::write> tint_symbol_2) {
-  tint_symbol_2.write(uint4(), uint(1));
+void textureStore_fb9a8f(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(), uint(1));
+}
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_fb9a8f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_fb9a8f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl
index 511cf65..6cf5b01 100644
--- a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.hlsl
@@ -8,10 +8,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   textureStore_fbf53f();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl
index ba5cb0c..68b5283 100644
--- a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.msl
@@ -5,14 +5,20 @@
   float4 value [[position]];
 };
 
-void textureStore_fbf53f(texture2d_array<int, access::write> tint_symbol_2) {
-  tint_symbol_2.write(int4(), uint2(int2()), 1);
+void textureStore_fbf53f(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(), uint2(int2()), 1);
+}
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_fbf53f(tint_symbol_2);
+  return float4();
 }
 
 vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  textureStore_fbf53f(tint_symbol_3);
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl
index 2a84d71..0dcb894 100644
--- a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_2585cd();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl
index 6ae1bbd..b3b56c8 100644
--- a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3x4 res = transpose(float4x3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_2585cd();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl
index 17e4940..f81bc9b 100644
--- a/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/31d679.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_31d679();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl b/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl
index f76b6eb..6e589ed 100644
--- a/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/31d679.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2x2 res = transpose(float2x2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_31d679();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl
index a24ce44..7a98209 100644
--- a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_31e37e();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl
index 6549c60..e0fd198 100644
--- a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2x4 res = transpose(float4x2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_31e37e();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl
index 26f5d08..ce5e8de 100644
--- a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_4ce359();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl
index 82ad61f..84d1993 100644
--- a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4x2 res = transpose(float2x4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_4ce359();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl
index 4ad47cf..2471cff 100644
--- a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_4dc9a1();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl
index 856b2cc..b26fea1 100644
--- a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3x2 res = transpose(float2x3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_4dc9a1();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl
index c6b76f1..e90dab8 100644
--- a/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/854336.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_854336();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.msl b/test/intrinsics/gen/transpose/854336.wgsl.expected.msl
index 11184d7..745cc68 100644
--- a/test/intrinsics/gen/transpose/854336.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/854336.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3x3 res = transpose(float3x3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_854336();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl
index ee2635b..bc2bd20 100644
--- a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_c1b600();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl
index 59920dc..df99578 100644
--- a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4x4 res = transpose(float4x4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_c1b600();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl
index aba7571..860eed7 100644
--- a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_d8f8ba();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl
index 98f2384..fd5a36f 100644
--- a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4x3 res = transpose(float3x4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_d8f8ba();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl
index 49a9f84..fc957c6 100644
--- a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_ed4bdc();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl
index 4fdec15..5952069 100644
--- a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl
+++ b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2x3 res = transpose(float3x2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   transpose_ed4bdc();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl
index ab059b2..2d89674 100644
--- a/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/trunc/562d05.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_562d05();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl b/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl
index 062cae4..75d45ac 100644
--- a/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl
+++ b/test/intrinsics/gen/trunc/562d05.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float3 res = trunc(float3());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_562d05();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl
index 9e2b9e1..d65dc52 100644
--- a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_e183aa();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl
index 847cb9d..b6fb817 100644
--- a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl
+++ b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = trunc(float4());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_e183aa();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl
index 1526f70..2e556ed 100644
--- a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_eb83df();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl
index e9b0df0..5e95102 100644
--- a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl
+++ b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float res = trunc(1.0f);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_eb83df();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl
index 679f416..bd5514f 100644
--- a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.hlsl
@@ -6,10 +6,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_f370d3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl
index 34e6620..da0192f 100644
--- a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl
+++ b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = trunc(float2());
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   trunc_f370d3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl
index b828aaa..3402aff 100644
--- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.hlsl
@@ -11,10 +11,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack2x16float_32a5cf();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl
index e5746f1..780a847 100644
--- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl
+++ b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = float2(as_type<half2>(1u));
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack2x16float_32a5cf();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl
index 75ed01c..3ad2370 100644
--- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack2x16snorm_b4aea6();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl
index 2374a87..4b72608 100644
--- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl
+++ b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = unpack_snorm2x16_to_float(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack2x16snorm_b4aea6();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl
index 3481fbb..a404f41 100644
--- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack2x16unorm_7699c0();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl
index 45815ca..c4eba4e 100644
--- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl
+++ b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float2 res = unpack_unorm2x16_to_float(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack2x16unorm_7699c0();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl
index 849087d..c7e5031 100644
--- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack4x8snorm_523fb3();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl
index 06cc514..e3e1244 100644
--- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl
+++ b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = unpack_snorm4x8_to_float(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack4x8snorm_523fb3();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl
index 6e04842..78266e5 100644
--- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.hlsl
@@ -12,10 +12,16 @@
   float4 value : SV_Position;
 };
 
-tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack4x8unorm_750c74();
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 void fragment_main() {
diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl
index e6226c8..e05632d 100644
--- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl
+++ b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.msl
@@ -9,10 +9,16 @@
   float4 res = unpack_unorm4x8_to_float(1u);
 }
 
-vertex tint_symbol vertex_main() {
+float4 vertex_main_inner() {
   unpack4x8unorm_750c74();
-  tint_symbol const tint_symbol_1 = {.value=float4()};
-  return tint_symbol_1;
+  return float4();
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 fragment void fragment_main() {
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl
index 16dec5d..f031e02 100644
--- a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl
+++ b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.hlsl
@@ -28,11 +28,17 @@
   float4 tint_symbol_1_1 : SV_Position;
 };
 
-tint_symbol_3 vertex_main() {
+vertex_main_out vertex_main_inner() {
   vertex_main_1();
   const vertex_main_out tint_symbol_4 = {tint_symbol_1};
-  const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.tint_symbol_1_1};
-  return tint_symbol_5;
+  return tint_symbol_4;
+}
+
+tint_symbol_3 vertex_main() {
+  const vertex_main_out inner_result = vertex_main_inner();
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
+  return wrapper_result;
 }
 
 void fragment_main_1() {
diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl
index d68fff0..ab54f6f 100644
--- a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl
+++ b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.msl
@@ -8,49 +8,55 @@
   float4 tint_symbol_1_1 [[position]];
 };
 
-void textureDimensions_f60bdb(depth2d_ms<float, access::read> tint_symbol_6) {
+void textureDimensions_f60bdb(depth2d_ms<float, access::read> tint_symbol_5) {
   int2 res = int2(0, 0);
-  int2 const x_16 = int2(int2(tint_symbol_6.get_width(), tint_symbol_6.get_height()));
+  int2 const x_16 = int2(int2(tint_symbol_5.get_width(), tint_symbol_5.get_height()));
   res = x_16;
   return;
 }
 
-void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_7) {
-  *(tint_symbol_7) = tint_symbol;
+void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) {
+  *(tint_symbol_6) = tint_symbol;
   return;
 }
 
-void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_8, thread float4* const tint_symbol_9) {
-  textureDimensions_f60bdb(tint_symbol_8);
-  tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_9);
+void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
+  textureDimensions_f60bdb(tint_symbol_7);
+  tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_8);
   return;
 }
 
-vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_10 [[texture(0)]]) {
-  thread float4 tint_symbol_11 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  vertex_main_1(tint_symbol_10, &(tint_symbol_11));
-  vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.tint_symbol_1_1=tint_symbol_4.tint_symbol_1_1};
-  return tint_symbol_5;
+vertex_main_out vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_9, thread float4* const tint_symbol_10) {
+  vertex_main_1(tint_symbol_9, tint_symbol_10);
+  vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)};
+  return tint_symbol_4;
 }
 
-void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_12) {
-  textureDimensions_f60bdb(tint_symbol_12);
+vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_11 [[texture(0)]]) {
+  thread float4 tint_symbol_12 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
+  return wrapper_result;
+}
+
+void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_13) {
+  textureDimensions_f60bdb(tint_symbol_13);
   return;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_13 [[texture(0)]]) {
-  fragment_main_1(tint_symbol_13);
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_14 [[texture(0)]]) {
+  fragment_main_1(tint_symbol_14);
   return;
 }
 
-void compute_main_1(depth2d_ms<float, access::read> tint_symbol_14) {
-  textureDimensions_f60bdb(tint_symbol_14);
+void compute_main_1(depth2d_ms<float, access::read> tint_symbol_15) {
+  textureDimensions_f60bdb(tint_symbol_15);
   return;
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_15 [[texture(0)]]) {
-  compute_main_1(tint_symbol_15);
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_16 [[texture(0)]]) {
+  compute_main_1(tint_symbol_16);
   return;
 }
 
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl
index 8acb0b5..41cb191 100644
--- a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl
+++ b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.hlsl
@@ -26,11 +26,17 @@
   float4 tint_symbol_1_1 : SV_Position;
 };
 
-tint_symbol_3 vertex_main() {
+vertex_main_out vertex_main_inner() {
   vertex_main_1();
   const vertex_main_out tint_symbol_4 = {tint_symbol_1};
-  const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.tint_symbol_1_1};
-  return tint_symbol_5;
+  return tint_symbol_4;
+}
+
+tint_symbol_3 vertex_main() {
+  const vertex_main_out inner_result = vertex_main_inner();
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
+  return wrapper_result;
 }
 
 void fragment_main_1() {
diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl
index 05a872b..9b56186 100644
--- a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl
+++ b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.msl
@@ -8,49 +8,55 @@
   float4 tint_symbol_1_1 [[position]];
 };
 
-void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_6) {
+void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_5) {
   float res = 0.0f;
-  float4 const x_17 = float4(tint_symbol_6.read(uint2(int2(0, 0)), 1), 0.0f, 0.0f, 0.0f);
+  float4 const x_17 = float4(tint_symbol_5.read(uint2(int2(0, 0)), 1), 0.0f, 0.0f, 0.0f);
   res = x_17.x;
   return;
 }
 
-void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_7) {
-  *(tint_symbol_7) = tint_symbol;
+void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) {
+  *(tint_symbol_6) = tint_symbol;
   return;
 }
 
-void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_8, thread float4* const tint_symbol_9) {
-  textureLoad_6273b1(tint_symbol_8);
-  tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_9);
+void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
+  textureLoad_6273b1(tint_symbol_7);
+  tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_8);
   return;
 }
 
-vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_10 [[texture(0)]]) {
-  thread float4 tint_symbol_11 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  vertex_main_1(tint_symbol_10, &(tint_symbol_11));
-  vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.tint_symbol_1_1=tint_symbol_4.tint_symbol_1_1};
-  return tint_symbol_5;
+vertex_main_out vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_9, thread float4* const tint_symbol_10) {
+  vertex_main_1(tint_symbol_9, tint_symbol_10);
+  vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)};
+  return tint_symbol_4;
 }
 
-void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_12) {
-  textureLoad_6273b1(tint_symbol_12);
+vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_11 [[texture(0)]]) {
+  thread float4 tint_symbol_12 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
+  return wrapper_result;
+}
+
+void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_13) {
+  textureLoad_6273b1(tint_symbol_13);
   return;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_13 [[texture(0)]]) {
-  fragment_main_1(tint_symbol_13);
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_14 [[texture(0)]]) {
+  fragment_main_1(tint_symbol_14);
   return;
 }
 
-void compute_main_1(depth2d_ms<float, access::read> tint_symbol_14) {
-  textureLoad_6273b1(tint_symbol_14);
+void compute_main_1(depth2d_ms<float, access::read> tint_symbol_15) {
+  textureLoad_6273b1(tint_symbol_15);
   return;
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_15 [[texture(0)]]) {
-  compute_main_1(tint_symbol_15);
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_16 [[texture(0)]]) {
+  compute_main_1(tint_symbol_16);
   return;
 }
 
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl
index a968cd1..4d492d2 100644
--- a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl
+++ b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.hlsl
@@ -28,11 +28,17 @@
   float4 tint_symbol_1_1 : SV_Position;
 };
 
-tint_symbol_3 vertex_main() {
+vertex_main_out vertex_main_inner() {
   vertex_main_1();
   const vertex_main_out tint_symbol_4 = {tint_symbol_1};
-  const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.tint_symbol_1_1};
-  return tint_symbol_5;
+  return tint_symbol_4;
+}
+
+tint_symbol_3 vertex_main() {
+  const vertex_main_out inner_result = vertex_main_inner();
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
+  return wrapper_result;
 }
 
 void fragment_main_1() {
diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl
index 572f1e0..a91182b 100644
--- a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl
+++ b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.msl
@@ -8,49 +8,55 @@
   float4 tint_symbol_1_1 [[position]];
 };
 
-void textureNumSamples_a3c8a0(depth2d_ms<float, access::read> tint_symbol_6) {
+void textureNumSamples_a3c8a0(depth2d_ms<float, access::read> tint_symbol_5) {
   int res = 0;
-  int const x_16 = int(tint_symbol_6.get_num_samples());
+  int const x_16 = int(tint_symbol_5.get_num_samples());
   res = x_16;
   return;
 }
 
-void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_7) {
-  *(tint_symbol_7) = tint_symbol;
+void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) {
+  *(tint_symbol_6) = tint_symbol;
   return;
 }
 
-void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_8, thread float4* const tint_symbol_9) {
-  textureNumSamples_a3c8a0(tint_symbol_8);
-  tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_9);
+void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
+  textureNumSamples_a3c8a0(tint_symbol_7);
+  tint_symbol_2(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_symbol_8);
   return;
 }
 
-vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_10 [[texture(0)]]) {
-  thread float4 tint_symbol_11 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  vertex_main_1(tint_symbol_10, &(tint_symbol_11));
-  vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.tint_symbol_1_1=tint_symbol_4.tint_symbol_1_1};
-  return tint_symbol_5;
+vertex_main_out vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_9, thread float4* const tint_symbol_10) {
+  vertex_main_1(tint_symbol_9, tint_symbol_10);
+  vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)};
+  return tint_symbol_4;
 }
 
-void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_12) {
-  textureNumSamples_a3c8a0(tint_symbol_12);
+vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_11 [[texture(0)]]) {
+  thread float4 tint_symbol_12 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
+  return wrapper_result;
+}
+
+void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_13) {
+  textureNumSamples_a3c8a0(tint_symbol_13);
   return;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_13 [[texture(0)]]) {
-  fragment_main_1(tint_symbol_13);
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_14 [[texture(0)]]) {
+  fragment_main_1(tint_symbol_14);
   return;
 }
 
-void compute_main_1(depth2d_ms<float, access::read> tint_symbol_14) {
-  textureNumSamples_a3c8a0(tint_symbol_14);
+void compute_main_1(depth2d_ms<float, access::read> tint_symbol_15) {
+  textureNumSamples_a3c8a0(tint_symbol_15);
   return;
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_15 [[texture(0)]]) {
-  compute_main_1(tint_symbol_15);
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_16 [[texture(0)]]) {
+  compute_main_1(tint_symbol_16);
   return;
 }
 
diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl
index 1d722c7..fbd6076 100644
--- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl
+++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.hlsl
@@ -4,14 +4,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint local_invocation_index) {
   {
     i = 0;
   }
   GroupMemoryBarrierWithGroupSync();
   i = 123;
   const int use = (i + 1);
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl
index bc311a2..7853720 100644
--- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl
+++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl
@@ -1,14 +1,18 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
-  threadgroup int tint_symbol_2;
+void tint_symbol_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) {
   {
-    tint_symbol_2 = int();
+    *(tint_symbol_1) = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  tint_symbol_2 = 123;
-  int const use = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
+  *(tint_symbol_1) = 123;
+  int const use = as_type<int>((as_type<uint>(*(tint_symbol_1)) + as_type<uint>(1)));
+}
+
+kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
+  threadgroup int tint_symbol_2;
+  tint_symbol_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/samples/compute_boids.wgsl.expected.hlsl b/test/samples/compute_boids.wgsl.expected.hlsl
index 3a88307..a19fa71 100644
--- a/test/samples/compute_boids.wgsl.expected.hlsl
+++ b/test/samples/compute_boids.wgsl.expected.hlsl
@@ -7,23 +7,32 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 vert_main(tint_symbol_1 tint_symbol) {
-  const float2 a_particlePos = tint_symbol.a_particlePos;
-  const float2 a_particleVel = tint_symbol.a_particleVel;
-  const float2 a_pos = tint_symbol.a_pos;
+float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) {
   float angle = -(atan2(a_particleVel.x, a_particleVel.y));
   float2 pos = float2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle))));
-  const tint_symbol_2 tint_symbol_9 = {float4((pos + a_particlePos), 0.0f, 1.0f)};
-  return tint_symbol_9;
+  return float4((pos + a_particlePos), 0.0f, 1.0f);
+}
+
+tint_symbol_2 vert_main(tint_symbol_1 tint_symbol) {
+  const float4 inner_result = vert_main_inner(tint_symbol.a_particlePos, tint_symbol.a_particleVel, tint_symbol.a_pos);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 struct tint_symbol_3 {
   float4 value : SV_Target0;
 };
 
+float4 frag_main_inner() {
+  return float4(1.0f, 1.0f, 1.0f, 1.0f);
+}
+
 tint_symbol_3 frag_main() {
-  const tint_symbol_3 tint_symbol_10 = {float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  return tint_symbol_10;
+  const float4 inner_result_1 = frag_main_inner();
+  tint_symbol_3 wrapper_result_1 = (tint_symbol_3)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
 cbuffer cbuffer_params : register(b0, space0) {
@@ -36,9 +45,7 @@
   uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void comp_main(tint_symbol_5 tint_symbol_4) {
-  const uint3 gl_GlobalInvocationID = tint_symbol_4.gl_GlobalInvocationID;
+void comp_main_inner(uint3 gl_GlobalInvocationID) {
   uint index = gl_GlobalInvocationID.x;
   if ((index >= 5u)) {
     return;
@@ -95,5 +102,10 @@
   }
   particlesB.Store2((16u * index), asuint(vPos));
   particlesB.Store2(((16u * index) + 8u), asuint(vVel));
+}
+
+[numthreads(1, 1, 1)]
+void comp_main(tint_symbol_5 tint_symbol_4) {
+  comp_main_inner(tint_symbol_4.gl_GlobalInvocationID);
   return;
 }
diff --git a/test/samples/compute_boids.wgsl.expected.msl b/test/samples/compute_boids.wgsl.expected.msl
index 980c237..005dfaa 100644
--- a/test/samples/compute_boids.wgsl.expected.msl
+++ b/test/samples/compute_boids.wgsl.expected.msl
@@ -32,22 +32,31 @@
   /* 0x0000 */ tint_array_wrapper particles;
 };
 
-vertex tint_symbol_2 vert_main(tint_symbol_1 tint_symbol [[stage_in]]) {
-  float2 const a_particlePos = tint_symbol.a_particlePos;
-  float2 const a_particleVel = tint_symbol.a_particleVel;
-  float2 const a_pos = tint_symbol.a_pos;
+float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) {
   float angle = -(atan2(a_particleVel.x, a_particleVel.y));
   float2 pos = float2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle))));
-  tint_symbol_2 const tint_symbol_5 = {.value=float4((pos + a_particlePos), 0.0f, 1.0f)};
-  return tint_symbol_5;
+  return float4((pos + a_particlePos), 0.0f, 1.0f);
+}
+
+vertex tint_symbol_2 vert_main(tint_symbol_1 tint_symbol [[stage_in]]) {
+  float4 const inner_result = vert_main_inner(tint_symbol.a_particlePos, tint_symbol.a_particleVel, tint_symbol.a_pos);
+  tint_symbol_2 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+float4 frag_main_inner() {
+  return float4(1.0f, 1.0f, 1.0f, 1.0f);
 }
 
 fragment tint_symbol_3 frag_main() {
-  tint_symbol_3 const tint_symbol_6 = {.value=float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  return tint_symbol_6;
+  float4 const inner_result_1 = frag_main_inner();
+  tint_symbol_3 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
-kernel void comp_main(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], constant SimParams& params [[buffer(0)]], device Particles& particlesA [[buffer(1)]], device Particles& particlesB [[buffer(2)]]) {
+void comp_main_inner(constant SimParams& params, device Particles& particlesA, device Particles& particlesB, uint3 gl_GlobalInvocationID) {
   uint index = gl_GlobalInvocationID.x;
   if ((index >= 5u)) {
     return;
@@ -102,6 +111,10 @@
   }
   particlesB.particles.arr[index].pos = vPos;
   particlesB.particles.arr[index].vel = vVel;
+}
+
+kernel void comp_main(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], constant SimParams& params [[buffer(0)]], device Particles& particlesA [[buffer(1)]], device Particles& particlesB [[buffer(2)]]) {
+  comp_main_inner(params, particlesA, particlesB, gl_GlobalInvocationID);
   return;
 }
 
diff --git a/test/samples/cube.wgsl.expected.hlsl b/test/samples/cube.wgsl.expected.hlsl
index f83fd1f..82af450 100644
--- a/test/samples/cube.wgsl.expected.hlsl
+++ b/test/samples/cube.wgsl.expected.hlsl
@@ -27,13 +27,20 @@
   return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
 }
 
-tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
-  const VertexInput input = {tint_symbol.cur_position, tint_symbol.color};
+VertexOutput vtx_main_inner(VertexInput input) {
   VertexOutput output = (VertexOutput)0;
   output.Position = mul(input.cur_position, tint_symbol_6(uniforms, 0u));
   output.vtxFragColor = input.color;
-  const tint_symbol_2 tint_symbol_8 = {output.vtxFragColor, output.Position};
-  return tint_symbol_8;
+  return output;
+}
+
+tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
+  const VertexInput tint_symbol_8 = {tint_symbol.cur_position, tint_symbol.color};
+  const VertexOutput inner_result = vtx_main_inner(tint_symbol_8);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.vtxFragColor = inner_result.vtxFragColor;
+  wrapper_result.Position = inner_result.Position;
+  return wrapper_result;
 }
 
 struct tint_symbol_4 {
@@ -43,8 +50,13 @@
   float4 value : SV_Target0;
 };
 
+float4 frag_main_inner(float4 fragColor) {
+  return fragColor;
+}
+
 tint_symbol_5 frag_main(tint_symbol_4 tint_symbol_3) {
-  const float4 fragColor = tint_symbol_3.fragColor;
-  const tint_symbol_5 tint_symbol_9 = {fragColor};
-  return tint_symbol_9;
+  const float4 inner_result_1 = frag_main_inner(tint_symbol_3.fragColor);
+  tint_symbol_5 wrapper_result_1 = (tint_symbol_5)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
diff --git a/test/samples/cube.wgsl.expected.msl b/test/samples/cube.wgsl.expected.msl
index 0e581be..1ce68b4 100644
--- a/test/samples/cube.wgsl.expected.msl
+++ b/test/samples/cube.wgsl.expected.msl
@@ -27,18 +27,30 @@
   float4 value [[color(0)]];
 };
 
-vertex tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol [[stage_in]], constant Uniforms& uniforms [[buffer(0)]]) {
-  VertexInput const input = {.cur_position=tint_symbol.cur_position, .color=tint_symbol.color};
+VertexOutput vtx_main_inner(constant Uniforms& uniforms, VertexInput input) {
   VertexOutput output = {};
   output.Position = (uniforms.modelViewProjectionMatrix * input.cur_position);
   output.vtxFragColor = input.color;
-  tint_symbol_2 const tint_symbol_6 = {.vtxFragColor=output.vtxFragColor, .Position=output.Position};
-  return tint_symbol_6;
+  return output;
+}
+
+vertex tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol [[stage_in]], constant Uniforms& uniforms [[buffer(0)]]) {
+  VertexInput const tint_symbol_6 = {.cur_position=tint_symbol.cur_position, .color=tint_symbol.color};
+  VertexOutput const inner_result = vtx_main_inner(uniforms, tint_symbol_6);
+  tint_symbol_2 wrapper_result = {};
+  wrapper_result.vtxFragColor = inner_result.vtxFragColor;
+  wrapper_result.Position = inner_result.Position;
+  return wrapper_result;
+}
+
+float4 frag_main_inner(float4 fragColor) {
+  return fragColor;
 }
 
 fragment tint_symbol_5 frag_main(tint_symbol_4 tint_symbol_3 [[stage_in]]) {
-  float4 const fragColor = tint_symbol_3.fragColor;
-  tint_symbol_5 const tint_symbol_7 = {.value=fragColor};
-  return tint_symbol_7;
+  float4 const inner_result_1 = frag_main_inner(tint_symbol_3.fragColor);
+  tint_symbol_5 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
diff --git a/test/samples/simple.wgsl.expected.hlsl b/test/samples/simple.wgsl.expected.hlsl
index 9771c42..93c7fa7 100644
--- a/test/samples/simple.wgsl.expected.hlsl
+++ b/test/samples/simple.wgsl.expected.hlsl
@@ -5,9 +5,15 @@
   float4 value : SV_Target0;
 };
 
-tint_symbol main() {
+float4 main_inner() {
   float2 a = float2(0.0f, 0.0f);
   bar();
-  const tint_symbol tint_symbol_1 = {float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f)};
-  return tint_symbol_1;
+  return float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f);
+}
+
+tint_symbol main() {
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/samples/simple.wgsl.expected.msl b/test/samples/simple.wgsl.expected.msl
index 0429e29..2f37667 100644
--- a/test/samples/simple.wgsl.expected.msl
+++ b/test/samples/simple.wgsl.expected.msl
@@ -8,10 +8,16 @@
 void bar() {
 }
 
-fragment tint_symbol_1 tint_symbol() {
+float4 tint_symbol_inner() {
   float2 a = float2();
   bar();
-  tint_symbol_1 const tint_symbol_2 = {.value=float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f)};
-  return tint_symbol_2;
+  return float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f);
+}
+
+fragment tint_symbol_1 tint_symbol() {
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/samples/simple_vertex.spvasm.expected.hlsl b/test/samples/simple_vertex.spvasm.expected.hlsl
index 05826f0..b262a94 100644
--- a/test/samples/simple_vertex.spvasm.expected.hlsl
+++ b/test/samples/simple_vertex.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/samples/simple_vertex.spvasm.expected.msl b/test/samples/simple_vertex.spvasm.expected.msl
index cbba940..8622e3b 100644
--- a/test/samples/simple_vertex.spvasm.expected.msl
+++ b/test/samples/simple_vertex.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/samples/triangle.wgsl.expected.hlsl b/test/samples/triangle.wgsl.expected.hlsl
index 21724d6..47ca492 100644
--- a/test/samples/triangle.wgsl.expected.hlsl
+++ b/test/samples/triangle.wgsl.expected.hlsl
@@ -5,18 +5,29 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
-  const uint VertexIndex = tint_symbol.VertexIndex;
+float4 vtx_main_inner(uint VertexIndex) {
   float2 pos[3] = {float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)};
-  const tint_symbol_2 tint_symbol_4 = {float4(pos[VertexIndex], 0.0f, 1.0f)};
-  return tint_symbol_4;
+  return float4(pos[VertexIndex], 0.0f, 1.0f);
+}
+
+tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
+  const float4 inner_result = vtx_main_inner(tint_symbol.VertexIndex);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 struct tint_symbol_3 {
   float4 value : SV_Target0;
 };
 
+float4 frag_main_inner() {
+  return float4(1.0f, 0.0f, 0.0f, 1.0f);
+}
+
 tint_symbol_3 frag_main() {
-  const tint_symbol_3 tint_symbol_5 = {float4(1.0f, 0.0f, 0.0f, 1.0f)};
-  return tint_symbol_5;
+  const float4 inner_result_1 = frag_main_inner();
+  tint_symbol_3 wrapper_result_1 = (tint_symbol_3)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
diff --git a/test/samples/triangle.wgsl.expected.msl b/test/samples/triangle.wgsl.expected.msl
index a0657e4..7b4bccf 100644
--- a/test/samples/triangle.wgsl.expected.msl
+++ b/test/samples/triangle.wgsl.expected.msl
@@ -1,24 +1,36 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_1 {
+struct tint_symbol {
   float4 value [[position]];
 };
 struct tint_array_wrapper {
   float2 arr[3];
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 value [[color(0)]];
 };
 
-vertex tint_symbol_1 vtx_main(uint VertexIndex [[vertex_id]]) {
+float4 vtx_main_inner(uint VertexIndex) {
   tint_array_wrapper pos = {.arr={float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)}};
-  tint_symbol_1 const tint_symbol_3 = {.value=float4(pos.arr[VertexIndex], 0.0f, 1.0f)};
-  return tint_symbol_3;
+  return float4(pos.arr[VertexIndex], 0.0f, 1.0f);
 }
 
-fragment tint_symbol_2 frag_main() {
-  tint_symbol_2 const tint_symbol_4 = {.value=float4(1.0f, 0.0f, 0.0f, 1.0f)};
-  return tint_symbol_4;
+vertex tint_symbol vtx_main(uint VertexIndex [[vertex_id]]) {
+  float4 const inner_result = vtx_main_inner(VertexIndex);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+float4 frag_main_inner() {
+  return float4(1.0f, 0.0f, 0.0f, 1.0f);
+}
+
+fragment tint_symbol_1 frag_main() {
+  float4 const inner_result_1 = frag_main_inner();
+  tint_symbol_1 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
diff --git a/test/shader_io/compute_input_builtins.wgsl.expected.hlsl b/test/shader_io/compute_input_builtins.wgsl.expected.hlsl
index 8473e6c..cb71cd9 100644
--- a/test/shader_io/compute_input_builtins.wgsl.expected.hlsl
+++ b/test/shader_io/compute_input_builtins.wgsl.expected.hlsl
@@ -5,12 +5,12 @@
   uint3 workgroup_id : SV_GroupID;
 };
 
+void main_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id) {
+  const uint foo = (((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x);
+}
+
 [numthreads(1, 1, 1)]
 void main(tint_symbol_1 tint_symbol) {
-  const uint3 local_invocation_id = tint_symbol.local_invocation_id;
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
-  const uint3 global_invocation_id = tint_symbol.global_invocation_id;
-  const uint3 workgroup_id = tint_symbol.workgroup_id;
-  const uint foo = (((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x);
+  main_inner(tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id);
   return;
 }
diff --git a/test/shader_io/compute_input_builtins.wgsl.expected.msl b/test/shader_io/compute_input_builtins.wgsl.expected.msl
index 2774a3d..60095f3 100644
--- a/test/shader_io/compute_input_builtins.wgsl.expected.msl
+++ b/test/shader_io/compute_input_builtins.wgsl.expected.msl
@@ -1,8 +1,12 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) {
+void tint_symbol_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id) {
   uint const foo = (((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x);
+}
+
+kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) {
+  tint_symbol_inner(local_invocation_id, local_invocation_index, global_invocation_id, workgroup_id);
   return;
 }
 
diff --git a/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl b/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl
index 42d74ab..8e00493 100644
--- a/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl
+++ b/test/shader_io/compute_input_builtins_struct.wgsl.expected.hlsl
@@ -11,9 +11,13 @@
   uint3 workgroup_id : SV_GroupID;
 };
 
+void main_inner(ComputeInputs inputs) {
+  const uint foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x);
+}
+
 [numthreads(1, 1, 1)]
 void main(tint_symbol_1 tint_symbol) {
-  const ComputeInputs inputs = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id};
-  const uint foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x);
+  const ComputeInputs tint_symbol_2 = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id};
+  main_inner(tint_symbol_2);
   return;
 }
diff --git a/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl b/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl
index 9a16f1b..56db89c 100644
--- a/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl
+++ b/test/shader_io/compute_input_builtins_struct.wgsl.expected.msl
@@ -8,9 +8,13 @@
   uint3 workgroup_id;
 };
 
-kernel void tint_symbol(uint3 tint_symbol_2 [[thread_position_in_threadgroup]], uint tint_symbol_3 [[thread_index_in_threadgroup]], uint3 tint_symbol_4 [[thread_position_in_grid]], uint3 tint_symbol_5 [[threadgroup_position_in_grid]]) {
-  ComputeInputs const inputs = {.local_invocation_id=tint_symbol_2, .local_invocation_index=tint_symbol_3, .global_invocation_id=tint_symbol_4, .workgroup_id=tint_symbol_5};
+void tint_symbol_inner(ComputeInputs inputs) {
   uint const foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x);
+}
+
+kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) {
+  ComputeInputs const tint_symbol_1 = {.local_invocation_id=local_invocation_id, .local_invocation_index=local_invocation_index, .global_invocation_id=global_invocation_id, .workgroup_id=workgroup_id};
+  tint_symbol_inner(tint_symbol_1);
   return;
 }
 
diff --git a/test/shader_io/compute_input_mixed.wgsl.expected.hlsl b/test/shader_io/compute_input_mixed.wgsl.expected.hlsl
index 4527317..e72a9d2 100644
--- a/test/shader_io/compute_input_mixed.wgsl.expected.hlsl
+++ b/test/shader_io/compute_input_mixed.wgsl.expected.hlsl
@@ -11,12 +11,14 @@
   uint3 workgroup_id : SV_GroupID;
 };
 
+void main_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) {
+  const uint foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x);
+}
+
 [numthreads(1, 1, 1)]
 void main(tint_symbol_1 tint_symbol) {
-  const ComputeInputs0 inputs0 = {tint_symbol.local_invocation_id};
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
-  const uint3 global_invocation_id = tint_symbol.global_invocation_id;
-  const ComputeInputs1 inputs1 = {tint_symbol.workgroup_id};
-  const uint foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x);
+  const ComputeInputs0 tint_symbol_2 = {tint_symbol.local_invocation_id};
+  const ComputeInputs1 tint_symbol_3 = {tint_symbol.workgroup_id};
+  main_inner(tint_symbol_2, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol_3);
   return;
 }
diff --git a/test/shader_io/compute_input_mixed.wgsl.expected.msl b/test/shader_io/compute_input_mixed.wgsl.expected.msl
index fe6293b..65ca123 100644
--- a/test/shader_io/compute_input_mixed.wgsl.expected.msl
+++ b/test/shader_io/compute_input_mixed.wgsl.expected.msl
@@ -8,10 +8,14 @@
   uint3 workgroup_id;
 };
 
-kernel void tint_symbol(uint3 tint_symbol_2 [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 tint_symbol_3 [[threadgroup_position_in_grid]]) {
-  ComputeInputs0 const inputs0 = {.local_invocation_id=tint_symbol_2};
-  ComputeInputs1 const inputs1 = {.workgroup_id=tint_symbol_3};
+void tint_symbol_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) {
   uint const foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x);
+}
+
+kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) {
+  ComputeInputs0 const tint_symbol_1 = {.local_invocation_id=local_invocation_id};
+  ComputeInputs1 const tint_symbol_2 = {.workgroup_id=workgroup_id};
+  tint_symbol_inner(tint_symbol_1, local_invocation_index, global_invocation_id, tint_symbol_2);
   return;
 }
 
diff --git a/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl b/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl
index b40247e..cc5f201 100644
--- a/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_input_builtins.wgsl.expected.hlsl
@@ -5,14 +5,14 @@
   uint sample_mask : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const float4 position = tint_symbol.position;
-  const bool front_facing = tint_symbol.front_facing;
-  const uint sample_index = tint_symbol.sample_index;
-  const uint sample_mask = tint_symbol.sample_mask;
+void main_inner(float4 position, bool front_facing, uint sample_index, uint sample_mask) {
   if (front_facing) {
     const float4 foo = position;
     const uint bar = (sample_index + sample_mask);
   }
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.position, tint_symbol.front_facing, tint_symbol.sample_index, tint_symbol.sample_mask);
   return;
 }
diff --git a/test/shader_io/fragment_input_builtins.wgsl.expected.msl b/test/shader_io/fragment_input_builtins.wgsl.expected.msl
index 4204e5e..fea0205 100644
--- a/test/shader_io/fragment_input_builtins.wgsl.expected.msl
+++ b/test/shader_io/fragment_input_builtins.wgsl.expected.msl
@@ -1,11 +1,15 @@
 #include <metal_stdlib>
 
 using namespace metal;
-fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) {
+void tint_symbol_inner(float4 position, bool front_facing, uint sample_index, uint sample_mask) {
   if (front_facing) {
     float4 const foo = position;
     uint const bar = (sample_index + sample_mask);
   }
+}
+
+fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) {
+  tint_symbol_inner(position, front_facing, sample_index, sample_mask);
   return;
 }
 
diff --git a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl
index df29a00..6f38a1f 100644
--- a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.hlsl
@@ -11,11 +11,15 @@
   uint sample_mask : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const FragmentInputs inputs = {tint_symbol.position, tint_symbol.front_facing, tint_symbol.sample_index, tint_symbol.sample_mask};
+void main_inner(FragmentInputs inputs) {
   if (inputs.front_facing) {
     const float4 foo = inputs.position;
     const uint bar = (inputs.sample_index + inputs.sample_mask);
   }
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  const FragmentInputs tint_symbol_2 = {tint_symbol.position, tint_symbol.front_facing, tint_symbol.sample_index, tint_symbol.sample_mask};
+  main_inner(tint_symbol_2);
   return;
 }
diff --git a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl
index 284dbe5..4915bec 100644
--- a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl
+++ b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.msl
@@ -8,12 +8,16 @@
   uint sample_mask;
 };
 
-fragment void tint_symbol(float4 tint_symbol_2 [[position]], bool tint_symbol_3 [[front_facing]], uint tint_symbol_4 [[sample_id]], uint tint_symbol_5 [[sample_mask]]) {
-  FragmentInputs const inputs = {.position=tint_symbol_2, .front_facing=tint_symbol_3, .sample_index=tint_symbol_4, .sample_mask=tint_symbol_5};
+void tint_symbol_inner(FragmentInputs inputs) {
   if (inputs.front_facing) {
     float4 const foo = inputs.position;
     uint const bar = (inputs.sample_index + inputs.sample_mask);
   }
+}
+
+fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) {
+  FragmentInputs const tint_symbol_1 = {.position=position, .front_facing=front_facing, .sample_index=sample_index, .sample_mask=sample_mask};
+  tint_symbol_inner(tint_symbol_1);
   return;
 }
 
diff --git a/test/shader_io/fragment_input_locations.wgsl.expected.hlsl b/test/shader_io/fragment_input_locations.wgsl.expected.hlsl
index 8590130..5b6022e 100644
--- a/test/shader_io/fragment_input_locations.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_input_locations.wgsl.expected.hlsl
@@ -5,14 +5,14 @@
   float4 loc3 : TEXCOORD3;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const int loc0 = tint_symbol.loc0;
-  const uint loc1 = tint_symbol.loc1;
-  const float loc2 = tint_symbol.loc2;
-  const float4 loc3 = tint_symbol.loc3;
+void main_inner(int loc0, uint loc1, float loc2, float4 loc3) {
   const int i = loc0;
   const uint u = loc1;
   const float f = loc2;
   const float4 v = loc3;
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3);
   return;
 }
diff --git a/test/shader_io/fragment_input_locations.wgsl.expected.msl b/test/shader_io/fragment_input_locations.wgsl.expected.msl
index c8014ad..f73afbe 100644
--- a/test/shader_io/fragment_input_locations.wgsl.expected.msl
+++ b/test/shader_io/fragment_input_locations.wgsl.expected.msl
@@ -8,15 +8,15 @@
   float4 loc3 [[user(locn3)]];
 };
 
-fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  int const loc0 = tint_symbol_1.loc0;
-  uint const loc1 = tint_symbol_1.loc1;
-  float const loc2 = tint_symbol_1.loc2;
-  float4 const loc3 = tint_symbol_1.loc3;
+void tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) {
   int const i = loc0;
   uint const u = loc1;
   float const f = loc2;
   float4 const v = loc3;
+}
+
+fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  tint_symbol_inner(tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3);
   return;
 }
 
diff --git a/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl b/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl
index 9aa01ec..bea6f96 100644
--- a/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_input_locations_struct.wgsl.expected.hlsl
@@ -11,11 +11,15 @@
   float4 loc3 : TEXCOORD3;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const FragmentInputs inputs = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3};
+void main_inner(FragmentInputs inputs) {
   const int i = inputs.loc0;
   const uint u = inputs.loc1;
   const float f = inputs.loc2;
   const float4 v = inputs.loc3;
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  const FragmentInputs tint_symbol_2 = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3};
+  main_inner(tint_symbol_2);
   return;
 }
diff --git a/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl b/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl
index 19145f5..bddd084 100644
--- a/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl
+++ b/test/shader_io/fragment_input_locations_struct.wgsl.expected.msl
@@ -14,12 +14,16 @@
   float4 loc3 [[user(locn3)]];
 };
 
-fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  FragmentInputs const inputs = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3};
+void tint_symbol_inner(FragmentInputs inputs) {
   int const i = inputs.loc0;
   uint const u = inputs.loc1;
   float const f = inputs.loc2;
   float4 const v = inputs.loc3;
+}
+
+fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  FragmentInputs const tint_symbol_3 = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3};
+  tint_symbol_inner(tint_symbol_3);
   return;
 }
 
diff --git a/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl b/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl
index bd63b41..569a409 100644
--- a/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_input_mixed.wgsl.expected.hlsl
@@ -17,13 +17,7 @@
   uint sample_mask : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const FragmentInputs0 inputs0 = {tint_symbol.position, tint_symbol.loc0};
-  const bool front_facing = tint_symbol.front_facing;
-  const uint loc1 = tint_symbol.loc1;
-  const uint sample_index = tint_symbol.sample_index;
-  const FragmentInputs1 inputs1 = {tint_symbol.loc3, tint_symbol.sample_mask};
-  const float loc2 = tint_symbol.loc2;
+void main_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2) {
   if (front_facing) {
     const float4 foo = inputs0.position;
     const uint bar = (sample_index + inputs1.sample_mask);
@@ -32,5 +26,11 @@
     const float f = loc2;
     const float4 v = inputs1.loc3;
   }
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  const FragmentInputs0 tint_symbol_2 = {tint_symbol.position, tint_symbol.loc0};
+  const FragmentInputs1 tint_symbol_3 = {tint_symbol.loc3, tint_symbol.sample_mask};
+  main_inner(tint_symbol_2, tint_symbol.front_facing, tint_symbol.loc1, tint_symbol.sample_index, tint_symbol_3, tint_symbol.loc2);
   return;
 }
diff --git a/test/shader_io/fragment_input_mixed.wgsl.expected.msl b/test/shader_io/fragment_input_mixed.wgsl.expected.msl
index 9b3a13a..1d3f36a 100644
--- a/test/shader_io/fragment_input_mixed.wgsl.expected.msl
+++ b/test/shader_io/fragment_input_mixed.wgsl.expected.msl
@@ -9,18 +9,14 @@
   float4 loc3;
   uint sample_mask;
 };
-struct tint_symbol_4 {
+struct tint_symbol_2 {
   int loc0 [[user(locn0)]];
   uint loc1 [[user(locn1)]];
   float loc2 [[user(locn2)]];
   float4 loc3 [[user(locn3)]];
 };
 
-fragment void tint_symbol(float4 tint_symbol_2 [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint tint_symbol_3 [[sample_mask]], tint_symbol_4 tint_symbol_1 [[stage_in]]) {
-  FragmentInputs0 const inputs0 = {.position=tint_symbol_2, .loc0=tint_symbol_1.loc0};
-  uint const loc1 = tint_symbol_1.loc1;
-  FragmentInputs1 const inputs1 = {.loc3=tint_symbol_1.loc3, .sample_mask=tint_symbol_3};
-  float const loc2 = tint_symbol_1.loc2;
+void tint_symbol_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2) {
   if (front_facing) {
     float4 const foo = inputs0.position;
     uint const bar = (sample_index + inputs1.sample_mask);
@@ -29,6 +25,12 @@
     float const f = loc2;
     float4 const v = inputs1.loc3;
   }
+}
+
+fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  FragmentInputs0 const tint_symbol_3 = {.position=position, .loc0=tint_symbol_1.loc0};
+  FragmentInputs1 const tint_symbol_4 = {.loc3=tint_symbol_1.loc3, .sample_mask=sample_mask};
+  tint_symbol_inner(tint_symbol_3, front_facing, tint_symbol_1.loc1, sample_index, tint_symbol_4, tint_symbol_1.loc2);
   return;
 }
 
diff --git a/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl b/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl
index a24d9cf..2b972d7 100644
--- a/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_output_builtins.wgsl.expected.hlsl
@@ -2,16 +2,28 @@
   float value : SV_Depth;
 };
 
+float main1_inner() {
+  return 1.0f;
+}
+
 tint_symbol main1() {
-  const tint_symbol tint_symbol_2 = {1.0f};
-  return tint_symbol_2;
+  const float inner_result = main1_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 struct tint_symbol_1 {
   uint value : SV_Coverage;
 };
 
+uint main2_inner() {
+  return 1u;
+}
+
 tint_symbol_1 main2() {
-  const tint_symbol_1 tint_symbol_3 = {1u};
-  return tint_symbol_3;
+  const uint inner_result_1 = main2_inner();
+  tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
diff --git a/test/shader_io/fragment_output_builtins.wgsl.expected.msl b/test/shader_io/fragment_output_builtins.wgsl.expected.msl
index 8129f66..97d6904 100644
--- a/test/shader_io/fragment_output_builtins.wgsl.expected.msl
+++ b/test/shader_io/fragment_output_builtins.wgsl.expected.msl
@@ -8,13 +8,25 @@
   uint value [[sample_mask]];
 };
 
+float main1_inner() {
+  return 1.0f;
+}
+
 fragment tint_symbol main1() {
-  tint_symbol const tint_symbol_2 = {.value=1.0f};
-  return tint_symbol_2;
+  float const inner_result = main1_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+uint main2_inner() {
+  return 1u;
 }
 
 fragment tint_symbol_1 main2() {
-  tint_symbol_1 const tint_symbol_3 = {.value=1u};
-  return tint_symbol_3;
+  uint const inner_result_1 = main2_inner();
+  tint_symbol_1 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
diff --git a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl
index 889bdb9..2d2e660 100644
--- a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.hlsl
@@ -7,8 +7,15 @@
   uint sample_mask : SV_Coverage;
 };
 
-tint_symbol main() {
+FragmentOutputs main_inner() {
   const FragmentOutputs tint_symbol_1 = {1.0f, 1u};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.frag_depth, tint_symbol_1.sample_mask};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const FragmentOutputs inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.frag_depth = inner_result.frag_depth;
+  wrapper_result.sample_mask = inner_result.sample_mask;
+  return wrapper_result;
 }
diff --git a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl
index 851c83b..65de6df 100644
--- a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl
+++ b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.msl
@@ -10,9 +10,16 @@
   uint sample_mask [[sample_mask]];
 };
 
-fragment tint_symbol_1 tint_symbol() {
+FragmentOutputs tint_symbol_inner() {
   FragmentOutputs const tint_symbol_2 = {.frag_depth=1.0f, .sample_mask=1u};
-  tint_symbol_1 const tint_symbol_3 = {.frag_depth=tint_symbol_2.frag_depth, .sample_mask=tint_symbol_2.sample_mask};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol() {
+  FragmentOutputs const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.frag_depth = inner_result.frag_depth;
+  wrapper_result.sample_mask = inner_result.sample_mask;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/fragment_output_locations.wgsl.expected.hlsl b/test/shader_io/fragment_output_locations.wgsl.expected.hlsl
index 551dbce..0a9e48f 100644
--- a/test/shader_io/fragment_output_locations.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_output_locations.wgsl.expected.hlsl
@@ -2,34 +2,58 @@
   int value : SV_Target0;
 };
 
+int main0_inner() {
+  return 1;
+}
+
 tint_symbol main0() {
-  const tint_symbol tint_symbol_4 = {1};
-  return tint_symbol_4;
+  const int inner_result = main0_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
 struct tint_symbol_1 {
   uint value : SV_Target1;
 };
 
+uint main1_inner() {
+  return 1u;
+}
+
 tint_symbol_1 main1() {
-  const tint_symbol_1 tint_symbol_5 = {1u};
-  return tint_symbol_5;
+  const uint inner_result_1 = main1_inner();
+  tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
 struct tint_symbol_2 {
   float value : SV_Target2;
 };
 
+float main2_inner() {
+  return 1.0f;
+}
+
 tint_symbol_2 main2() {
-  const tint_symbol_2 tint_symbol_6 = {1.0f};
-  return tint_symbol_6;
+  const float inner_result_2 = main2_inner();
+  tint_symbol_2 wrapper_result_2 = (tint_symbol_2)0;
+  wrapper_result_2.value = inner_result_2;
+  return wrapper_result_2;
 }
 
 struct tint_symbol_3 {
   float4 value : SV_Target3;
 };
 
+float4 main3_inner() {
+  return float4(1.0f, 2.0f, 3.0f, 4.0f);
+}
+
 tint_symbol_3 main3() {
-  const tint_symbol_3 tint_symbol_7 = {float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  return tint_symbol_7;
+  const float4 inner_result_3 = main3_inner();
+  tint_symbol_3 wrapper_result_3 = (tint_symbol_3)0;
+  wrapper_result_3.value = inner_result_3;
+  return wrapper_result_3;
 }
diff --git a/test/shader_io/fragment_output_locations.wgsl.expected.msl b/test/shader_io/fragment_output_locations.wgsl.expected.msl
index fed3dca..03ba9bb 100644
--- a/test/shader_io/fragment_output_locations.wgsl.expected.msl
+++ b/test/shader_io/fragment_output_locations.wgsl.expected.msl
@@ -14,23 +14,47 @@
   float4 value [[color(3)]];
 };
 
+int main0_inner() {
+  return 1;
+}
+
 fragment tint_symbol main0() {
-  tint_symbol const tint_symbol_4 = {.value=1};
-  return tint_symbol_4;
+  int const inner_result = main0_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+uint main1_inner() {
+  return 1u;
 }
 
 fragment tint_symbol_1 main1() {
-  tint_symbol_1 const tint_symbol_5 = {.value=1u};
-  return tint_symbol_5;
+  uint const inner_result_1 = main1_inner();
+  tint_symbol_1 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
+}
+
+float main2_inner() {
+  return 1.0f;
 }
 
 fragment tint_symbol_2 main2() {
-  tint_symbol_2 const tint_symbol_6 = {.value=1.0f};
-  return tint_symbol_6;
+  float const inner_result_2 = main2_inner();
+  tint_symbol_2 wrapper_result_2 = {};
+  wrapper_result_2.value = inner_result_2;
+  return wrapper_result_2;
+}
+
+float4 main3_inner() {
+  return float4(1.0f, 2.0f, 3.0f, 4.0f);
 }
 
 fragment tint_symbol_3 main3() {
-  tint_symbol_3 const tint_symbol_7 = {.value=float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  return tint_symbol_7;
+  float4 const inner_result_3 = main3_inner();
+  tint_symbol_3 wrapper_result_3 = {};
+  wrapper_result_3.value = inner_result_3;
+  return wrapper_result_3;
 }
 
diff --git a/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl b/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl
index 460f4a3..09216c3 100644
--- a/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_output_locations_struct.wgsl.expected.hlsl
@@ -11,8 +11,17 @@
   float4 loc3 : SV_Target3;
 };
 
-tint_symbol main() {
+FragmentOutputs main_inner() {
   const FragmentOutputs tint_symbol_1 = {1, 1u, 1.0f, float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const FragmentOutputs inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.loc0 = inner_result.loc0;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.loc3 = inner_result.loc3;
+  return wrapper_result;
 }
diff --git a/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl b/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl
index e4e75cb..6cfad1a 100644
--- a/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl
+++ b/test/shader_io/fragment_output_locations_struct.wgsl.expected.msl
@@ -14,9 +14,18 @@
   float4 loc3 [[color(3)]];
 };
 
-fragment tint_symbol_1 tint_symbol() {
+FragmentOutputs tint_symbol_inner() {
   FragmentOutputs const tint_symbol_2 = {.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  tint_symbol_1 const tint_symbol_3 = {.loc0=tint_symbol_2.loc0, .loc1=tint_symbol_2.loc1, .loc2=tint_symbol_2.loc2, .loc3=tint_symbol_2.loc3};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol() {
+  FragmentOutputs const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.loc0 = inner_result.loc0;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.loc3 = inner_result.loc3;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl b/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl
index 9bc3fa2..8658875 100644
--- a/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl
+++ b/test/shader_io/fragment_output_mixed.wgsl.expected.hlsl
@@ -15,8 +15,19 @@
   uint sample_mask : SV_Coverage;
 };
 
-tint_symbol main() {
+FragmentOutputs main_inner() {
   const FragmentOutputs tint_symbol_1 = {1, 2.0f, 1u, 1.0f, 2u, float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3, tint_symbol_1.frag_depth, tint_symbol_1.sample_mask};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const FragmentOutputs inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.loc0 = inner_result.loc0;
+  wrapper_result.frag_depth = inner_result.frag_depth;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.sample_mask = inner_result.sample_mask;
+  wrapper_result.loc3 = inner_result.loc3;
+  return wrapper_result;
 }
diff --git a/test/shader_io/fragment_output_mixed.wgsl.expected.msl b/test/shader_io/fragment_output_mixed.wgsl.expected.msl
index 665936b..c7d2a13 100644
--- a/test/shader_io/fragment_output_mixed.wgsl.expected.msl
+++ b/test/shader_io/fragment_output_mixed.wgsl.expected.msl
@@ -18,9 +18,20 @@
   uint sample_mask [[sample_mask]];
 };
 
-fragment tint_symbol_1 tint_symbol() {
+FragmentOutputs tint_symbol_inner() {
   FragmentOutputs const tint_symbol_2 = {.loc0=1, .frag_depth=2.0f, .loc1=1u, .loc2=1.0f, .sample_mask=2u, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  tint_symbol_1 const tint_symbol_3 = {.loc0=tint_symbol_2.loc0, .loc1=tint_symbol_2.loc1, .loc2=tint_symbol_2.loc2, .loc3=tint_symbol_2.loc3, .frag_depth=tint_symbol_2.frag_depth, .sample_mask=tint_symbol_2.sample_mask};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol() {
+  FragmentOutputs const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.loc0 = inner_result.loc0;
+  wrapper_result.frag_depth = inner_result.frag_depth;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.sample_mask = inner_result.sample_mask;
+  wrapper_result.loc3 = inner_result.loc3;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl b/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl
index e653990..bb78da9 100644
--- a/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl
+++ b/test/shader_io/interpolate_input_parameters.wgsl.expected.hlsl
@@ -9,14 +9,10 @@
   noperspective sample float linear_sample : TEXCOORD7;
 };
 
+void main_inner(float none, float flat, float perspective_center, float perspective_centroid, float perspective_sample, float linear_center, float linear_centroid, float linear_sample) {
+}
+
 void main(tint_symbol_1 tint_symbol) {
-  const float none = tint_symbol.none;
-  const float flat = tint_symbol.flat;
-  const float perspective_center = tint_symbol.perspective_center;
-  const float perspective_centroid = tint_symbol.perspective_centroid;
-  const float perspective_sample = tint_symbol.perspective_sample;
-  const float linear_center = tint_symbol.linear_center;
-  const float linear_centroid = tint_symbol.linear_centroid;
-  const float linear_sample = tint_symbol.linear_sample;
+  main_inner(tint_symbol.none, tint_symbol.flat, tint_symbol.perspective_center, tint_symbol.perspective_centroid, tint_symbol.perspective_sample, tint_symbol.linear_center, tint_symbol.linear_centroid, tint_symbol.linear_sample);
   return;
 }
diff --git a/test/shader_io/interpolate_input_parameters.wgsl.expected.msl b/test/shader_io/interpolate_input_parameters.wgsl.expected.msl
index ff19572..d460bb0 100644
--- a/test/shader_io/interpolate_input_parameters.wgsl.expected.msl
+++ b/test/shader_io/interpolate_input_parameters.wgsl.expected.msl
@@ -12,15 +12,11 @@
   float linear_sample [[user(locn7)]] [[sample_no_perspective]];
 };
 
+void tint_symbol_inner(float none, float flat, float perspective_center, float perspective_centroid, float perspective_sample, float linear_center, float linear_centroid, float linear_sample) {
+}
+
 fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  float const none = tint_symbol_1.none;
-  float const flat = tint_symbol_1.flat;
-  float const perspective_center = tint_symbol_1.perspective_center;
-  float const perspective_centroid = tint_symbol_1.perspective_centroid;
-  float const perspective_sample = tint_symbol_1.perspective_sample;
-  float const linear_center = tint_symbol_1.linear_center;
-  float const linear_centroid = tint_symbol_1.linear_centroid;
-  float const linear_sample = tint_symbol_1.linear_sample;
+  tint_symbol_inner(tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample);
   return;
 }
 
diff --git a/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl b/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl
index 694807b..cfc7acd 100644
--- a/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl
+++ b/test/shader_io/interpolate_input_struct.wgsl.expected.hlsl
@@ -19,7 +19,11 @@
   noperspective sample float linear_sample : TEXCOORD7;
 };
 
+void main_inner(In tint_symbol) {
+}
+
 void main(tint_symbol_2 tint_symbol_1) {
-  const In tint_symbol = {tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample};
+  const In tint_symbol_3 = {tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample};
+  main_inner(tint_symbol_3);
   return;
 }
diff --git a/test/shader_io/interpolate_input_struct.wgsl.expected.msl b/test/shader_io/interpolate_input_struct.wgsl.expected.msl
index 285f608..edc350f 100644
--- a/test/shader_io/interpolate_input_struct.wgsl.expected.msl
+++ b/test/shader_io/interpolate_input_struct.wgsl.expected.msl
@@ -22,8 +22,12 @@
   float linear_sample [[user(locn7)]] [[sample_no_perspective]];
 };
 
+void tint_symbol_inner(In in) {
+}
+
 fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  In const in = {.none=tint_symbol_1.none, .flat=tint_symbol_1.flat, .perspective_center=tint_symbol_1.perspective_center, .perspective_centroid=tint_symbol_1.perspective_centroid, .perspective_sample=tint_symbol_1.perspective_sample, .linear_center=tint_symbol_1.linear_center, .linear_centroid=tint_symbol_1.linear_centroid, .linear_sample=tint_symbol_1.linear_sample};
+  In const tint_symbol_3 = {.none=tint_symbol_1.none, .flat=tint_symbol_1.flat, .perspective_center=tint_symbol_1.perspective_center, .perspective_centroid=tint_symbol_1.perspective_centroid, .perspective_sample=tint_symbol_1.perspective_sample, .linear_center=tint_symbol_1.linear_center, .linear_centroid=tint_symbol_1.linear_centroid, .linear_sample=tint_symbol_1.linear_sample};
+  tint_symbol_inner(tint_symbol_3);
   return;
 }
 
diff --git a/test/shader_io/interpolate_integers.wgsl.expected.hlsl b/test/shader_io/interpolate_integers.wgsl.expected.hlsl
index 9dd38a9..905b792 100644
--- a/test/shader_io/interpolate_integers.wgsl.expected.hlsl
+++ b/test/shader_io/interpolate_integers.wgsl.expected.hlsl
@@ -13,25 +13,41 @@
   float4 pos : SV_Position;
 };
 
-tint_symbol vert_main() {
-  const Interface tint_symbol_1 = (Interface)0;
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.i, tint_symbol_1.u, tint_symbol_1.vi, tint_symbol_1.vu, tint_symbol_1.pos};
-  return tint_symbol_5;
+Interface vert_main_inner() {
+  const Interface tint_symbol_4 = (Interface)0;
+  return tint_symbol_4;
 }
 
-struct tint_symbol_3 {
+tint_symbol vert_main() {
+  const Interface inner_result = vert_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.i = inner_result.i;
+  wrapper_result.u = inner_result.u;
+  wrapper_result.vi = inner_result.vi;
+  wrapper_result.vu = inner_result.vu;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+struct tint_symbol_2 {
   int i : TEXCOORD0;
   uint u : TEXCOORD1;
   int4 vi : TEXCOORD2;
   uint4 vu : TEXCOORD3;
   float4 pos : SV_Position;
 };
-struct tint_symbol_4 {
+struct tint_symbol_3 {
   int value : SV_Target0;
 };
 
-tint_symbol_4 frag_main(tint_symbol_3 tint_symbol_2) {
-  const Interface inputs = {tint_symbol_2.i, tint_symbol_2.u, tint_symbol_2.vi, tint_symbol_2.vu, tint_symbol_2.pos};
-  const tint_symbol_4 tint_symbol_6 = {inputs.i};
-  return tint_symbol_6;
+int frag_main_inner(Interface inputs) {
+  return inputs.i;
+}
+
+tint_symbol_3 frag_main(tint_symbol_2 tint_symbol_1) {
+  const Interface tint_symbol_5 = {tint_symbol_1.i, tint_symbol_1.u, tint_symbol_1.vi, tint_symbol_1.vu, tint_symbol_1.pos};
+  const int inner_result_1 = frag_main_inner(tint_symbol_5);
+  tint_symbol_3 wrapper_result_1 = (tint_symbol_3)0;
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
diff --git a/test/shader_io/interpolate_integers.wgsl.expected.msl b/test/shader_io/interpolate_integers.wgsl.expected.msl
index 4fb8d3a..420daa7 100644
--- a/test/shader_io/interpolate_integers.wgsl.expected.msl
+++ b/test/shader_io/interpolate_integers.wgsl.expected.msl
@@ -15,25 +15,41 @@
   uint4 vu [[user(locn3)]];
   float4 pos [[position]];
 };
-struct tint_symbol_4 {
+struct tint_symbol_2 {
   int i [[user(locn0)]];
   uint u [[user(locn1)]];
   int4 vi [[user(locn2)]];
   uint4 vu [[user(locn3)]];
 };
-struct tint_symbol_5 {
+struct tint_symbol_3 {
   int value [[color(0)]];
 };
 
-vertex tint_symbol vert_main() {
-  Interface const tint_symbol_1 = {};
-  tint_symbol const tint_symbol_6 = {.i=tint_symbol_1.i, .u=tint_symbol_1.u, .vi=tint_symbol_1.vi, .vu=tint_symbol_1.vu, .pos=tint_symbol_1.pos};
-  return tint_symbol_6;
+Interface vert_main_inner() {
+  Interface const tint_symbol_4 = {};
+  return tint_symbol_4;
 }
 
-fragment tint_symbol_5 frag_main(float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]]) {
-  Interface const inputs = {.i=tint_symbol_2.i, .u=tint_symbol_2.u, .vi=tint_symbol_2.vi, .vu=tint_symbol_2.vu, .pos=tint_symbol_3};
-  tint_symbol_5 const tint_symbol_7 = {.value=inputs.i};
-  return tint_symbol_7;
+vertex tint_symbol vert_main() {
+  Interface const inner_result = vert_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.i = inner_result.i;
+  wrapper_result.u = inner_result.u;
+  wrapper_result.vi = inner_result.vi;
+  wrapper_result.vu = inner_result.vu;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+int frag_main_inner(Interface inputs) {
+  return inputs.i;
+}
+
+fragment tint_symbol_3 frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  Interface const tint_symbol_5 = {.i=tint_symbol_1.i, .u=tint_symbol_1.u, .vi=tint_symbol_1.vi, .vu=tint_symbol_1.vu, .pos=pos};
+  int const inner_result_1 = frag_main_inner(tint_symbol_5);
+  tint_symbol_3 wrapper_result_1 = {};
+  wrapper_result_1.value = inner_result_1;
+  return wrapper_result_1;
 }
 
diff --git a/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl b/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl
index 064119f..1929097 100644
--- a/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl
+++ b/test/shader_io/interpolate_return_struct.wgsl.expected.hlsl
@@ -21,8 +21,22 @@
   float4 pos : SV_Position;
 };
 
-tint_symbol main() {
+Out main_inner() {
   const Out tint_symbol_1 = (Out)0;
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.none, tint_symbol_1.flat, tint_symbol_1.perspective_center, tint_symbol_1.perspective_centroid, tint_symbol_1.perspective_sample, tint_symbol_1.linear_center, tint_symbol_1.linear_centroid, tint_symbol_1.linear_sample, tint_symbol_1.pos};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const Out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.none = inner_result.none;
+  wrapper_result.flat = inner_result.flat;
+  wrapper_result.perspective_center = inner_result.perspective_center;
+  wrapper_result.perspective_centroid = inner_result.perspective_centroid;
+  wrapper_result.perspective_sample = inner_result.perspective_sample;
+  wrapper_result.linear_center = inner_result.linear_center;
+  wrapper_result.linear_centroid = inner_result.linear_centroid;
+  wrapper_result.linear_sample = inner_result.linear_sample;
+  return wrapper_result;
 }
diff --git a/test/shader_io/interpolate_return_struct.wgsl.expected.msl b/test/shader_io/interpolate_return_struct.wgsl.expected.msl
index 5cb0df6..afac16e 100644
--- a/test/shader_io/interpolate_return_struct.wgsl.expected.msl
+++ b/test/shader_io/interpolate_return_struct.wgsl.expected.msl
@@ -24,9 +24,23 @@
   float4 pos [[position]];
 };
 
-vertex tint_symbol_1 tint_symbol() {
+Out tint_symbol_inner() {
   Out const tint_symbol_2 = {};
-  tint_symbol_1 const tint_symbol_3 = {.none=tint_symbol_2.none, .flat=tint_symbol_2.flat, .perspective_center=tint_symbol_2.perspective_center, .perspective_centroid=tint_symbol_2.perspective_centroid, .perspective_sample=tint_symbol_2.perspective_sample, .linear_center=tint_symbol_2.linear_center, .linear_centroid=tint_symbol_2.linear_centroid, .linear_sample=tint_symbol_2.linear_sample, .pos=tint_symbol_2.pos};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  Out const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.none = inner_result.none;
+  wrapper_result.flat = inner_result.flat;
+  wrapper_result.perspective_center = inner_result.perspective_center;
+  wrapper_result.perspective_centroid = inner_result.perspective_centroid;
+  wrapper_result.perspective_sample = inner_result.perspective_sample;
+  wrapper_result.linear_center = inner_result.linear_center;
+  wrapper_result.linear_centroid = inner_result.linear_centroid;
+  wrapper_result.linear_sample = inner_result.linear_sample;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/invariant.wgsl.expected.hlsl b/test/shader_io/invariant.wgsl.expected.hlsl
index 4597e8d..63c6c9a 100644
--- a/test/shader_io/invariant.wgsl.expected.hlsl
+++ b/test/shader_io/invariant.wgsl.expected.hlsl
@@ -2,7 +2,13 @@
   precise float4 value : SV_Position;
 };
 
+float4 main_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 tint_symbol main() {
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/invariant.wgsl.expected.msl b/test/shader_io/invariant.wgsl.expected.msl
index 5543bd0..c9eb97e 100644
--- a/test/shader_io/invariant.wgsl.expected.msl
+++ b/test/shader_io/invariant.wgsl.expected.msl
@@ -5,8 +5,14 @@
   float4 value [[position]] [[invariant]];
 };
 
+float4 tint_symbol_inner() {
+  return float4();
+}
+
 vertex tint_symbol_1 tint_symbol() {
-  tint_symbol_1 const tint_symbol_2 = {.value=float4()};
-  return tint_symbol_2;
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/invariant_struct_member.wgsl.expected.hlsl b/test/shader_io/invariant_struct_member.wgsl.expected.hlsl
index 9090f0e..b99e552 100644
--- a/test/shader_io/invariant_struct_member.wgsl.expected.hlsl
+++ b/test/shader_io/invariant_struct_member.wgsl.expected.hlsl
@@ -5,8 +5,14 @@
   precise float4 pos : SV_Position;
 };
 
-tint_symbol main() {
+Out main_inner() {
   const Out tint_symbol_1 = (Out)0;
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.pos};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const Out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
 }
diff --git a/test/shader_io/invariant_struct_member.wgsl.expected.msl b/test/shader_io/invariant_struct_member.wgsl.expected.msl
index 545642e..a2c44a7 100644
--- a/test/shader_io/invariant_struct_member.wgsl.expected.msl
+++ b/test/shader_io/invariant_struct_member.wgsl.expected.msl
@@ -8,9 +8,15 @@
   float4 pos [[position]] [[invariant]];
 };
 
-vertex tint_symbol_1 tint_symbol() {
+Out tint_symbol_inner() {
   Out const tint_symbol_2 = {};
-  tint_symbol_1 const tint_symbol_3 = {.pos=tint_symbol_2.pos};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  Out const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl b/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl
index 2adabe5..6bb2f0a 100644
--- a/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl
+++ b/test/shader_io/shared_struct_different_stages.wgsl.expected.hlsl
@@ -9,21 +9,33 @@
   float4 pos : SV_Position;
 };
 
-tint_symbol vert_main() {
-  const Interface tint_symbol_1 = {0.400000006f, 0.600000024f, float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.col1, tint_symbol_1.col2, tint_symbol_1.pos};
-  return tint_symbol_4;
+Interface vert_main_inner() {
+  const Interface tint_symbol_3 = {0.400000006f, 0.600000024f, float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  return tint_symbol_3;
 }
 
-struct tint_symbol_3 {
+tint_symbol vert_main() {
+  const Interface inner_result = vert_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.col1 = inner_result.col1;
+  wrapper_result.col2 = inner_result.col2;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+struct tint_symbol_2 {
   float col1 : TEXCOORD1;
   float col2 : TEXCOORD2;
   float4 pos : SV_Position;
 };
 
-void frag_main(tint_symbol_3 tint_symbol_2) {
-  const Interface colors = {tint_symbol_2.col1, tint_symbol_2.col2, tint_symbol_2.pos};
+void frag_main_inner(Interface colors) {
   const float r = colors.col1;
   const float g = colors.col2;
+}
+
+void frag_main(tint_symbol_2 tint_symbol_1) {
+  const Interface tint_symbol_4 = {tint_symbol_1.col1, tint_symbol_1.col2, tint_symbol_1.pos};
+  frag_main_inner(tint_symbol_4);
   return;
 }
diff --git a/test/shader_io/shared_struct_different_stages.wgsl.expected.msl b/test/shader_io/shared_struct_different_stages.wgsl.expected.msl
index f51829c..c4388b7 100644
--- a/test/shader_io/shared_struct_different_stages.wgsl.expected.msl
+++ b/test/shader_io/shared_struct_different_stages.wgsl.expected.msl
@@ -11,21 +11,33 @@
   float col2 [[user(locn2)]];
   float4 pos [[position]];
 };
-struct tint_symbol_4 {
+struct tint_symbol_2 {
   float col1 [[user(locn1)]];
   float col2 [[user(locn2)]];
 };
 
-vertex tint_symbol vert_main() {
-  Interface const tint_symbol_1 = {.col1=0.400000006f, .col2=0.600000024f, .pos=float4()};
-  tint_symbol const tint_symbol_5 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=tint_symbol_1.pos};
-  return tint_symbol_5;
+Interface vert_main_inner() {
+  Interface const tint_symbol_3 = {.col1=0.400000006f, .col2=0.600000024f, .pos=float4()};
+  return tint_symbol_3;
 }
 
-fragment void frag_main(float4 tint_symbol_3 [[position]], tint_symbol_4 tint_symbol_2 [[stage_in]]) {
-  Interface const colors = {.col1=tint_symbol_2.col1, .col2=tint_symbol_2.col2, .pos=tint_symbol_3};
+vertex tint_symbol vert_main() {
+  Interface const inner_result = vert_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.col1 = inner_result.col1;
+  wrapper_result.col2 = inner_result.col2;
+  wrapper_result.pos = inner_result.pos;
+  return wrapper_result;
+}
+
+void frag_main_inner(Interface colors) {
   float const r = colors.col1;
   float const g = colors.col2;
+}
+
+fragment void frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  Interface const tint_symbol_4 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=pos};
+  frag_main_inner(tint_symbol_4);
   return;
 }
 
diff --git a/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl b/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl
index 8e85183..8ee4d8e 100644
--- a/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl
+++ b/test/shader_io/shared_struct_helper_function.wgsl.expected.hlsl
@@ -4,8 +4,8 @@
 };
 
 VertexOutput foo(float x) {
-  const VertexOutput tint_symbol_4 = {float4(x, x, x, 1.0f), 42};
-  return tint_symbol_4;
+  const VertexOutput tint_symbol_2 = {float4(x, x, x, 1.0f), 42};
+  return tint_symbol_2;
 }
 
 struct tint_symbol {
@@ -13,19 +13,31 @@
   float4 pos : SV_Position;
 };
 
-tint_symbol vert_main1() {
-  const VertexOutput tint_symbol_1 = foo(0.5f);
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.loc0, tint_symbol_1.pos};
-  return tint_symbol_5;
+VertexOutput vert_main1_inner() {
+  return foo(0.5f);
 }
 
-struct tint_symbol_2 {
+tint_symbol vert_main1() {
+  const VertexOutput inner_result = vert_main1_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.loc0 = inner_result.loc0;
+  return wrapper_result;
+}
+
+struct tint_symbol_1 {
   int loc0 : TEXCOORD0;
   float4 pos : SV_Position;
 };
 
-tint_symbol_2 vert_main2() {
-  const VertexOutput tint_symbol_3 = foo(0.25f);
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.loc0, tint_symbol_3.pos};
-  return tint_symbol_6;
+VertexOutput vert_main2_inner() {
+  return foo(0.25f);
+}
+
+tint_symbol_1 vert_main2() {
+  const VertexOutput inner_result_1 = vert_main2_inner();
+  tint_symbol_1 wrapper_result_1 = (tint_symbol_1)0;
+  wrapper_result_1.pos = inner_result_1.pos;
+  wrapper_result_1.loc0 = inner_result_1.loc0;
+  return wrapper_result_1;
 }
diff --git a/test/shader_io/shared_struct_helper_function.wgsl.expected.msl b/test/shader_io/shared_struct_helper_function.wgsl.expected.msl
index 8131dfe..b07dab7 100644
--- a/test/shader_io/shared_struct_helper_function.wgsl.expected.msl
+++ b/test/shader_io/shared_struct_helper_function.wgsl.expected.msl
@@ -9,25 +9,37 @@
   int loc0 [[user(locn0)]];
   float4 pos [[position]];
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   int loc0 [[user(locn0)]];
   float4 pos [[position]];
 };
 
 VertexOutput foo(float x) {
-  VertexOutput const tint_symbol_4 = {.pos=float4(x, x, x, 1.0f), .loc0=42};
-  return tint_symbol_4;
+  VertexOutput const tint_symbol_2 = {.pos=float4(x, x, x, 1.0f), .loc0=42};
+  return tint_symbol_2;
+}
+
+VertexOutput vert_main1_inner() {
+  return foo(0.5f);
 }
 
 vertex tint_symbol vert_main1() {
-  VertexOutput const tint_symbol_1 = foo(0.5f);
-  tint_symbol const tint_symbol_5 = {.loc0=tint_symbol_1.loc0, .pos=tint_symbol_1.pos};
-  return tint_symbol_5;
+  VertexOutput const inner_result = vert_main1_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.pos = inner_result.pos;
+  wrapper_result.loc0 = inner_result.loc0;
+  return wrapper_result;
 }
 
-vertex tint_symbol_2 vert_main2() {
-  VertexOutput const tint_symbol_3 = foo(0.25f);
-  tint_symbol_2 const tint_symbol_6 = {.loc0=tint_symbol_3.loc0, .pos=tint_symbol_3.pos};
-  return tint_symbol_6;
+VertexOutput vert_main2_inner() {
+  return foo(0.25f);
+}
+
+vertex tint_symbol_1 vert_main2() {
+  VertexOutput const inner_result_1 = vert_main2_inner();
+  tint_symbol_1 wrapper_result_1 = {};
+  wrapper_result_1.pos = inner_result_1.pos;
+  wrapper_result_1.loc0 = inner_result_1.loc0;
+  return wrapper_result_1;
 }
 
diff --git a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl
index c06b40f..788f1f9 100644
--- a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl
+++ b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.hlsl
@@ -18,11 +18,15 @@
   buffer.Store4((offset + 128u), asuint(value.v));
 }
 
-void frag_main(tint_symbol_1 tint_symbol) {
-  const S input = {tint_symbol.f, tint_symbol.u, tint_symbol.v};
+void frag_main_inner(S input) {
   const float f = input.f;
   const uint u = input.u;
   const float4 v = input.v;
   tint_symbol_2(output, 0u, input);
+}
+
+void frag_main(tint_symbol_1 tint_symbol) {
+  const S tint_symbol_6 = {tint_symbol.f, tint_symbol.u, tint_symbol.v};
+  frag_main_inner(tint_symbol_6);
   return;
 }
diff --git a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl
index 17fece7..b4d0a25 100644
--- a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl
+++ b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.msl
@@ -8,17 +8,21 @@
   /* 0x0080 */ packed_float4 v;
   /* 0x0090 */ int8_t tint_pad_1[112];
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float f [[user(locn0)]];
   uint u [[user(locn1)]];
 };
 
-fragment void frag_main(float4 tint_symbol_1 [[position]], tint_symbol_2 tint_symbol [[stage_in]], device S& output [[buffer(0)]]) {
-  S const input = {.f=tint_symbol.f, .u=tint_symbol.u, .v=tint_symbol_1};
+void frag_main_inner(device S& output, S input) {
   float const f = input.f;
   uint const u = input.u;
   float4 const v = input.v;
   output = input;
+}
+
+fragment void frag_main(float4 v [[position]], tint_symbol_1 tint_symbol [[stage_in]], device S& output [[buffer(0)]]) {
+  S const tint_symbol_2 = {.f=tint_symbol.f, .u=tint_symbol.u, .v=v};
+  frag_main_inner(output, tint_symbol_2);
   return;
 }
 
diff --git a/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl b/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl
index 8a9ad02..9917425 100644
--- a/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_input_builtins.wgsl.expected.hlsl
@@ -6,10 +6,14 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint vertex_index = tint_symbol.vertex_index;
-  const uint instance_index = tint_symbol.instance_index;
+float4 main_inner(uint vertex_index, uint instance_index) {
   const uint foo = (vertex_index + instance_index);
-  const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const float4 inner_result = main_inner(tint_symbol.vertex_index, tint_symbol.instance_index);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_input_builtins.wgsl.expected.msl b/test/shader_io/vertex_input_builtins.wgsl.expected.msl
index f3cff19..1ef825b 100644
--- a/test/shader_io/vertex_input_builtins.wgsl.expected.msl
+++ b/test/shader_io/vertex_input_builtins.wgsl.expected.msl
@@ -1,13 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 value [[position]];
 };
 
-vertex tint_symbol_2 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) {
+float4 tint_symbol_inner(uint vertex_index, uint instance_index) {
   uint const foo = (vertex_index + instance_index);
-  tint_symbol_2 const tint_symbol_3 = {.value=float4()};
-  return tint_symbol_3;
+  return float4();
+}
+
+vertex tint_symbol_1 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) {
+  float4 const inner_result = tint_symbol_inner(vertex_index, instance_index);
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl
index cce7374..87f19d6 100644
--- a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.hlsl
@@ -10,9 +10,15 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const VertexInputs inputs = {tint_symbol.vertex_index, tint_symbol.instance_index};
+float4 main_inner(VertexInputs inputs) {
   const uint foo = (inputs.vertex_index + inputs.instance_index);
-  const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const VertexInputs tint_symbol_3 = {tint_symbol.vertex_index, tint_symbol.instance_index};
+  const float4 inner_result = main_inner(tint_symbol_3);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl
index c973c83..bd97441 100644
--- a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl
+++ b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.msl
@@ -5,14 +5,20 @@
   uint vertex_index;
   uint instance_index;
 };
-struct tint_symbol_4 {
+struct tint_symbol_1 {
   float4 value [[position]];
 };
 
-vertex tint_symbol_4 tint_symbol(uint tint_symbol_2 [[vertex_id]], uint tint_symbol_3 [[instance_id]]) {
-  VertexInputs const inputs = {.vertex_index=tint_symbol_2, .instance_index=tint_symbol_3};
+float4 tint_symbol_inner(VertexInputs inputs) {
   uint const foo = (inputs.vertex_index + inputs.instance_index);
-  tint_symbol_4 const tint_symbol_5 = {.value=float4()};
-  return tint_symbol_5;
+  return float4();
+}
+
+vertex tint_symbol_1 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) {
+  VertexInputs const tint_symbol_2 = {.vertex_index=vertex_index, .instance_index=instance_index};
+  float4 const inner_result = tint_symbol_inner(tint_symbol_2);
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_input_locations.wgsl.expected.hlsl b/test/shader_io/vertex_input_locations.wgsl.expected.hlsl
index e604ee9..94c8220 100644
--- a/test/shader_io/vertex_input_locations.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_input_locations.wgsl.expected.hlsl
@@ -8,15 +8,17 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const int loc0 = tint_symbol.loc0;
-  const uint loc1 = tint_symbol.loc1;
-  const float loc2 = tint_symbol.loc2;
-  const float4 loc3 = tint_symbol.loc3;
+float4 main_inner(int loc0, uint loc1, float loc2, float4 loc3) {
   const int i = loc0;
   const uint u = loc1;
   const float f = loc2;
   const float4 v = loc3;
-  const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const float4 inner_result = main_inner(tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_input_locations.wgsl.expected.msl b/test/shader_io/vertex_input_locations.wgsl.expected.msl
index 4055450..a7e8658 100644
--- a/test/shader_io/vertex_input_locations.wgsl.expected.msl
+++ b/test/shader_io/vertex_input_locations.wgsl.expected.msl
@@ -11,16 +11,18 @@
   float4 value [[position]];
 };
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  int const loc0 = tint_symbol_1.loc0;
-  uint const loc1 = tint_symbol_1.loc1;
-  float const loc2 = tint_symbol_1.loc2;
-  float4 const loc3 = tint_symbol_1.loc3;
+float4 tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) {
   int const i = loc0;
   uint const u = loc1;
   float const f = loc2;
   float4 const v = loc3;
-  tint_symbol_3 const tint_symbol_4 = {.value=float4()};
-  return tint_symbol_4;
+  return float4();
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  float4 const inner_result = tint_symbol_inner(tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl b/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl
index f94ffc2..733014d 100644
--- a/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_input_locations_struct.wgsl.expected.hlsl
@@ -14,12 +14,18 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const VertexInputs inputs = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3};
+float4 main_inner(VertexInputs inputs) {
   const int i = inputs.loc0;
   const uint u = inputs.loc1;
   const float f = inputs.loc2;
   const float4 v = inputs.loc3;
-  const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const VertexInputs tint_symbol_3 = {tint_symbol.loc0, tint_symbol.loc1, tint_symbol.loc2, tint_symbol.loc3};
+  const float4 inner_result = main_inner(tint_symbol_3);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl b/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl
index 7b033dc..c85b7f9 100644
--- a/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl
+++ b/test/shader_io/vertex_input_locations_struct.wgsl.expected.msl
@@ -17,13 +17,19 @@
   float4 value [[position]];
 };
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  VertexInputs const inputs = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3};
+float4 tint_symbol_inner(VertexInputs inputs) {
   int const i = inputs.loc0;
   uint const u = inputs.loc1;
   float const f = inputs.loc2;
   float4 const v = inputs.loc3;
-  tint_symbol_3 const tint_symbol_4 = {.value=float4()};
-  return tint_symbol_4;
+  return float4();
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  VertexInputs const tint_symbol_4 = {.loc0=tint_symbol_1.loc0, .loc1=tint_symbol_1.loc1, .loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3};
+  float4 const inner_result = tint_symbol_inner(tint_symbol_4);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl b/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl
index 4b37ed7..916f00f 100644
--- a/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_input_mixed.wgsl.expected.hlsl
@@ -18,16 +18,20 @@
   float4 value : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const VertexInputs0 inputs0 = {tint_symbol.vertex_index, tint_symbol.loc0};
-  const uint loc1 = tint_symbol.loc1;
-  const uint instance_index = tint_symbol.instance_index;
-  const VertexInputs1 inputs1 = {tint_symbol.loc2, tint_symbol.loc3};
+float4 main_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) {
   const uint foo = (inputs0.vertex_index + instance_index);
   const int i = inputs0.loc0;
   const uint u = loc1;
   const float f = inputs1.loc2;
   const float4 v = inputs1.loc3;
-  const tint_symbol_2 tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const VertexInputs0 tint_symbol_3 = {tint_symbol.vertex_index, tint_symbol.loc0};
+  const VertexInputs1 tint_symbol_4 = {tint_symbol.loc2, tint_symbol.loc3};
+  const float4 inner_result = main_inner(tint_symbol_3, tint_symbol.loc1, tint_symbol.instance_index, tint_symbol_4);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_input_mixed.wgsl.expected.msl b/test/shader_io/vertex_input_mixed.wgsl.expected.msl
index 9c1e813..07dd9b9 100644
--- a/test/shader_io/vertex_input_mixed.wgsl.expected.msl
+++ b/test/shader_io/vertex_input_mixed.wgsl.expected.msl
@@ -9,26 +9,31 @@
   float loc2;
   float4 loc3;
 };
-struct tint_symbol_3 {
+struct tint_symbol_2 {
   int loc0 [[attribute(0)]];
   uint loc1 [[attribute(1)]];
   float loc2 [[attribute(2)]];
   float4 loc3 [[attribute(3)]];
 };
-struct tint_symbol_4 {
+struct tint_symbol_3 {
   float4 value [[position]];
 };
 
-vertex tint_symbol_4 tint_symbol(uint tint_symbol_2 [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_3 tint_symbol_1 [[stage_in]]) {
-  VertexInputs0 const inputs0 = {.vertex_index=tint_symbol_2, .loc0=tint_symbol_1.loc0};
-  uint const loc1 = tint_symbol_1.loc1;
-  VertexInputs1 const inputs1 = {.loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3};
+float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) {
   uint const foo = (inputs0.vertex_index + instance_index);
   int const i = inputs0.loc0;
   uint const u = loc1;
   float const f = inputs1.loc2;
   float4 const v = inputs1.loc3;
-  tint_symbol_4 const tint_symbol_5 = {.value=float4()};
-  return tint_symbol_5;
+  return float4();
+}
+
+vertex tint_symbol_3 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  VertexInputs0 const tint_symbol_4 = {.vertex_index=vertex_index, .loc0=tint_symbol_1.loc0};
+  VertexInputs1 const tint_symbol_5 = {.loc2=tint_symbol_1.loc2, .loc3=tint_symbol_1.loc3};
+  float4 const inner_result = tint_symbol_inner(tint_symbol_4, tint_symbol_1.loc1, instance_index, tint_symbol_5);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl b/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl
index 5a48b14..d08b5d5 100644
--- a/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_output_builtins.wgsl.expected.hlsl
@@ -2,7 +2,13 @@
   float4 value : SV_Position;
 };
 
+float4 main_inner() {
+  return float4(1.0f, 2.0f, 3.0f, 4.0f);
+}
+
 tint_symbol main() {
-  const tint_symbol tint_symbol_1 = {float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  return tint_symbol_1;
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_output_builtins.wgsl.expected.msl b/test/shader_io/vertex_output_builtins.wgsl.expected.msl
index 1bc7c1c..37e950f 100644
--- a/test/shader_io/vertex_output_builtins.wgsl.expected.msl
+++ b/test/shader_io/vertex_output_builtins.wgsl.expected.msl
@@ -5,8 +5,14 @@
   float4 value [[position]];
 };
 
+float4 tint_symbol_inner() {
+  return float4(1.0f, 2.0f, 3.0f, 4.0f);
+}
+
 vertex tint_symbol_1 tint_symbol() {
-  tint_symbol_1 const tint_symbol_2 = {.value=float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  return tint_symbol_2;
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl
index 064dd8a..eeaba96 100644
--- a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.hlsl
@@ -5,8 +5,14 @@
   float4 position : SV_Position;
 };
 
-tint_symbol main() {
+VertexOutputs main_inner() {
   const VertexOutputs tint_symbol_1 = {float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const VertexOutputs inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.position = inner_result.position;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl
index 24ea7ac..d077ccc 100644
--- a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl
+++ b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.msl
@@ -8,9 +8,15 @@
   float4 position [[position]];
 };
 
-vertex tint_symbol_1 tint_symbol() {
+VertexOutputs tint_symbol_inner() {
   VertexOutputs const tint_symbol_2 = {.position=float4(1.0f, 2.0f, 3.0f, 4.0f)};
-  tint_symbol_1 const tint_symbol_3 = {.position=tint_symbol_2.position};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  VertexOutputs const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position = inner_result.position;
+  return wrapper_result;
 }
 
diff --git a/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl b/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl
index 4d62928..301487d 100644
--- a/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl
+++ b/test/shader_io/vertex_output_locations_struct.wgsl.expected.hlsl
@@ -13,8 +13,18 @@
   float4 position : SV_Position;
 };
 
-tint_symbol main() {
+VertexOutputs main_inner() {
   const VertexOutputs tint_symbol_1 = {1, 1u, 1.0f, float4(1.0f, 2.0f, 3.0f, 4.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3, tint_symbol_1.position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const VertexOutputs inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.loc0 = inner_result.loc0;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.loc3 = inner_result.loc3;
+  wrapper_result.position = inner_result.position;
+  return wrapper_result;
 }
diff --git a/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl b/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl
index b56fad9..40d177a 100644
--- a/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl
+++ b/test/shader_io/vertex_output_locations_struct.wgsl.expected.msl
@@ -16,9 +16,19 @@
   float4 position [[position]];
 };
 
-vertex tint_symbol_1 tint_symbol() {
+VertexOutputs tint_symbol_inner() {
   VertexOutputs const tint_symbol_2 = {.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f), .position=float4()};
-  tint_symbol_1 const tint_symbol_3 = {.loc0=tint_symbol_2.loc0, .loc1=tint_symbol_2.loc1, .loc2=tint_symbol_2.loc2, .loc3=tint_symbol_2.loc3, .position=tint_symbol_2.position};
-  return tint_symbol_3;
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  VertexOutputs const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.loc0 = inner_result.loc0;
+  wrapper_result.loc1 = inner_result.loc1;
+  wrapper_result.loc2 = inner_result.loc2;
+  wrapper_result.loc3 = inner_result.loc3;
+  wrapper_result.position = inner_result.position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl
index f496a7d..fdefc79 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint x_1_param : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl
index 7e7cc9a..6762cc0 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_0.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint* const tint_symbol_2) {
-  uint const x_2 = *(tint_symbol_2);
+void main_1(thread uint* const tint_symbol_1) {
+  uint const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
   thread uint tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl
index 983314b..da1756b 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint x_1_param : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl
index d6228c7..b933b90 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_1.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int* const tint_symbol_2) {
-  int const x_2 = *(tint_symbol_2);
+void main_1(thread int* const tint_symbol_1) {
+  int const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
   thread int tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl
index ab2e231..855f188 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl
index b153c9e..4408675 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_2.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl
index 9b5b8cc..51330f4 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl
index bdf373b..8fcdb7c 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_3.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl
index 1808399..5a4551e 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl
index b636006..446258d 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_4.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl
index 4c89479..ec5b041 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl
index 98f26ba..4bf5529 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_5.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl
index 737d636..f2242ef 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl
index 7ccca66..5198dd3 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_6.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl
index 8dfa375..755186d 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl
index 6cee654..d8fe682 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_AccessChain_7.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl
index f496a7d..fdefc79 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint x_1_param : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl
index 7e7cc9a..6762cc0 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_0.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint* const tint_symbol_2) {
-  uint const x_2 = *(tint_symbol_2);
+void main_1(thread uint* const tint_symbol_1) {
+  uint const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
   thread uint tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl
index 983314b..da1756b 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint x_1_param : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl
index d6228c7..b933b90 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_1.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int* const tint_symbol_2) {
-  int const x_2 = *(tint_symbol_2);
+void main_1(thread int* const tint_symbol_1) {
+  int const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
   thread int tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl
index ab2e231..855f188 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl
index b153c9e..4408675 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_2.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl
index 9b5b8cc..51330f4 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl
index bdf373b..8fcdb7c 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_3.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl
index 1808399..5a4551e 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl
index b636006..446258d 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_4.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl
index 4c89479..ec5b041 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl
index 98f26ba..4bf5529 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_5.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl
index 737d636..f2242ef 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl
index 7ccca66..5198dd3 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_6.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl
index 8dfa375..755186d 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl
index 6cee654..d8fe682 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_CopyObject_7.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl
index f496a7d..fdefc79 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint x_1_param : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl
index 7e7cc9a..6762cc0 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_0.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint* const tint_symbol_2) {
-  uint const x_2 = *(tint_symbol_2);
+void main_1(thread uint* const tint_symbol_1) {
+  uint const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
   thread uint tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl
index 983314b..da1756b 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint x_1_param : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl
index d6228c7..b933b90 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_1.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int* const tint_symbol_2) {
-  int const x_2 = *(tint_symbol_2);
+void main_1(thread int* const tint_symbol_1) {
+  int const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint x_1_param [[thread_index_in_threadgroup]]) {
   thread int tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl
index ab2e231..855f188 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl
index b153c9e..4408675 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_2.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl
index 9b5b8cc..51330f4 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl
index bdf373b..8fcdb7c 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_3.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_threadgroup]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl
index 1808399..5a4551e 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl
index b636006..446258d 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_4.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl
index 4c89479..ec5b041 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl
index 98f26ba..4bf5529 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_5.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[thread_position_in_grid]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl
index 737d636..f2242ef 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl
index 7ccca66..5198dd3 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_6.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint3* const tint_symbol_2) {
-  uint3 const x_2 = *(tint_symbol_2);
+void main_1(thread uint3* const tint_symbol_1) {
+  uint3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl
index 8dfa375..755186d 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.hlsl
@@ -9,10 +9,13 @@
   uint3 x_1_param : SV_GroupID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_1_param = tint_symbol.x_1_param;
+void main_inner(uint3 x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl
index 6cee654..d8fe682 100644
--- a/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvModuleScopeVarParserTest_ComputeBuiltin_Load_Direct_7.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int3* const tint_symbol_2) {
-  int3 const x_2 = *(tint_symbol_2);
+void main_1(thread int3* const tint_symbol_1) {
+  int3 const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint3 x_1_param, thread int3* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int3>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_1_param [[threadgroup_position_in_grid]]) {
   thread int3 tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int3>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl
index 50204af..444c8e7 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.hlsl
@@ -13,9 +13,15 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl
index 97f6e9e..9ccdb81 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_ReadReplaced_Vertex.spvasm.expected.msl
@@ -8,17 +8,23 @@
   float4 x_2_1 [[position]];
 };
 
-void main_1(thread float* const tint_symbol_4) {
-  *(tint_symbol_4) = 1.0f;
+void main_1(thread float* const tint_symbol_3) {
+  *(tint_symbol_3) = 1.0f;
   return;
 }
 
+main_out tint_symbol_inner(thread float* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
-  thread float tint_symbol_5 = 0.0f;
-  thread float4 tint_symbol_6 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_2_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  thread float tint_symbol_6 = 0.0f;
+  thread float4 tint_symbol_7 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl
index 1993bce..4edc58e 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl
index 31d7145..2589dab 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_Write1_IsErased.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl
index 1993bce..4edc58e 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl
index 31d7145..2589dab 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl
index 1993bce..4edc58e 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl
index 31d7145..2589dab 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Loose_WriteViaCopyObjectPriorAccess_Erased.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl
index 87eb656..7f01c0b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.hlsl
@@ -13,9 +13,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl
index 12f6b15..1840cc2 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_ReadReplaced.spvasm.expected.msl
@@ -8,17 +8,23 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float* const tint_symbol_4) {
-  *(tint_symbol_4) = 1.0f;
+void main_1(thread float* const tint_symbol_3) {
+  *(tint_symbol_3) = 1.0f;
   return;
 }
 
+main_out tint_symbol_inner(thread float* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
-  thread float tint_symbol_5 = 0.0f;
-  thread float4 tint_symbol_6 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  thread float tint_symbol_6 = 0.0f;
+  thread float4 tint_symbol_7 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl
index b773910..fd53068 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl
index 8e83d1d..9d19e8c 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl
index b773910..fd53068 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl
index 8e83d1d..9d19e8c 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl
index b773910..fd53068 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl
index 8e83d1d..9d19e8c 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl
index ca9f014..3558296 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl
index 09a24c3..c969091 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = float4(1.0f, 2.0f, 3.0f, 4.0f);
-  main_1();
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl
index 05826f0..b262a94 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl
index cbba940..8622e3b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl
index 6ce5943..1236e98 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl
index cd58c78..4b46a5f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  (*(tint_symbol_4)).y = 0.0f;
+void main_1(thread float4* const tint_symbol_3) {
+  (*(tint_symbol_3)).y = 0.0f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl
index 6ce5943..1236e98 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl
index cd58c78..4b46a5f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  (*(tint_symbol_4)).y = 0.0f;
+void main_1(thread float4* const tint_symbol_3) {
+  (*(tint_symbol_3)).y = 0.0f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl
index 05826f0..b262a94 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {gl_Position};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.gl_Position};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl
index cbba940..8622e3b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.gl_Position=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.gl_Position=tint_symbol_2.gl_Position};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl
index 1e520e8..97cf434 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.hlsl
@@ -15,11 +15,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_2_param = tint_symbol.x_2_param;
+main_out main_inner(uint x_2_param) {
   x_2 = x_2_param;
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl
index bb4bf26..0f0882a 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
@@ -12,13 +12,19 @@
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_2_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_2_param, thread uint* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = x_2_param;
+  main_1();
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_2_param [[vertex_id]]) {
   thread uint tint_symbol_5 = 0u;
   thread float4 tint_symbol_6 = 0.0f;
-  tint_symbol_5 = x_2_param;
-  main_1();
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_6};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_2_param, &(tint_symbol_5), &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl
index 592cc40..340d082 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float x_1_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl
index 4792818..3003cbb 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_FragDepth_Out_Initializer.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl
index 5aaa5ee..068eed1 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl
index c87d85b..20da9c1 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_OppositeSignedness.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl
index 0d3adff..0d07fb7 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_4_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+main_out main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl
index 3a92aaa..5dbfcc1 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_Input_SameSignedness.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_4_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_4_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_1_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_1_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_4_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_1_param [[instance_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_1_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_4_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_4_1=tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_1_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl
index 1956d46..ae94ff8 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.hlsl
@@ -8,9 +8,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl
index 17039f4..d8d0a49 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Signed.spvasm.expected.msl
@@ -9,10 +9,14 @@
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_1) {
+  (*(tint_symbol_1)).arr[0] = as_type<int>(x_1_param);
+  main_1();
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_2 = {};
-  tint_symbol_2.arr[0] = as_type<int>(x_1_param);
-  main_1();
+  tint_symbol_inner(x_1_param, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl
index ae1dd89..e137b4d 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.hlsl
@@ -8,9 +8,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl
index 03c6bea..a1503ea 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_In_Unsigned.spvasm.expected.msl
@@ -9,10 +9,14 @@
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_1) {
+  (*(tint_symbol_1)).arr[0] = x_1_param;
+  main_1();
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_2 = {};
-  tint_symbol_2.arr[0] = x_1_param;
-  main_1();
+  tint_symbol_inner(x_1_param, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl
index 19fa549..2414617 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {asuint(x_1[0])};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl
index 2073b56..b7398c5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Signed_Initializer.spvasm.expected.msl
@@ -15,11 +15,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>((*(tint_symbol_3)).arr[0])};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_4 = {.arr={0}};
-  main_1();
-  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>(tint_symbol_4.arr[0])};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl
index db4a8bc..979b63d 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0]};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl
index a09d091..0b92cd3 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_BuiltinVar_SampleMask_Out_Unsigned_Initializer.spvasm.expected.msl
@@ -15,11 +15,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).arr[0]};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_4 = {.arr={0u}};
-  main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.arr[0]};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl
index 8aa1229..b5d52c8 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.hlsl
@@ -17,15 +17,15 @@
   nointerpolation float x_2_param_1 : TEXCOORD6;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const float x_1_param = tint_symbol.x_1_param;
-  const float x_1_param_1 = tint_symbol.x_1_param_1;
-  const float x_2_param = tint_symbol.x_2_param;
-  const float x_2_param_1 = tint_symbol.x_2_param_1;
+void main_inner(float x_1_param, float x_1_param_1, float x_2_param, float x_2_param_1) {
   x_1[0] = x_1_param;
   x_1[1] = x_1_param_1;
   x_2.field0 = x_2_param;
   x_2.field1 = x_2_param_1;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_2_param, tint_symbol.x_2_param_1);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl
index ce7d66d..8c80813 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Flat_Fragment_In.spvasm.expected.msl
@@ -19,18 +19,18 @@
   return;
 }
 
-fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread tint_array_wrapper tint_symbol_3 = {};
-  thread S tint_symbol_4 = {};
-  float const x_1_param = tint_symbol_1.x_1_param;
-  float const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  float const x_2_param = tint_symbol_1.x_2_param;
-  float const x_2_param_1 = tint_symbol_1.x_2_param_1;
-  tint_symbol_3.arr[0] = x_1_param;
-  tint_symbol_3.arr[1] = x_1_param_1;
-  tint_symbol_4.field0 = x_2_param;
-  tint_symbol_4.field1 = x_2_param_1;
+void tint_symbol_inner(float x_1_param, float x_1_param_1, float x_2_param, float x_2_param_1, thread tint_array_wrapper* const tint_symbol_3, thread S* const tint_symbol_4) {
+  (*(tint_symbol_3)).arr[0] = x_1_param;
+  (*(tint_symbol_3)).arr[1] = x_1_param_1;
+  (*(tint_symbol_4)).field0 = x_2_param;
+  (*(tint_symbol_4)).field1 = x_2_param_1;
   main_1();
+}
+
+fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread tint_array_wrapper tint_symbol_5 = {};
+  thread S tint_symbol_6 = {};
+  tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_2_param, tint_symbol_1.x_2_param_1, &(tint_symbol_5), &(tint_symbol_6));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl
index acb71cc..a857a8b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl
@@ -22,13 +22,7 @@
   noperspective sample float x_1_param_5 : TEXCOORD6;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const float x_1_param = tint_symbol.x_1_param;
-  const float x_1_param_1 = tint_symbol.x_1_param_1;
-  const float x_1_param_2 = tint_symbol.x_1_param_2;
-  const float x_1_param_3 = tint_symbol.x_1_param_3;
-  const float x_1_param_4 = tint_symbol.x_1_param_4;
-  const float x_1_param_5 = tint_symbol.x_1_param_5;
+void main_inner(float x_1_param, float x_1_param_1, float x_1_param_2, float x_1_param_3, float x_1_param_4, float x_1_param_5) {
   x_1.field0 = x_1_param;
   x_1.field1 = x_1_param_1;
   x_1.field2 = x_1_param_2;
@@ -36,5 +30,9 @@
   x_1.field4 = x_1_param_4;
   x_1.field5 = x_1_param_5;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_1_param_2, tint_symbol.x_1_param_3, tint_symbol.x_1_param_4, tint_symbol.x_1_param_5);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl
index be0799e..092ee02 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_In.spvasm.expected.msl
@@ -22,21 +22,19 @@
   return;
 }
 
-fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread S tint_symbol_3 = {};
-  float const x_1_param = tint_symbol_1.x_1_param;
-  float const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  float const x_1_param_2 = tint_symbol_1.x_1_param_2;
-  float const x_1_param_3 = tint_symbol_1.x_1_param_3;
-  float const x_1_param_4 = tint_symbol_1.x_1_param_4;
-  float const x_1_param_5 = tint_symbol_1.x_1_param_5;
-  tint_symbol_3.field0 = x_1_param;
-  tint_symbol_3.field1 = x_1_param_1;
-  tint_symbol_3.field2 = x_1_param_2;
-  tint_symbol_3.field3 = x_1_param_3;
-  tint_symbol_3.field4 = x_1_param_4;
-  tint_symbol_3.field5 = x_1_param_5;
+void tint_symbol_inner(float x_1_param, float x_1_param_1, float x_1_param_2, float x_1_param_3, float x_1_param_4, float x_1_param_5, thread S* const tint_symbol_3) {
+  (*(tint_symbol_3)).field0 = x_1_param;
+  (*(tint_symbol_3)).field1 = x_1_param_1;
+  (*(tint_symbol_3)).field2 = x_1_param_2;
+  (*(tint_symbol_3)).field3 = x_1_param_3;
+  (*(tint_symbol_3)).field4 = x_1_param_4;
+  (*(tint_symbol_3)).field5 = x_1_param_5;
   main_1();
+}
+
+fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread S tint_symbol_4 = {};
+  tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_1_param_2, tint_symbol_1.x_1_param_3, tint_symbol_1.x_1_param_4, tint_symbol_1.x_1_param_5, &(tint_symbol_4));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl
index dfc897a..7fe3df7 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl
@@ -30,9 +30,20 @@
   noperspective sample float x_1_6 : SV_Target6;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1.field0, x_1.field1, x_1.field2, x_1.field3, x_1.field4, x_1.field5};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_1_3, tint_symbol_1.x_1_4, tint_symbol_1.x_1_5, tint_symbol_1.x_1_6};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_1_3 = inner_result.x_1_3;
+  wrapper_result.x_1_4 = inner_result.x_1_4;
+  wrapper_result.x_1_5 = inner_result.x_1_5;
+  wrapper_result.x_1_6 = inner_result.x_1_6;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl
index 6f664e8..907819c 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Flatten_Interpolation_Floating_Fragment_Out.spvasm.expected.msl
@@ -30,11 +30,22 @@
   return;
 }
 
+main_out tint_symbol_inner(thread S* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).field0, .x_1_2=(*(tint_symbol_3)).field1, .x_1_3=(*(tint_symbol_3)).field2, .x_1_4=(*(tint_symbol_3)).field3, .x_1_5=(*(tint_symbol_3)).field4, .x_1_6=(*(tint_symbol_3)).field5};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread S tint_symbol_4 = {};
-  main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.field0, .x_1_2=tint_symbol_4.field1, .x_1_3=tint_symbol_4.field2, .x_1_4=tint_symbol_4.field3, .x_1_5=tint_symbol_4.field4, .x_1_6=tint_symbol_4.field5};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_1_3=tint_symbol_2.x_1_3, .x_1_4=tint_symbol_2.x_1_4, .x_1_5=tint_symbol_2.x_1_5, .x_1_6=tint_symbol_2.x_1_6};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_1_3 = inner_result.x_1_3;
+  wrapper_result.x_1_4 = inner_result.x_1_4;
+  wrapper_result.x_1_5 = inner_result.x_1_5;
+  wrapper_result.x_1_6 = inner_result.x_1_6;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl
index d2eadc7..44e09c5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_IOLocations.spvasm.expected.hlsl
@@ -20,13 +20,18 @@
   uint x_4_1 : SV_Target6;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
-  const uint x_3_param = tint_symbol.x_3_param;
+main_out main_inner(uint x_1_param, uint x_3_param) {
   x_1 = x_1_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_2, x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1, tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl
index 663d6d0..0a3ff65 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.hlsl
@@ -25,13 +25,7 @@
   float4 x_8_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
-  const uint2 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
-  const int2 x_4_param = tint_symbol.x_4_param;
-  const float x_5_param = tint_symbol.x_5_param;
-  const float2 x_6_param = tint_symbol.x_6_param;
+main_out main_inner(uint x_1_param, uint2 x_2_param, int x_3_param, int2 x_4_param, float x_5_param, float2 x_6_param) {
   x_1 = x_1_param;
   x_2 = x_2_param;
   x_3 = x_3_param;
@@ -40,6 +34,12 @@
   x_6 = x_6_param;
   main_1();
   const main_out tint_symbol_3 = {x_8};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_8_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_2_param, tint_symbol.x_3_param, tint_symbol.x_4_param, tint_symbol.x_5_param, tint_symbol.x_6_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_8_1 = inner_result.x_8_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl
index 8ddfb07..50e9d5f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_In.spvasm.expected.msl
@@ -20,29 +20,29 @@
   return;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread uint tint_symbol_6 = 0u;
-  thread uint2 tint_symbol_7 = 0u;
-  thread int tint_symbol_8 = 0;
-  thread int2 tint_symbol_9 = 0;
-  thread float tint_symbol_10 = 0.0f;
-  thread float2 tint_symbol_11 = 0.0f;
-  thread float4 tint_symbol_12 = 0.0f;
-  uint const x_1_param = tint_symbol_1.x_1_param;
-  uint2 const x_2_param = tint_symbol_1.x_2_param;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  int2 const x_4_param = tint_symbol_1.x_4_param;
-  float const x_5_param = tint_symbol_1.x_5_param;
-  float2 const x_6_param = tint_symbol_1.x_6_param;
-  tint_symbol_6 = x_1_param;
-  tint_symbol_7 = x_2_param;
-  tint_symbol_8 = x_3_param;
-  tint_symbol_9 = x_4_param;
-  tint_symbol_10 = x_5_param;
-  tint_symbol_11 = x_6_param;
+main_out tint_symbol_inner(uint x_1_param, uint2 x_2_param, int x_3_param, int2 x_4_param, float x_5_param, float2 x_6_param, thread uint* const tint_symbol_5, thread uint2* const tint_symbol_6, thread int* const tint_symbol_7, thread int2* const tint_symbol_8, thread float* const tint_symbol_9, thread float2* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_5) = x_1_param;
+  *(tint_symbol_6) = x_2_param;
+  *(tint_symbol_7) = x_3_param;
+  *(tint_symbol_8) = x_4_param;
+  *(tint_symbol_9) = x_5_param;
+  *(tint_symbol_10) = x_6_param;
   main_1();
-  main_out const tint_symbol_4 = {.x_8_1=tint_symbol_12};
-  tint_symbol_3 const tint_symbol_5 = {.x_8_1=tint_symbol_4.x_8_1};
-  return tint_symbol_5;
+  main_out const tint_symbol_4 = {.x_8_1=*(tint_symbol_11)};
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread uint tint_symbol_12 = 0u;
+  thread uint2 tint_symbol_13 = 0u;
+  thread int tint_symbol_14 = 0;
+  thread int2 tint_symbol_15 = 0;
+  thread float tint_symbol_16 = 0.0f;
+  thread float2 tint_symbol_17 = 0.0f;
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, tint_symbol_1.x_4_param, tint_symbol_1.x_5_param, tint_symbol_1.x_6_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_8_1 = inner_result.x_8_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl
index 453432d..7f7e005 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.hlsl
@@ -29,9 +29,21 @@
   float4 x_8_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1, x_2, x_3, x_4, x_5, x_6, x_8};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_2_1, tint_symbol_1.x_3_1, tint_symbol_1.x_4_1, tint_symbol_1.x_5_1, tint_symbol_1.x_6_1, tint_symbol_1.x_8_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.x_5_1 = inner_result.x_5_1;
+  wrapper_result.x_6_1 = inner_result.x_6_1;
+  wrapper_result.x_8_1 = inner_result.x_8_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl
index 05b18ed..f0325d4 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Flat_Vertex_Output.spvasm.expected.msl
@@ -24,17 +24,29 @@
   return;
 }
 
-vertex tint_symbol_1 tint_symbol() {
-  thread uint tint_symbol_4 = 0u;
-  thread uint2 tint_symbol_5 = 0u;
-  thread int tint_symbol_6 = 0;
-  thread int2 tint_symbol_7 = 0;
-  thread float tint_symbol_8 = 0.0f;
-  thread float2 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
+main_out tint_symbol_inner(thread uint* const tint_symbol_3, thread uint2* const tint_symbol_4, thread int* const tint_symbol_5, thread int2* const tint_symbol_6, thread float* const tint_symbol_7, thread float2* const tint_symbol_8, thread float4* const tint_symbol_9) {
   main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4, .x_2_1=tint_symbol_5, .x_3_1=tint_symbol_6, .x_4_1=tint_symbol_7, .x_5_1=tint_symbol_8, .x_6_1=tint_symbol_9, .x_8_1=tint_symbol_10};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_2_1=tint_symbol_2.x_2_1, .x_3_1=tint_symbol_2.x_3_1, .x_4_1=tint_symbol_2.x_4_1, .x_5_1=tint_symbol_2.x_5_1, .x_6_1=tint_symbol_2.x_6_1, .x_8_1=tint_symbol_2.x_8_1};
-  return tint_symbol_3;
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_3), .x_2_1=*(tint_symbol_4), .x_3_1=*(tint_symbol_5), .x_4_1=*(tint_symbol_6), .x_5_1=*(tint_symbol_7), .x_6_1=*(tint_symbol_8), .x_8_1=*(tint_symbol_9)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  thread uint tint_symbol_10 = 0u;
+  thread uint2 tint_symbol_11 = 0u;
+  thread int tint_symbol_12 = 0;
+  thread int2 tint_symbol_13 = 0;
+  thread float tint_symbol_14 = 0.0f;
+  thread float2 tint_symbol_15 = 0.0f;
+  thread float4 tint_symbol_16 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.x_5_1 = inner_result.x_5_1;
+  wrapper_result.x_6_1 = inner_result.x_6_1;
+  wrapper_result.x_8_1 = inner_result.x_8_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl
index 0c3175a..03c9fd5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.hlsl
@@ -18,13 +18,7 @@
   noperspective sample float x_6_param : TEXCOORD6;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const float x_1_param = tint_symbol.x_1_param;
-  const float x_2_param = tint_symbol.x_2_param;
-  const float x_3_param = tint_symbol.x_3_param;
-  const float x_4_param = tint_symbol.x_4_param;
-  const float x_5_param = tint_symbol.x_5_param;
-  const float x_6_param = tint_symbol.x_6_param;
+void main_inner(float x_1_param, float x_2_param, float x_3_param, float x_4_param, float x_5_param, float x_6_param) {
   x_1 = x_1_param;
   x_2 = x_2_param;
   x_3 = x_3_param;
@@ -32,5 +26,9 @@
   x_5 = x_5_param;
   x_6 = x_6_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param, tint_symbol.x_2_param, tint_symbol.x_3_param, tint_symbol.x_4_param, tint_symbol.x_5_param, tint_symbol.x_6_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl
index 783515b..fcb0848 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_In.spvasm.expected.msl
@@ -14,26 +14,24 @@
   return;
 }
 
-fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float tint_symbol_3 = 0.0f;
-  thread float tint_symbol_4 = 0.0f;
-  thread float tint_symbol_5 = 0.0f;
-  thread float tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  thread float tint_symbol_8 = 0.0f;
-  float const x_1_param = tint_symbol_1.x_1_param;
-  float const x_2_param = tint_symbol_1.x_2_param;
-  float const x_3_param = tint_symbol_1.x_3_param;
-  float const x_4_param = tint_symbol_1.x_4_param;
-  float const x_5_param = tint_symbol_1.x_5_param;
-  float const x_6_param = tint_symbol_1.x_6_param;
-  tint_symbol_3 = x_1_param;
-  tint_symbol_4 = x_2_param;
-  tint_symbol_5 = x_3_param;
-  tint_symbol_6 = x_4_param;
-  tint_symbol_7 = x_5_param;
-  tint_symbol_8 = x_6_param;
+void tint_symbol_inner(float x_1_param, float x_2_param, float x_3_param, float x_4_param, float x_5_param, float x_6_param, thread float* const tint_symbol_3, thread float* const tint_symbol_4, thread float* const tint_symbol_5, thread float* const tint_symbol_6, thread float* const tint_symbol_7, thread float* const tint_symbol_8) {
+  *(tint_symbol_3) = x_1_param;
+  *(tint_symbol_4) = x_2_param;
+  *(tint_symbol_5) = x_3_param;
+  *(tint_symbol_6) = x_4_param;
+  *(tint_symbol_7) = x_5_param;
+  *(tint_symbol_8) = x_6_param;
   main_1();
+}
+
+fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread float tint_symbol_9 = 0.0f;
+  thread float tint_symbol_10 = 0.0f;
+  thread float tint_symbol_11 = 0.0f;
+  thread float tint_symbol_12 = 0.0f;
+  thread float tint_symbol_13 = 0.0f;
+  thread float tint_symbol_14 = 0.0f;
+  tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, tint_symbol_1.x_4_param, tint_symbol_1.x_5_param, tint_symbol_1.x_6_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl
index 2832006..3f44590 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.hlsl
@@ -26,9 +26,20 @@
   noperspective sample float x_6_1 : SV_Target6;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1, x_2, x_3, x_4, x_5, x_6};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_2_1, tint_symbol_1.x_3_1, tint_symbol_1.x_4_1, tint_symbol_1.x_5_1, tint_symbol_1.x_6_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.x_5_1 = inner_result.x_5_1;
+  wrapper_result.x_6_1 = inner_result.x_6_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl
index f4302dc..8a29123 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_EntryPointWrapping_Interpolation_Floating_Fragment_Out.spvasm.expected.msl
@@ -22,16 +22,27 @@
   return;
 }
 
-fragment tint_symbol_1 tint_symbol() {
-  thread float tint_symbol_4 = 0.0f;
-  thread float tint_symbol_5 = 0.0f;
-  thread float tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  thread float tint_symbol_8 = 0.0f;
-  thread float tint_symbol_9 = 0.0f;
+main_out tint_symbol_inner(thread float* const tint_symbol_3, thread float* const tint_symbol_4, thread float* const tint_symbol_5, thread float* const tint_symbol_6, thread float* const tint_symbol_7, thread float* const tint_symbol_8) {
   main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4, .x_2_1=tint_symbol_5, .x_3_1=tint_symbol_6, .x_4_1=tint_symbol_7, .x_5_1=tint_symbol_8, .x_6_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_2_1=tint_symbol_2.x_2_1, .x_3_1=tint_symbol_2.x_3_1, .x_4_1=tint_symbol_2.x_4_1, .x_5_1=tint_symbol_2.x_5_1, .x_6_1=tint_symbol_2.x_6_1};
-  return tint_symbol_3;
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_3), .x_2_1=*(tint_symbol_4), .x_3_1=*(tint_symbol_5), .x_4_1=*(tint_symbol_6), .x_5_1=*(tint_symbol_7), .x_6_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol() {
+  thread float tint_symbol_9 = 0.0f;
+  thread float tint_symbol_10 = 0.0f;
+  thread float tint_symbol_11 = 0.0f;
+  thread float tint_symbol_12 = 0.0f;
+  thread float tint_symbol_13 = 0.0f;
+  thread float tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.x_5_1 = inner_result.x_5_1;
+  wrapper_result.x_6_1 = inner_result.x_6_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl
index 0903e46..407c8bd 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.hlsl
@@ -26,13 +26,19 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float x_1_param = tint_symbol.x_1_param;
-  const float4 x_1_param_1 = tint_symbol.x_1_param_1;
+main_out main_inner(float x_1_param, float4 x_1_param_1) {
   x_1.alice = x_1_param;
   x_1.bob = x_1_param_1;
   main_1();
   const main_out tint_symbol_3 = {x_2, x_3.alice, x_3.bob};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_3_1, tint_symbol_3.x_3_2, tint_symbol_3.x_2_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  wrapper_result.x_3_2 = inner_result.x_3_2;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl
index bbe3dc4..6bfb232 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_FlattenStruct_LocOnMembers.spvasm.expected.msl
@@ -24,17 +24,23 @@
   return;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread Communicators tint_symbol_6 = {};
-  thread float4 tint_symbol_7 = 0.0f;
-  thread Communicators tint_symbol_8 = {};
-  float const x_1_param = tint_symbol_1.x_1_param;
-  float4 const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  tint_symbol_6.alice = x_1_param;
-  tint_symbol_6.bob = x_1_param_1;
+main_out tint_symbol_inner(float x_1_param, float4 x_1_param_1, thread Communicators* const tint_symbol_5, thread float4* const tint_symbol_6, thread Communicators* const tint_symbol_7) {
+  (*(tint_symbol_5)).alice = x_1_param;
+  (*(tint_symbol_5)).bob = x_1_param_1;
   main_1();
-  main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7, .x_3_1=tint_symbol_8.alice, .x_3_2=tint_symbol_8.bob};
-  tint_symbol_3 const tint_symbol_5 = {.x_3_1=tint_symbol_4.x_3_1, .x_3_2=tint_symbol_4.x_3_2, .x_2_1=tint_symbol_4.x_2_1};
-  return tint_symbol_5;
+  main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6), .x_3_1=(*(tint_symbol_7)).alice, .x_3_2=(*(tint_symbol_7)).bob};
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread Communicators tint_symbol_8 = {};
+  thread float4 tint_symbol_9 = 0.0f;
+  thread Communicators tint_symbol_10 = {};
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, &(tint_symbol_8), &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  wrapper_result.x_3_2 = inner_result.x_3_2;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl
index 0d79f1a..9ae2da5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.hlsl
@@ -17,15 +17,18 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float x_1_param = tint_symbol.x_1_param;
-  const float x_1_param_1 = tint_symbol.x_1_param_1;
-  const float x_1_param_2 = tint_symbol.x_1_param_2;
+main_out main_inner(float x_1_param, float x_1_param_1, float x_1_param_2) {
   x_1[0] = x_1_param;
   x_1[1] = x_1_param_1;
   x_1[2] = x_1_param_2;
   main_1();
   const main_out tint_symbol_3 = {x_2};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_1_param_2);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl
index 8afc07a..6a3cce0 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenArray_OneLevel.spvasm.expected.msl
@@ -20,18 +20,21 @@
   return;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread tint_array_wrapper tint_symbol_6 = {};
-  thread float4 tint_symbol_7 = 0.0f;
-  float const x_1_param = tint_symbol_1.x_1_param;
-  float const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  float const x_1_param_2 = tint_symbol_1.x_1_param_2;
-  tint_symbol_6.arr[0] = x_1_param;
-  tint_symbol_6.arr[1] = x_1_param_1;
-  tint_symbol_6.arr[2] = x_1_param_2;
+main_out tint_symbol_inner(float x_1_param, float x_1_param_1, float x_1_param_2, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  (*(tint_symbol_5)).arr[0] = x_1_param;
+  (*(tint_symbol_5)).arr[1] = x_1_param_1;
+  (*(tint_symbol_5)).arr[2] = x_1_param_2;
   main_1();
-  main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7};
-  tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1};
-  return tint_symbol_5;
+  main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread tint_array_wrapper tint_symbol_7 = {};
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_1_param_2, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl
index 3165ed2..4c25874 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.hlsl
@@ -16,13 +16,17 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_1_param = tint_symbol.x_1_param;
-  const float4 x_1_param_1 = tint_symbol.x_1_param_1;
+main_out main_inner(float4 x_1_param, float4 x_1_param_1) {
   x_1[0] = x_1_param;
   x_1[1] = x_1_param_1;
   main_1();
   const main_out tint_symbol_3 = {x_2};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl
index b65de15..3dee922 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenMatrix.spvasm.expected.msl
@@ -16,16 +16,20 @@
   return;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float2x4 tint_symbol_6 = float2x4(0.0f);
-  thread float4 tint_symbol_7 = 0.0f;
-  float4 const x_1_param = tint_symbol_1.x_1_param;
-  float4 const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  tint_symbol_6[0] = x_1_param;
-  tint_symbol_6[1] = x_1_param_1;
+main_out tint_symbol_inner(float4 x_1_param, float4 x_1_param_1, thread float2x4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  (*(tint_symbol_5))[0] = x_1_param;
+  (*(tint_symbol_5))[1] = x_1_param_1;
   main_1();
-  main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7};
-  tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1};
-  return tint_symbol_5;
+  main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread float2x4 tint_symbol_7 = float2x4(0.0f);
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl
index 14b0548..ad1ad2b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.hlsl
@@ -18,17 +18,19 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_1_param = tint_symbol.x_1_param;
-  const float4 x_1_param_1 = tint_symbol.x_1_param_1;
-  const float4 x_1_param_2 = tint_symbol.x_1_param_2;
-  const float4 x_1_param_3 = tint_symbol.x_1_param_3;
+main_out main_inner(float4 x_1_param, float4 x_1_param_1, float4 x_1_param_2, float4 x_1_param_3) {
   x_1[0][0] = x_1_param;
   x_1[0][1] = x_1_param_1;
   x_1[1][0] = x_1_param_2;
   x_1[1][1] = x_1_param_3;
   main_1();
   const main_out tint_symbol_3 = {x_2};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1, tint_symbol.x_1_param_2, tint_symbol.x_1_param_3);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl
index 059776b..21e8520 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenNested.spvasm.expected.msl
@@ -21,20 +21,22 @@
   return;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread tint_array_wrapper tint_symbol_6 = {};
-  thread float4 tint_symbol_7 = 0.0f;
-  float4 const x_1_param = tint_symbol_1.x_1_param;
-  float4 const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  float4 const x_1_param_2 = tint_symbol_1.x_1_param_2;
-  float4 const x_1_param_3 = tint_symbol_1.x_1_param_3;
-  tint_symbol_6.arr[0][0] = x_1_param;
-  tint_symbol_6.arr[0][1] = x_1_param_1;
-  tint_symbol_6.arr[1][0] = x_1_param_2;
-  tint_symbol_6.arr[1][1] = x_1_param_3;
+main_out tint_symbol_inner(float4 x_1_param, float4 x_1_param_1, float4 x_1_param_2, float4 x_1_param_3, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  (*(tint_symbol_5)).arr[0][0] = x_1_param;
+  (*(tint_symbol_5)).arr[0][1] = x_1_param_1;
+  (*(tint_symbol_5)).arr[1][0] = x_1_param_2;
+  (*(tint_symbol_5)).arr[1][1] = x_1_param_3;
   main_1();
-  main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7};
-  tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1};
-  return tint_symbol_5;
+  main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread tint_array_wrapper tint_symbol_7 = {};
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, tint_symbol_1.x_1_param_2, tint_symbol_1.x_1_param_3, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl
index f8df6da..0cf6df9 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.hlsl
@@ -21,13 +21,17 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float x_1_param = tint_symbol.x_1_param;
-  const float4 x_1_param_1 = tint_symbol.x_1_param_1;
+main_out main_inner(float x_1_param, float4 x_1_param_1) {
   x_1.alice = x_1_param;
   x_1.bob = x_1_param_1;
   main_1();
   const main_out tint_symbol_3 = {x_2};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_2_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_1_param, tint_symbol.x_1_param_1);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl
index d95c9b2..79a8f95 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Input_FlattenStruct_LocOnVariable.spvasm.expected.msl
@@ -20,16 +20,20 @@
   return;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread Communicators tint_symbol_6 = {};
-  thread float4 tint_symbol_7 = 0.0f;
-  float const x_1_param = tint_symbol_1.x_1_param;
-  float4 const x_1_param_1 = tint_symbol_1.x_1_param_1;
-  tint_symbol_6.alice = x_1_param;
-  tint_symbol_6.bob = x_1_param_1;
+main_out tint_symbol_inner(float x_1_param, float4 x_1_param_1, thread Communicators* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  (*(tint_symbol_5)).alice = x_1_param;
+  (*(tint_symbol_5)).bob = x_1_param_1;
   main_1();
-  main_out const tint_symbol_4 = {.x_2_1=tint_symbol_7};
-  tint_symbol_3 const tint_symbol_5 = {.x_2_1=tint_symbol_4.x_2_1};
-  return tint_symbol_5;
+  main_out const tint_symbol_4 = {.x_2_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread Communicators tint_symbol_7 = {};
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_1_param_1, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl
index b7ca2fa..38a928f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl
index 523de10..2266a63 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_AccessChain.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl
index b7ca2fa..38a928f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl
index 523de10..2266a63 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_CopyObject.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl
index b7ca2fa..38a928f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl
index 523de10..2266a63 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_I32_Load_Direct.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl
index 5f44758..c41df17 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = x_4_param;
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl
index ec253ec..5391d30 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_AccessChain.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_4_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_4_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl
index 5f44758..c41df17 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = x_4_param;
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl
index ec253ec..5391d30 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_CopyObject.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_4_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_4_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl
index 5f44758..c41df17 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 position_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = x_4_param;
   main_1();
   const main_out tint_symbol_3 = {position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.position_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl
index ec253ec..5391d30 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_InstanceIndex_U32_Load_Direct.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 position_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 position_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[instance_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_4_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.position_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[instance_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_4_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.position_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.position_1=tint_symbol_3.position_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.position_1 = inner_result.position_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl
index 0d3cc17..d5ba352 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.hlsl
@@ -18,9 +18,18 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0], x_1[1], x_1[2], x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_1_3, tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_1_3 = inner_result.x_1_3;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl
index c00c75e..a11ecf4 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenArray_OneLevel.spvasm.expected.msl
@@ -21,12 +21,21 @@
   return;
 }
 
-vertex tint_symbol_1 tint_symbol() {
-  thread tint_array_wrapper tint_symbol_4 = {};
-  thread float4 tint_symbol_5 = 0.0f;
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_3, thread float4* const tint_symbol_4) {
   main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.arr[0], .x_1_2=tint_symbol_4.arr[1], .x_1_3=tint_symbol_4.arr[2], .x_2_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_1_3=tint_symbol_2.x_1_3, .x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).arr[0], .x_1_2=(*(tint_symbol_3)).arr[1], .x_1_3=(*(tint_symbol_3)).arr[2], .x_2_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  thread tint_array_wrapper tint_symbol_5 = {};
+  thread float4 tint_symbol_6 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5), &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_1_3 = inner_result.x_1_3;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl
index 41ab4a7..705ecff 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.hlsl
@@ -16,9 +16,17 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0], x_1[1], x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl
index 794f327..43846a3 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenMatrix.spvasm.expected.msl
@@ -16,12 +16,20 @@
   return;
 }
 
-vertex tint_symbol_1 tint_symbol() {
-  thread float2x4 tint_symbol_4 = float2x4(0.0f);
-  thread float4 tint_symbol_5 = 0.0f;
+main_out tint_symbol_inner(thread float2x4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4[0], .x_1_2=tint_symbol_4[1], .x_2_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3))[0], .x_1_2=(*(tint_symbol_3))[1], .x_2_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  thread float2x4 tint_symbol_5 = float2x4(0.0f);
+  thread float4 tint_symbol_6 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5), &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl
index 2efd4a3..28260d3 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.hlsl
@@ -21,9 +21,17 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1.alice, x_1.bob, x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1, tint_symbol_1.x_1_2, tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl
index 3ecb5da..b1202b4 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_Output_FlattenStruct_LocOnVariable.spvasm.expected.msl
@@ -20,12 +20,20 @@
   return;
 }
 
-vertex tint_symbol_1 tint_symbol() {
-  thread Communicators tint_symbol_4 = {};
-  thread float4 tint_symbol_5 = 0.0f;
+main_out tint_symbol_inner(thread Communicators* const tint_symbol_3, thread float4* const tint_symbol_4) {
   main_1();
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_4.alice, .x_1_2=tint_symbol_4.bob, .x_2_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1, .x_1_2=tint_symbol_2.x_1_2, .x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_3)).alice, .x_1_2=(*(tint_symbol_3)).bob, .x_2_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol() {
+  thread Communicators tint_symbol_5 = {};
+  thread float4 tint_symbol_6 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5), &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  wrapper_result.x_1_2 = inner_result.x_1_2;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl
index 702cebb..c61318d 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_SampleIndex;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl
index 5abadcb..0ea0fc4 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_AccessChain.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int* const tint_symbol_2) {
-  int const x_2 = *(tint_symbol_2);
+void main_1(thread int* const tint_symbol_1) {
+  int const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_id]]) {
   thread int tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl
index 702cebb..c61318d 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_SampleIndex;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl
index 5abadcb..0ea0fc4 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_CopyObject.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int* const tint_symbol_2) {
-  int const x_2 = *(tint_symbol_2);
+void main_1(thread int* const tint_symbol_1) {
+  int const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_id]]) {
   thread int tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl
index 702cebb..c61318d 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_SampleIndex;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl
index 5abadcb..0ea0fc4 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_I32_Load_Direct.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread int* const tint_symbol_2) {
-  int const x_2 = *(tint_symbol_2);
+void main_1(thread int* const tint_symbol_1) {
+  int const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread int* const tint_symbol_2) {
+  *(tint_symbol_2) = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_id]]) {
   thread int tint_symbol_3 = 0;
-  tint_symbol_3 = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl
index a7810ba..6daf7ac 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_SampleIndex;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl
index 68116a9..0f1f6d8 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_AccessChain.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint* const tint_symbol_2) {
-  uint const x_2 = *(tint_symbol_2);
+void main_1(thread uint* const tint_symbol_1) {
+  uint const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_id]]) {
   thread uint tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl
index a7810ba..6daf7ac 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_SampleIndex;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl
index 68116a9..0f1f6d8 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_CopyObject.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint* const tint_symbol_2) {
-  uint const x_2 = *(tint_symbol_2);
+void main_1(thread uint* const tint_symbol_1) {
+  uint const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_id]]) {
   thread uint tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl
index a7810ba..6daf7ac 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_SampleIndex;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1 = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl
index 68116a9..0f1f6d8 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleId_U32_Load_Direct.spvasm.expected.msl
@@ -1,15 +1,19 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void main_1(thread uint* const tint_symbol_2) {
-  uint const x_2 = *(tint_symbol_2);
+void main_1(thread uint* const tint_symbol_1) {
+  uint const x_2 = *(tint_symbol_1);
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread uint* const tint_symbol_2) {
+  *(tint_symbol_2) = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_id]]) {
   thread uint tint_symbol_3 = 0u;
-  tint_symbol_3 = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl
index 69c22b5..41e13ad 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl
index b408ffe..8bb32ce 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_AccessChain.spvasm.expected.msl
@@ -5,15 +5,19 @@
   int arr[1];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  int const x_4 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  int const x_4 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl
index 69c22b5..41e13ad 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl
index b408ffe..8bb32ce 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_CopyObject.spvasm.expected.msl
@@ -5,15 +5,19 @@
   int arr[1];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  int const x_4 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  int const x_4 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl
index 8d551f5..719e31e 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = asint(x_1_param);
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl
index 5ec09f0..5282e0e 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_I32_Direct.spvasm.expected.msl
@@ -5,15 +5,19 @@
   int arr[1];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  int const x_3 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  int const x_3 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = as_type<int>(x_1_param);
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = as_type<int>(x_1_param);
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl
index 1371312..b628f8f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl
index aebd0dd..a309057 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_AccessChain.spvasm.expected.msl
@@ -5,15 +5,19 @@
   uint arr[1];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  uint const x_4 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  uint const x_4 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl
index 1371312..b628f8f 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl
index aebd0dd..a309057 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_CopyObject.spvasm.expected.msl
@@ -5,15 +5,19 @@
   uint arr[1];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  uint const x_4 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  uint const x_4 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl
index 4654682..431e66b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl
index 210b39c..87b5d88 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_U32_Direct.spvasm.expected.msl
@@ -5,15 +5,19 @@
   uint arr[1];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  uint const x_3 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  uint const x_3 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl
index 4654682..431e66b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.hlsl
@@ -9,9 +9,12 @@
   uint x_1_param : SV_Coverage;
 };
 
-void main(tint_symbol_1 tint_symbol) {
-  const uint x_1_param = tint_symbol.x_1_param;
+void main_inner(uint x_1_param) {
   x_1[0] = x_1_param;
   main_1();
+}
+
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_1_param);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl
index 1c10d95..89663fb 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_In_WithStride.spvasm.expected.msl
@@ -14,15 +14,19 @@
   int arr[2];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_2) {
-  uint const x_3 = (*(tint_symbol_2)).arr[0];
+void main_1(thread tint_array_wrapper* const tint_symbol_1) {
+  uint const x_3 = (*(tint_symbol_1)).arr[0];
   return;
 }
 
+void tint_symbol_inner(uint x_1_param, thread tint_array_wrapper* const tint_symbol_2) {
+  (*(tint_symbol_2)).arr[0] = x_1_param;
+  main_1(tint_symbol_2);
+}
+
 fragment void tint_symbol(uint x_1_param [[sample_mask]]) {
   thread tint_array_wrapper tint_symbol_3 = {};
-  tint_symbol_3.arr[0] = x_1_param;
-  main_1(&(tint_symbol_3));
+  tint_symbol_inner(x_1_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl
index 65e2701..57501e5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {asuint(x_1[0])};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl
index ba3a014..ee1d80b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_AccessChain.spvasm.expected.msl
@@ -11,16 +11,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 12;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 12;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>((*(tint_symbol_4)).arr[0])};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>(tint_symbol_5.arr[0])};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl
index 65e2701..57501e5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {asuint(x_1[0])};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl
index ba3a014..ee1d80b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_CopyObject.spvasm.expected.msl
@@ -11,16 +11,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 12;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 12;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>((*(tint_symbol_4)).arr[0])};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>(tint_symbol_5.arr[0])};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl
index 65e2701..57501e5 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {asuint(x_1[0])};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl
index ba3a014..ee1d80b 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_I32_Direct.spvasm.expected.msl
@@ -11,16 +11,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 12;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 12;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>((*(tint_symbol_4)).arr[0])};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=as_type<uint>(tint_symbol_5.arr[0])};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl
index a6c36ef..48138a6 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0]};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl
index 2c55170..e59f4bf 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_AccessChain.spvasm.expected.msl
@@ -11,16 +11,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 0u;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 0u;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl
index a6c36ef..48138a6 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0]};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl
index 2c55170..e59f4bf 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_CopyObject.spvasm.expected.msl
@@ -11,16 +11,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 0u;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 0u;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl
index a6c36ef..48138a6 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0]};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl
index 2c55170..e59f4bf 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_U32_Direct.spvasm.expected.msl
@@ -11,16 +11,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 0u;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 0u;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl
index a6c36ef..48138a6 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   uint x_1_1 : SV_Coverage;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_1[0]};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_1_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl
index 5a94fee..0779246 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_SampleMask_Out_WithStride.spvasm.expected.msl
@@ -20,16 +20,22 @@
   uint x_1_1 [[sample_mask]];
 };
 
-void main_1(thread tint_array_wrapper* const tint_symbol_4) {
-  (*(tint_symbol_4)).arr[0] = 0u;
+void main_1(thread tint_array_wrapper* const tint_symbol_3) {
+  (*(tint_symbol_3)).arr[0] = 0u;
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=(*(tint_symbol_4)).arr[0]};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread tint_array_wrapper tint_symbol_5 = {};
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_1_1=tint_symbol_5.arr[0]};
-  tint_symbol_1 const tint_symbol_3 = {.x_1_1=tint_symbol_2.x_1_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl
index 8f12356..d642d96 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl
index 884397d..b65c953 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_AccessChain.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl
index 8f12356..d642d96 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl
index 884397d..b65c953 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_CopyObject.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl
index 8f12356..d642d96 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = asint(x_4_param);
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl
index 884397d..b65c953 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_I32_Load_Direct.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread int* const tint_symbol_5) {
-  int const x_2 = *(tint_symbol_5);
+void main_1(thread int* const tint_symbol_3) {
+  int const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = as_type<int>(x_4_param);
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) {
   thread int tint_symbol_6 = 0;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = as_type<int>(x_4_param);
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl
index 918354f..2fa3cdf 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = x_4_param;
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl
index 3c270f7..000b942 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_AccessChain.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_4_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_4_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl
index 918354f..2fa3cdf 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = x_4_param;
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl
index 3c270f7..000b942 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_CopyObject.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_4_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_4_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl
index 918354f..2fa3cdf 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_1_1 : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const uint x_4_param = tint_symbol.x_4_param;
+main_out main_inner(uint x_4_param) {
   x_4 = x_4_param;
   main_1();
   const main_out tint_symbol_3 = {x_1};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_4_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl
index 3c270f7..000b942 100644
--- a/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_VertexIndex_U32_Load_Direct.spvasm.expected.msl
@@ -4,22 +4,28 @@
 struct main_out {
   float4 x_1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_1_1 [[position]];
 };
 
-void main_1(thread uint* const tint_symbol_5) {
-  uint const x_2 = *(tint_symbol_5);
+void main_1(thread uint* const tint_symbol_3) {
+  uint const x_2 = *(tint_symbol_3);
   return;
 }
 
-vertex tint_symbol_2 tint_symbol(uint x_4_param [[vertex_id]]) {
+main_out tint_symbol_inner(uint x_4_param, thread uint* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = x_4_param;
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_1_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
+vertex tint_symbol_1 tint_symbol(uint x_4_param [[vertex_id]]) {
   thread uint tint_symbol_6 = 0u;
   thread float4 tint_symbol_7 = 0.0f;
-  tint_symbol_6 = x_4_param;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_3 = {.x_1_1=tint_symbol_7};
-  tint_symbol_2 const tint_symbol_4 = {.x_1_1=tint_symbol_3.x_1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_4_param, &(tint_symbol_6), &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_1_1 = inner_result.x_1_1;
+  return wrapper_result;
 }
 
diff --git a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl
index 1993bce..4edc58e 100644
--- a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl
+++ b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.hlsl
@@ -11,9 +11,15 @@
   float4 x_2_1 : SV_Position;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_2};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_2_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
diff --git a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl
index 31d7145..2589dab 100644
--- a/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvParserTest_EmitFunctions_Function_EntryPoint_Vertex.spvasm.expected.msl
@@ -12,11 +12,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_3) {
+  main_1();
+  main_out const tint_symbol_2 = {.x_2_1=*(tint_symbol_3)};
+  return tint_symbol_2;
+}
+
 vertex tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_4 = 0.0f;
-  main_1();
-  main_out const tint_symbol_2 = {.x_2_1=tint_symbol_4};
-  tint_symbol_1 const tint_symbol_3 = {.x_2_1=tint_symbol_2.x_2_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_4));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_2_1 = inner_result.x_2_1;
+  return wrapper_result;
 }
 
diff --git a/test/var/inferred/function-let.wgsl.expected.hlsl b/test/var/inferred/function-let.wgsl.expected.hlsl
index 98f4667..380a749 100644
--- a/test/var/inferred/function-let.wgsl.expected.hlsl
+++ b/test/var/inferred/function-let.wgsl.expected.hlsl
@@ -47,7 +47,13 @@
   float4 value : SV_Target0;
 };
 
+float4 main_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 tint_symbol main() {
-  const tint_symbol tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/var/inferred/function-let.wgsl.expected.msl b/test/var/inferred/function-let.wgsl.expected.msl
index 628c467..9de5eaf 100644
--- a/test/var/inferred/function-let.wgsl.expected.msl
+++ b/test/var/inferred/function-let.wgsl.expected.msl
@@ -51,8 +51,14 @@
   tint_array_wrapper const v15 = ret_MyArray();
 }
 
+float4 tint_symbol_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  tint_symbol_1 const tint_symbol_4 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/var/inferred/function-var.wgsl.expected.hlsl b/test/var/inferred/function-var.wgsl.expected.hlsl
index f91c6ec..d638243 100644
--- a/test/var/inferred/function-var.wgsl.expected.hlsl
+++ b/test/var/inferred/function-var.wgsl.expected.hlsl
@@ -47,7 +47,13 @@
   float4 value : SV_Target0;
 };
 
+float4 main_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 tint_symbol main() {
-  const tint_symbol tint_symbol_3 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_3;
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/var/inferred/function-var.wgsl.expected.msl b/test/var/inferred/function-var.wgsl.expected.msl
index e0c60fc..6786e04 100644
--- a/test/var/inferred/function-var.wgsl.expected.msl
+++ b/test/var/inferred/function-var.wgsl.expected.msl
@@ -51,8 +51,14 @@
   tint_array_wrapper v15 = ret_MyArray();
 }
 
+float4 tint_symbol_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  tint_symbol_1 const tint_symbol_4 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_4;
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/var/inferred/global-let.wgsl.expected.hlsl b/test/var/inferred/global-let.wgsl.expected.hlsl
index 4784df7..6dd234c 100644
--- a/test/var/inferred/global-let.wgsl.expected.hlsl
+++ b/test/var/inferred/global-let.wgsl.expected.hlsl
@@ -16,7 +16,13 @@
   float4 value : SV_Target0;
 };
 
+float4 main_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 tint_symbol main() {
-  const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_1;
+  const float4 inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
diff --git a/test/var/inferred/global-let.wgsl.expected.msl b/test/var/inferred/global-let.wgsl.expected.msl
index 6ae1297..2a9302b 100644
--- a/test/var/inferred/global-let.wgsl.expected.msl
+++ b/test/var/inferred/global-let.wgsl.expected.msl
@@ -20,8 +20,14 @@
 constant float3x3 v7 = float3x3(float3(1.0f, 1.0f, 1.0f), float3(1.0f, 1.0f, 1.0f), float3(1.0f, 1.0f, 1.0f));
 constant MyStruct v8 = {};
 constant tint_array_wrapper v9 = {.arr={}};
+float4 tint_symbol_inner() {
+  return float4(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  tint_symbol_1 const tint_symbol_2 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  return tint_symbol_2;
+  float4 const inner_result = tint_symbol_inner();
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
 }
 
diff --git a/test/var/initialization/workgroup/array.wgsl.expected.hlsl b/test/var/initialization/workgroup/array.wgsl.expected.hlsl
index 921c6c2..0b336d4 100644
--- a/test/var/initialization/workgroup/array.wgsl.expected.hlsl
+++ b/test/var/initialization/workgroup/array.wgsl.expected.hlsl
@@ -4,9 +4,7 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint local_invocation_index) {
   {
     for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) {
       const uint i = idx;
@@ -15,5 +13,10 @@
   }
   GroupMemoryBarrierWithGroupSync();
   v;
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/var/initialization/workgroup/array.wgsl.expected.msl b/test/var/initialization/workgroup/array.wgsl.expected.msl
index 3360d86..4be25e1 100644
--- a/test/var/initialization/workgroup/array.wgsl.expected.msl
+++ b/test/var/initialization/workgroup/array.wgsl.expected.msl
@@ -5,14 +5,18 @@
   int arr[3];
 };
 
-kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
-  threadgroup tint_array_wrapper tint_symbol_2;
+void tint_symbol_inner(uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1) {
   for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) {
     uint const i = idx;
-    tint_symbol_2.arr[i] = int();
+    (*(tint_symbol_1)).arr[i] = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  (void) tint_symbol_2;
+  (void) *(tint_symbol_1);
+}
+
+kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
+  threadgroup tint_array_wrapper tint_symbol_2;
+  tint_symbol_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl b/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl
index d3acb01..e2755de 100644
--- a/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl
+++ b/test/var/initialization/workgroup/matrix.wgsl.expected.hlsl
@@ -4,13 +4,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint local_invocation_index) {
   {
     v = float2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
   }
   GroupMemoryBarrierWithGroupSync();
   v;
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl b/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl
index 485a58a..41547eb 100644
--- a/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl
+++ b/test/var/initialization/workgroup/scalar.wgsl.expected.hlsl
@@ -4,13 +4,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint local_invocation_index) {
   {
     v = 0;
   }
   GroupMemoryBarrierWithGroupSync();
   v;
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/var/initialization/workgroup/scalar.wgsl.expected.msl b/test/var/initialization/workgroup/scalar.wgsl.expected.msl
index fa76a35..699380d 100644
--- a/test/var/initialization/workgroup/scalar.wgsl.expected.msl
+++ b/test/var/initialization/workgroup/scalar.wgsl.expected.msl
@@ -1,13 +1,17 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
-  threadgroup int tint_symbol_2;
+void tint_symbol_inner(uint local_invocation_index, threadgroup int* const tint_symbol_1) {
   {
-    tint_symbol_2 = int();
+    *(tint_symbol_1) = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  (void) tint_symbol_2;
+  (void) *(tint_symbol_1);
+}
+
+kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
+  threadgroup int tint_symbol_2;
+  tint_symbol_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/var/initialization/workgroup/struct.wgsl.expected.hlsl b/test/var/initialization/workgroup/struct.wgsl.expected.hlsl
index c512a31..8b0b1f1 100644
--- a/test/var/initialization/workgroup/struct.wgsl.expected.hlsl
+++ b/test/var/initialization/workgroup/struct.wgsl.expected.hlsl
@@ -9,14 +9,17 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint local_invocation_index) {
   {
     const S tint_symbol_2 = (S)0;
     v = tint_symbol_2;
   }
   GroupMemoryBarrierWithGroupSync();
   v;
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/var/initialization/workgroup/struct.wgsl.expected.msl b/test/var/initialization/workgroup/struct.wgsl.expected.msl
index 4e23887..a474b8f 100644
--- a/test/var/initialization/workgroup/struct.wgsl.expected.msl
+++ b/test/var/initialization/workgroup/struct.wgsl.expected.msl
@@ -6,14 +6,18 @@
   float b;
 };
 
-kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
-  threadgroup S tint_symbol_3;
+void tint_symbol_inner(uint local_invocation_index, threadgroup S* const tint_symbol_2) {
   {
-    S const tint_symbol_2 = {};
-    tint_symbol_3 = tint_symbol_2;
+    S const tint_symbol_1 = {};
+    *(tint_symbol_2) = tint_symbol_1;
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  (void) tint_symbol_3;
+  (void) *(tint_symbol_2);
+}
+
+kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
+  threadgroup S tint_symbol_3;
+  tint_symbol_inner(local_invocation_index, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/var/initialization/workgroup/vector.wgsl.expected.hlsl b/test/var/initialization/workgroup/vector.wgsl.expected.hlsl
index 042faeb..4219ded 100644
--- a/test/var/initialization/workgroup/vector.wgsl.expected.hlsl
+++ b/test/var/initialization/workgroup/vector.wgsl.expected.hlsl
@@ -4,13 +4,16 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main_inner(uint local_invocation_index) {
   {
     v = int3(0, 0, 0);
   }
   GroupMemoryBarrierWithGroupSync();
   v;
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.local_invocation_index);
   return;
 }
diff --git a/test/var/initialization/workgroup/vector.wgsl.expected.msl b/test/var/initialization/workgroup/vector.wgsl.expected.msl
index b3dc1ce..26843ff 100644
--- a/test/var/initialization/workgroup/vector.wgsl.expected.msl
+++ b/test/var/initialization/workgroup/vector.wgsl.expected.msl
@@ -1,13 +1,17 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
-  threadgroup int3 tint_symbol_2;
+void tint_symbol_inner(uint local_invocation_index, threadgroup int3* const tint_symbol_1) {
   {
-    tint_symbol_2 = int3();
+    *(tint_symbol_1) = int3();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  (void) tint_symbol_2;
+  (void) *(tint_symbol_1);
+}
+
+kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
+  threadgroup int3 tint_symbol_2;
+  tint_symbol_inner(local_invocation_index, &(tint_symbol_2));
   return;
 }
 
diff --git a/test/var/uses/workgroup.wgsl.expected.hlsl b/test/var/uses/workgroup.wgsl.expected.hlsl
index f72ae0f..c5e6b7f 100644
--- a/test/var/uses/workgroup.wgsl.expected.hlsl
+++ b/test/var/uses/workgroup.wgsl.expected.hlsl
@@ -29,15 +29,18 @@
   uint local_invocation_index : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main1(tint_symbol_1 tint_symbol) {
-  const uint local_invocation_index = tint_symbol.local_invocation_index;
+void main1_inner(uint local_invocation_index) {
   {
     a = 0;
   }
   GroupMemoryBarrierWithGroupSync();
   a = 42;
   uses_a();
+}
+
+[numthreads(1, 1, 1)]
+void main1(tint_symbol_1 tint_symbol) {
+  main1_inner(tint_symbol.local_invocation_index);
   return;
 }
 
@@ -45,15 +48,18 @@
   uint local_invocation_index_1 : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main2(tint_symbol_3 tint_symbol_2) {
-  const uint local_invocation_index_1 = tint_symbol_2.local_invocation_index_1;
+void main2_inner(uint local_invocation_index_1) {
   {
     b = 0;
   }
   GroupMemoryBarrierWithGroupSync();
   b = 7;
   uses_b();
+}
+
+[numthreads(1, 1, 1)]
+void main2(tint_symbol_3 tint_symbol_2) {
+  main2_inner(tint_symbol_2.local_invocation_index_1);
   return;
 }
 
@@ -61,9 +67,7 @@
   uint local_invocation_index_2 : SV_GroupIndex;
 };
 
-[numthreads(1, 1, 1)]
-void main3(tint_symbol_5 tint_symbol_4) {
-  const uint local_invocation_index_2 = tint_symbol_4.local_invocation_index_2;
+void main3_inner(uint local_invocation_index_2) {
   {
     a = 0;
     b = 0;
@@ -71,6 +75,11 @@
   GroupMemoryBarrierWithGroupSync();
   outer();
   no_uses();
+}
+
+[numthreads(1, 1, 1)]
+void main3(tint_symbol_5 tint_symbol_4) {
+  main3_inner(tint_symbol_4.local_invocation_index_2);
   return;
 }
 
diff --git a/test/var/uses/workgroup.wgsl.expected.msl b/test/var/uses/workgroup.wgsl.expected.msl
index 4713b0e..94f106f 100644
--- a/test/var/uses/workgroup.wgsl.expected.msl
+++ b/test/var/uses/workgroup.wgsl.expected.msl
@@ -1,61 +1,73 @@
 #include <metal_stdlib>
 
 using namespace metal;
-void uses_a(threadgroup int* const tint_symbol_3) {
-  *(tint_symbol_3) = as_type<int>((as_type<uint>(*(tint_symbol_3)) + as_type<uint>(1)));
+void uses_a(threadgroup int* const tint_symbol) {
+  *(tint_symbol) = as_type<int>((as_type<uint>(*(tint_symbol)) + as_type<uint>(1)));
 }
 
-void uses_b(threadgroup int* const tint_symbol_4) {
-  *(tint_symbol_4) = as_type<int>((as_type<uint>(*(tint_symbol_4)) * as_type<uint>(2)));
+void uses_b(threadgroup int* const tint_symbol_1) {
+  *(tint_symbol_1) = as_type<int>((as_type<uint>(*(tint_symbol_1)) * as_type<uint>(2)));
 }
 
-void uses_a_and_b(threadgroup int* const tint_symbol_5, threadgroup int* const tint_symbol_6) {
-  *(tint_symbol_5) = *(tint_symbol_6);
+void uses_a_and_b(threadgroup int* const tint_symbol_2, threadgroup int* const tint_symbol_3) {
+  *(tint_symbol_2) = *(tint_symbol_3);
 }
 
 void no_uses() {
 }
 
-void outer(threadgroup int* const tint_symbol_7, threadgroup int* const tint_symbol_8) {
-  *(tint_symbol_7) = 0;
-  uses_a(tint_symbol_7);
-  uses_a_and_b(tint_symbol_8, tint_symbol_7);
-  uses_b(tint_symbol_8);
+void outer(threadgroup int* const tint_symbol_4, threadgroup int* const tint_symbol_5) {
+  *(tint_symbol_4) = 0;
+  uses_a(tint_symbol_4);
+  uses_a_and_b(tint_symbol_5, tint_symbol_4);
+  uses_b(tint_symbol_5);
   no_uses();
 }
 
+void main1_inner(uint local_invocation_index, threadgroup int* const tint_symbol_6) {
+  {
+    *(tint_symbol_6) = int();
+  }
+  threadgroup_barrier(mem_flags::mem_threadgroup);
+  *(tint_symbol_6) = 42;
+  uses_a(tint_symbol_6);
+}
+
 kernel void main1(uint local_invocation_index [[thread_index_in_threadgroup]]) {
-  threadgroup int tint_symbol_9;
+  threadgroup int tint_symbol_7;
+  main1_inner(local_invocation_index, &(tint_symbol_7));
+  return;
+}
+
+void main2_inner(uint local_invocation_index_1, threadgroup int* const tint_symbol_8) {
   {
-    tint_symbol_9 = int();
+    *(tint_symbol_8) = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  tint_symbol_9 = 42;
-  uses_a(&(tint_symbol_9));
-  return;
+  *(tint_symbol_8) = 7;
+  uses_b(tint_symbol_8);
 }
 
 kernel void main2(uint local_invocation_index_1 [[thread_index_in_threadgroup]]) {
-  threadgroup int tint_symbol_10;
-  {
-    tint_symbol_10 = int();
-  }
-  threadgroup_barrier(mem_flags::mem_threadgroup);
-  tint_symbol_10 = 7;
-  uses_b(&(tint_symbol_10));
+  threadgroup int tint_symbol_9;
+  main2_inner(local_invocation_index_1, &(tint_symbol_9));
   return;
 }
 
-kernel void main3(uint local_invocation_index_2 [[thread_index_in_threadgroup]]) {
-  threadgroup int tint_symbol_11;
-  threadgroup int tint_symbol_12;
+void main3_inner(uint local_invocation_index_2, threadgroup int* const tint_symbol_10, threadgroup int* const tint_symbol_11) {
   {
-    tint_symbol_11 = int();
-    tint_symbol_12 = int();
+    *(tint_symbol_10) = int();
+    *(tint_symbol_11) = int();
   }
   threadgroup_barrier(mem_flags::mem_threadgroup);
-  outer(&(tint_symbol_11), &(tint_symbol_12));
+  outer(tint_symbol_10, tint_symbol_11);
   no_uses();
+}
+
+kernel void main3(uint local_invocation_index_2 [[thread_index_in_threadgroup]]) {
+  threadgroup int tint_symbol_12;
+  threadgroup int tint_symbol_13;
+  main3_inner(local_invocation_index_2, &(tint_symbol_12), &(tint_symbol_13));
   return;
 }
 
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl
index 3b1f34a..dcab099 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.hlsl
@@ -24,11 +24,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
-  const main_out tint_symbol_3 = {gl_Position, frag_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {gl_Position, frag_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl
index de2d334..6aac916 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl
@@ -16,23 +16,29 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(constant block0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
-  float4 const x_24 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_24;
+void main_1(constant block0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  float4 const x_24 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_24;
   float4 const x_27 = x_8.in_color;
-  *(tint_symbol_8) = x_27;
+  *(tint_symbol_7) = x_27;
   return;
 }
 
+main_out tint_symbol_inner(constant block0& x_8, float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = position_param;
+  main_1(x_8, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_9 = position_param;
-  main_1(x_8, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_12 = 0.0f;
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_8, tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl
index 3b1f34a..dcab099 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.hlsl
@@ -24,11 +24,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
-  const main_out tint_symbol_3 = {gl_Position, frag_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {gl_Position, frag_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl
index de2d334..6aac916 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl
@@ -16,23 +16,29 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(constant block0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
-  float4 const x_24 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_24;
+void main_1(constant block0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  float4 const x_24 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_24;
   float4 const x_27 = x_8.in_color;
-  *(tint_symbol_8) = x_27;
+  *(tint_symbol_7) = x_27;
   return;
 }
 
+main_out tint_symbol_inner(constant block0& x_8, float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = position_param;
+  main_1(x_8, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_9 = position_param;
-  main_1(x_8, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_12 = 0.0f;
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_8, tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl
index acf1be9..a918e8f 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 final_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 frag_color_param = tint_symbol.frag_color_param;
+main_out main_inner(float4 frag_color_param) {
   frag_color = frag_color_param;
   main_1();
   const main_out tint_symbol_3 = {final_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.final_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.frag_color_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.final_color_1 = inner_result.final_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl
index 838993a..b1a11b2 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.spvasm.expected.msl
@@ -11,20 +11,25 @@
   float4 final_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_12 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_12;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_12 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_12;
   return;
 }
 
+main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = frag_color_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.final_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const frag_color_param = tint_symbol_1.frag_color_param;
-  tint_symbol_8 = frag_color_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.final_color_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.final_color_1=tint_symbol_4.final_color_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.final_color_1 = inner_result.final_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl
index acf1be9..a918e8f 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.hlsl
@@ -16,11 +16,16 @@
   float4 final_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 frag_color_param = tint_symbol.frag_color_param;
+main_out main_inner(float4 frag_color_param) {
   frag_color = frag_color_param;
   main_1();
   const main_out tint_symbol_3 = {final_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.final_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.frag_color_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.final_color_1 = inner_result.final_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl
index 838993a..b1a11b2 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl.expected.msl
@@ -11,20 +11,25 @@
   float4 final_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_12 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_12;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_12 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_12;
   return;
 }
 
+main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = frag_color_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.final_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const frag_color_param = tint_symbol_1.frag_color_param;
-  tint_symbol_8 = frag_color_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.final_color_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.final_color_1=tint_symbol_4.final_color_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.final_color_1 = inner_result.final_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl
index 3cc9cde..1667248 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.hlsl
@@ -20,11 +20,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position, frag_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl
index 2ce3e85..f0ab629 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.spvasm.expected.msl
@@ -13,23 +13,29 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
-  float4 const x_21 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_21;
-  float4 const x_23 = *(tint_symbol_6);
-  *(tint_symbol_8) = (x_23 * 0.5f);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  float4 const x_21 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_21;
+  float4 const x_23 = *(tint_symbol_5);
+  *(tint_symbol_7) = (x_23 * 0.5f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = position_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_9 = position_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_12 = 0.0f;
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl
index 3cc9cde..1667248 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.hlsl
@@ -20,11 +20,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position, frag_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl
index 2ce3e85..f0ab629 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl.expected.msl
@@ -13,23 +13,29 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
-  float4 const x_21 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_21;
-  float4 const x_23 = *(tint_symbol_6);
-  *(tint_symbol_8) = (x_23 * 0.5f);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  float4 const x_21 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_21;
+  float4 const x_23 = *(tint_symbol_5);
+  *(tint_symbol_7) = (x_23 * 0.5f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = position_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .frag_color_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_9 = position_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .frag_color_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_12 = 0.0f;
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl
index 15b4ff6..267afe9 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.hlsl
@@ -24,11 +24,16 @@
   float4 color_out_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 frag_color_param = tint_symbol.frag_color_param;
+main_out main_inner(float4 frag_color_param) {
   frag_color = frag_color_param;
   main_1();
   const main_out tint_symbol_3 = {color_out};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.frag_color_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl
index ae8e6eb..cdf6e49 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/1.spvasm.expected.msl
@@ -11,27 +11,32 @@
   float4 color_out_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int2 iv = 0;
-  float4 const x_28 = *(tint_symbol_6);
+  float4 const x_28 = *(tint_symbol_5);
   iv = int2((float2(x_28.x, x_28.y) * 256.0f));
   int const x_33 = iv.y;
   if ((((x_33 / 2) & 64) == 64)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = frag_color_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const frag_color_param = tint_symbol_1.frag_color_param;
-  tint_symbol_8 = frag_color_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl
index 15b4ff6..267afe9 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.hlsl
@@ -24,11 +24,16 @@
   float4 color_out_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 frag_color_param = tint_symbol.frag_color_param;
+main_out main_inner(float4 frag_color_param) {
   frag_color = frag_color_param;
   main_1();
   const main_out tint_symbol_3 = {color_out};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.frag_color_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl
index ae8e6eb..cdf6e49 100644
--- a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl.expected.msl
@@ -11,27 +11,32 @@
   float4 color_out_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int2 iv = 0;
-  float4 const x_28 = *(tint_symbol_6);
+  float4 const x_28 = *(tint_symbol_5);
   iv = int2((float2(x_28.x, x_28.y) * 256.0f));
   int const x_33 = iv.y;
   if ((((x_33 / 2) & 64) == 64)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = frag_color_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const frag_color_param = tint_symbol_1.frag_color_param;
-  tint_symbol_8 = frag_color_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl
index 485db30..4b4febe 100644
--- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.hlsl
@@ -16,9 +16,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl
index b9d21c3..a12c755 100644
--- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.spvasm.expected.msl
@@ -8,21 +8,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int x = 0;
   x = 0;
   int const x_5 = x;
   if ((float4(1.0f, 1.0f, 1.0f, 1.0f)[clamp(x_5, 0, 3)] >= 1.0f)) {
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl
index 485db30..4b4febe 100644
--- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.hlsl
@@ -16,9 +16,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl
index b9d21c3..a12c755 100644
--- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl.expected.msl
@@ -8,21 +8,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int x = 0;
   x = 0;
   int const x_5 = x;
   if ((float4(1.0f, 1.0f, 1.0f, 1.0f)[clamp(x_5, 0, 3)] >= 1.0f)) {
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl
index f0e2766..f017b19 100644
--- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.hlsl
@@ -26,9 +26,9 @@
     tmp_float = x_75;
     const float3 x_76 = float3(x_75, x_75, x_75);
     color = x_76;
-    const int tint_symbol_3[1] = {0};
-    const tmp_struct tint_symbol_4 = {tint_symbol_3};
-    x_24 = tint_symbol_4.nmb;
+    const int tint_symbol_2[1] = {0};
+    const tmp_struct tint_symbol_3 = {tint_symbol_2};
+    x_24 = tint_symbol_3.nmb;
     x_68 = false;
     x_79_phi = false;
     while (true) {
@@ -104,11 +104,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int binarySearch_struct_tmp_struct_i1_1_1_(inout tmp_struct obj) {
diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl
index 0de2d02..c7b4af4 100644
--- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_5) {
   tint_array_wrapper x_24 = {};
   bool x_68 = false;
   int x_17 = 0;
@@ -36,9 +36,9 @@
     tmp_float = x_75;
     float3 const x_76 = float3(x_75, x_75, x_75);
     color = x_76;
-    tint_array_wrapper const tint_symbol_3 = {.arr={0}};
-    tmp_struct const tint_symbol_4 = {.nmb=tint_symbol_3};
-    x_24 = tint_symbol_4.nmb;
+    tint_array_wrapper const tint_symbol_2 = {.arr={0}};
+    tmp_struct const tint_symbol_3 = {.nmb=tint_symbol_2};
+    x_24 = tint_symbol_3.nmb;
     x_68 = false;
     x_79_phi = false;
     while (true) {
@@ -90,7 +90,7 @@
     if ((x_26 == -1)) {
       discard_fragment();
     } else {
-      *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       float2 const x_100 = (float2(x_76.y, x_76.z) + float2(1.0f, 1.0f));
       x_101 = float3(x_76.x, x_100.x, x_100.y);
       color = x_101;
@@ -100,19 +100,25 @@
         break;
       }
     }
-    *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
+    *(tint_symbol_5) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
     x_69 = true;
     break;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_6) {
+  main_1(x_11, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_11, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) {
diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl
index f0e2766..f017b19 100644
--- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,9 @@
     tmp_float = x_75;
     const float3 x_76 = float3(x_75, x_75, x_75);
     color = x_76;
-    const int tint_symbol_3[1] = {0};
-    const tmp_struct tint_symbol_4 = {tint_symbol_3};
-    x_24 = tint_symbol_4.nmb;
+    const int tint_symbol_2[1] = {0};
+    const tmp_struct tint_symbol_3 = {tint_symbol_2};
+    x_24 = tint_symbol_3.nmb;
     x_68 = false;
     x_79_phi = false;
     while (true) {
@@ -104,11 +104,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int binarySearch_struct_tmp_struct_i1_1_1_(inout tmp_struct obj) {
diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl
index 0de2d02..c7b4af4 100644
--- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_5) {
   tint_array_wrapper x_24 = {};
   bool x_68 = false;
   int x_17 = 0;
@@ -36,9 +36,9 @@
     tmp_float = x_75;
     float3 const x_76 = float3(x_75, x_75, x_75);
     color = x_76;
-    tint_array_wrapper const tint_symbol_3 = {.arr={0}};
-    tmp_struct const tint_symbol_4 = {.nmb=tint_symbol_3};
-    x_24 = tint_symbol_4.nmb;
+    tint_array_wrapper const tint_symbol_2 = {.arr={0}};
+    tmp_struct const tint_symbol_3 = {.nmb=tint_symbol_2};
+    x_24 = tint_symbol_3.nmb;
     x_68 = false;
     x_79_phi = false;
     while (true) {
@@ -90,7 +90,7 @@
     if ((x_26 == -1)) {
       discard_fragment();
     } else {
-      *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       float2 const x_100 = (float2(x_76.y, x_76.z) + float2(1.0f, 1.0f));
       x_101 = float3(x_76.x, x_100.x, x_100.y);
       color = x_101;
@@ -100,19 +100,25 @@
         break;
       }
     }
-    *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
+    *(tint_symbol_5) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
     x_69 = true;
     break;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_6) {
+  main_1(x_11, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_11, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) {
diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl
index 2e1f778..73b6df0 100644
--- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.hlsl
@@ -146,9 +146,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl
index 33c3ed3..fddba83 100644
--- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl
@@ -17,22 +17,22 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_4) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_92 = *(i);
-  int const x_94 = (*(tint_symbol_4)).numbers.arr[x_92];
+  int const x_94 = (*(tint_symbol_3)).numbers.arr[x_92];
   temp = x_94;
   int const x_95 = *(i);
   int const x_96 = *(j);
-  int const x_98 = (*(tint_symbol_4)).numbers.arr[x_96];
-  (*(tint_symbol_4)).numbers.arr[x_95] = x_98;
+  int const x_98 = (*(tint_symbol_3)).numbers.arr[x_96];
+  (*(tint_symbol_3)).numbers.arr[x_95] = x_98;
   int const x_100 = *(j);
   int const x_101 = temp;
-  (*(tint_symbol_4)).numbers.arr[x_100] = x_101;
+  (*(tint_symbol_3)).numbers.arr[x_100] = x_101;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_104 = *(h);
-  int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104];
+  int const x_106 = (*(tint_symbol_4)).numbers.arr[x_104];
   pivot = x_106;
   int const x_107 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_107) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_119 = j_1;
-    int const x_121 = (*(tint_symbol_5)).numbers.arr[x_119];
+    int const x_121 = (*(tint_symbol_4)).numbers.arr[x_119];
     int const x_122 = pivot;
     if ((x_121 <= x_122)) {
       int const x_126 = i_1;
@@ -64,7 +64,7 @@
       param = x_128;
       int const x_129 = j_1;
       param_1 = x_129;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_5);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_4);
     }
     {
       int const x_131 = j_1;
@@ -75,12 +75,12 @@
   param_2 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(1)));
   int const x_135 = *(h);
   param_3 = x_135;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_5);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4);
   int const x_137 = i_1;
   return as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_6) {
+void quicksort_(thread QuicksortObject* const tint_symbol_5) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -119,7 +119,7 @@
     param_4 = x_163;
     int const x_164 = h_1;
     param_5 = x_164;
-    int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6);
+    int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5);
     p = x_165;
     int const x_166 = p;
     int const x_168 = l_1;
@@ -153,7 +153,7 @@
   return;
 }
 
-void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7) {
   int i_2 = 0;
   i_2 = 0;
   while (true) {
@@ -164,35 +164,41 @@
     }
     int const x_67 = i_2;
     int const x_68 = i_2;
-    (*(tint_symbol_7)).numbers.arr[x_67] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_68)));
+    (*(tint_symbol_6)).numbers.arr[x_67] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_68)));
     int const x_71 = i_2;
     int const x_72 = i_2;
-    int const x_74 = (*(tint_symbol_7)).numbers.arr[x_72];
+    int const x_74 = (*(tint_symbol_6)).numbers.arr[x_72];
     int const x_75 = i_2;
-    int const x_77 = (*(tint_symbol_7)).numbers.arr[x_75];
-    (*(tint_symbol_7)).numbers.arr[x_71] = as_type<int>((as_type<uint>(x_74) * as_type<uint>(x_77)));
+    int const x_77 = (*(tint_symbol_6)).numbers.arr[x_75];
+    (*(tint_symbol_6)).numbers.arr[x_71] = as_type<int>((as_type<uint>(x_74) * as_type<uint>(x_77)));
     {
       int const x_80 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_7);
-  int const x_84 = (*(tint_symbol_7)).numbers.arr[0];
-  int const x_86 = (*(tint_symbol_7)).numbers.arr[4];
+  quicksort_(tint_symbol_6);
+  int const x_84 = (*(tint_symbol_6)).numbers.arr[0];
+  int const x_86 = (*(tint_symbol_6)).numbers.arr[4];
   if ((x_84 < x_86)) {
-    *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_8) = float4(0.0f, 1.0f, 0.0f, 1.0f);
+    *(tint_symbol_7) = float4(0.0f, 1.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  main_1(tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread QuicksortObject tint_symbol_9 = {};
-  thread float4 tint_symbol_10 = 0.0f;
-  main_1(&(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread QuicksortObject tint_symbol_10 = {};
+  thread float4 tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl
index 2e1f778..73b6df0 100644
--- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.hlsl
@@ -146,9 +146,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl
index 33c3ed3..fddba83 100644
--- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl
@@ -17,22 +17,22 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_4) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_92 = *(i);
-  int const x_94 = (*(tint_symbol_4)).numbers.arr[x_92];
+  int const x_94 = (*(tint_symbol_3)).numbers.arr[x_92];
   temp = x_94;
   int const x_95 = *(i);
   int const x_96 = *(j);
-  int const x_98 = (*(tint_symbol_4)).numbers.arr[x_96];
-  (*(tint_symbol_4)).numbers.arr[x_95] = x_98;
+  int const x_98 = (*(tint_symbol_3)).numbers.arr[x_96];
+  (*(tint_symbol_3)).numbers.arr[x_95] = x_98;
   int const x_100 = *(j);
   int const x_101 = temp;
-  (*(tint_symbol_4)).numbers.arr[x_100] = x_101;
+  (*(tint_symbol_3)).numbers.arr[x_100] = x_101;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_104 = *(h);
-  int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104];
+  int const x_106 = (*(tint_symbol_4)).numbers.arr[x_104];
   pivot = x_106;
   int const x_107 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_107) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_119 = j_1;
-    int const x_121 = (*(tint_symbol_5)).numbers.arr[x_119];
+    int const x_121 = (*(tint_symbol_4)).numbers.arr[x_119];
     int const x_122 = pivot;
     if ((x_121 <= x_122)) {
       int const x_126 = i_1;
@@ -64,7 +64,7 @@
       param = x_128;
       int const x_129 = j_1;
       param_1 = x_129;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_5);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_4);
     }
     {
       int const x_131 = j_1;
@@ -75,12 +75,12 @@
   param_2 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(1)));
   int const x_135 = *(h);
   param_3 = x_135;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_5);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4);
   int const x_137 = i_1;
   return as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_6) {
+void quicksort_(thread QuicksortObject* const tint_symbol_5) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -119,7 +119,7 @@
     param_4 = x_163;
     int const x_164 = h_1;
     param_5 = x_164;
-    int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6);
+    int const x_165 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5);
     p = x_165;
     int const x_166 = p;
     int const x_168 = l_1;
@@ -153,7 +153,7 @@
   return;
 }
 
-void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7) {
   int i_2 = 0;
   i_2 = 0;
   while (true) {
@@ -164,35 +164,41 @@
     }
     int const x_67 = i_2;
     int const x_68 = i_2;
-    (*(tint_symbol_7)).numbers.arr[x_67] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_68)));
+    (*(tint_symbol_6)).numbers.arr[x_67] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_68)));
     int const x_71 = i_2;
     int const x_72 = i_2;
-    int const x_74 = (*(tint_symbol_7)).numbers.arr[x_72];
+    int const x_74 = (*(tint_symbol_6)).numbers.arr[x_72];
     int const x_75 = i_2;
-    int const x_77 = (*(tint_symbol_7)).numbers.arr[x_75];
-    (*(tint_symbol_7)).numbers.arr[x_71] = as_type<int>((as_type<uint>(x_74) * as_type<uint>(x_77)));
+    int const x_77 = (*(tint_symbol_6)).numbers.arr[x_75];
+    (*(tint_symbol_6)).numbers.arr[x_71] = as_type<int>((as_type<uint>(x_74) * as_type<uint>(x_77)));
     {
       int const x_80 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_7);
-  int const x_84 = (*(tint_symbol_7)).numbers.arr[0];
-  int const x_86 = (*(tint_symbol_7)).numbers.arr[4];
+  quicksort_(tint_symbol_6);
+  int const x_84 = (*(tint_symbol_6)).numbers.arr[0];
+  int const x_86 = (*(tint_symbol_6)).numbers.arr[4];
   if ((x_84 < x_86)) {
-    *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_8) = float4(0.0f, 1.0f, 0.0f, 1.0f);
+    *(tint_symbol_7) = float4(0.0f, 1.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  main_1(tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread QuicksortObject tint_symbol_9 = {};
-  thread float4 tint_symbol_10 = 0.0f;
-  main_1(&(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread QuicksortObject tint_symbol_10 = {};
+  thread float4 tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl
index b29e01e..f4566b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.hlsl
@@ -88,11 +88,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl
index 34a6d51..5aecf21 100644
--- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl
@@ -10,13 +10,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_(constant buf0& x_7, thread float4* const tint_symbol_5) {
+float func_(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int x = 0;
-  float const x_99 = (*(tint_symbol_5)).x;
+  float const x_99 = (*(tint_symbol_3)).x;
   if ((x_99 < 1.0f)) {
     return 5.0f;
   }
@@ -34,7 +34,7 @@
   return (5.0f + float(x_120));
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i = 0;
   int j = 0;
   tint_array_wrapper data = {};
@@ -46,7 +46,7 @@
     } else {
       break;
     }
-    float const x_56 = (*(tint_symbol_6)).x;
+    float const x_56 = (*(tint_symbol_4)).x;
     if ((x_56 >= 0.0f)) {
       j = 0;
       while (true) {
@@ -59,7 +59,7 @@
         }
         int const x_67 = j;
         int const x_69 = i;
-        float const x_71 = func_(x_7, tint_symbol_6);
+        float const x_71 = func_(x_7, tint_symbol_4);
         data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_67)))) + as_type<uint>(x_69)))].x = x_71;
         float const x_74 = data.arr[0].x;
         bool const x_75 = (x_74 == 5.0f);
@@ -71,9 +71,9 @@
         }
         bool const x_82 = x_82_phi;
         if (x_82) {
-          *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+          *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
         } else {
-          *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+          *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
         }
         float const x_87 = x_7.injectionSwitch.x;
         float const x_89 = x_7.injectionSwitch.y;
@@ -94,13 +94,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl
index b29e01e..f4566b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.hlsl
@@ -88,11 +88,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl
index 34a6d51..5aecf21 100644
--- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl
@@ -10,13 +10,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_(constant buf0& x_7, thread float4* const tint_symbol_5) {
+float func_(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int x = 0;
-  float const x_99 = (*(tint_symbol_5)).x;
+  float const x_99 = (*(tint_symbol_3)).x;
   if ((x_99 < 1.0f)) {
     return 5.0f;
   }
@@ -34,7 +34,7 @@
   return (5.0f + float(x_120));
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i = 0;
   int j = 0;
   tint_array_wrapper data = {};
@@ -46,7 +46,7 @@
     } else {
       break;
     }
-    float const x_56 = (*(tint_symbol_6)).x;
+    float const x_56 = (*(tint_symbol_4)).x;
     if ((x_56 >= 0.0f)) {
       j = 0;
       while (true) {
@@ -59,7 +59,7 @@
         }
         int const x_67 = j;
         int const x_69 = i;
-        float const x_71 = func_(x_7, tint_symbol_6);
+        float const x_71 = func_(x_7, tint_symbol_4);
         data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_67)))) + as_type<uint>(x_69)))].x = x_71;
         float const x_74 = data.arr[0].x;
         bool const x_75 = (x_74 == 5.0f);
@@ -71,9 +71,9 @@
         }
         bool const x_82 = x_82_phi;
         if (x_82) {
-          *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+          *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
         } else {
-          *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+          *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
         }
         float const x_87 = x_7.injectionSwitch.x;
         float const x_89 = x_7.injectionSwitch.y;
@@ -94,13 +94,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl
index b2bb718..1d0f1e8 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.hlsl
@@ -86,11 +86,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl
index 9f12b7c..1405653 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl
@@ -10,22 +10,22 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread tint_array_wrapper_1* const tint_symbol_7) {
+float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_3, thread float4* const tint_symbol_4, thread tint_array_wrapper_1* const tint_symbol_5) {
   int b = 0;
   int i = 0;
   bool x_115 = false;
   bool x_116_phi = false;
   b = 0;
-  (*(tint_symbol_5)).arr[0] = 5;
-  (*(tint_symbol_5)).arr[2] = 0;
-  (*(tint_symbol_5)).arr[4] = 0;
-  (*(tint_symbol_5)).arr[6] = 0;
-  (*(tint_symbol_5)).arr[8] = 0;
-  float const x_71 = (*(tint_symbol_6)).x;
+  (*(tint_symbol_3)).arr[0] = 5;
+  (*(tint_symbol_3)).arr[2] = 0;
+  (*(tint_symbol_3)).arr[4] = 0;
+  (*(tint_symbol_3)).arr[6] = 0;
+  (*(tint_symbol_3)).arr[8] = 0;
+  float const x_71 = (*(tint_symbol_4)).x;
   if ((x_71 >= 0.0f)) {
     while (true) {
       int const x_79 = b;
@@ -38,8 +38,8 @@
       if ((x_83 <= 5)) {
         int const x_87 = b;
         int const x_88 = b;
-        int const x_90 = (*(tint_symbol_5)).arr[x_88];
-        (*(tint_symbol_7)).arr[x_87] = x_90;
+        int const x_90 = (*(tint_symbol_3)).arr[x_88];
+        (*(tint_symbol_5)).arr[x_87] = x_90;
         int const x_92 = b;
         b = as_type<int>((as_type<uint>(x_92) + as_type<uint>(2)));
       }
@@ -53,18 +53,18 @@
       break;
     }
     int const x_101 = i;
-    int const x_103 = (*(tint_symbol_7)).arr[0];
-    (*(tint_symbol_5)).arr[x_101] = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
+    int const x_103 = (*(tint_symbol_5)).arr[0];
+    (*(tint_symbol_3)).arr[x_101] = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
     {
       int const x_106 = i;
       i = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
     }
   }
-  int const x_109 = (*(tint_symbol_7)).arr[0];
+  int const x_109 = (*(tint_symbol_5)).arr[0];
   bool const x_110 = (x_109 == 5);
   x_116_phi = x_110;
   if (x_110) {
-    int const x_114 = (*(tint_symbol_5)).arr[0];
+    int const x_114 = (*(tint_symbol_3)).arr[0];
     x_115 = (x_114 == 6);
     x_116_phi = x_115;
   }
@@ -77,7 +77,7 @@
   return 0.0f;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread tint_array_wrapper_1* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread tint_array_wrapper_1* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int i_1 = 0;
   int param = 0;
   int param_1 = 0;
@@ -90,14 +90,14 @@
     }
     int const x_54 = i_1;
     param = x_54;
-    float const x_55 = func_i1_(&(param), tint_symbol_8, tint_symbol_9, tint_symbol_10);
+    float const x_55 = func_i1_(&(param), tint_symbol_6, tint_symbol_7, tint_symbol_8);
     int const x_56 = i_1;
     param_1 = x_56;
-    float const x_57 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_9, tint_symbol_10);
+    float const x_57 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_7, tint_symbol_8);
     if ((x_57 == 1.0f)) {
-      *(tint_symbol_11) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     } else {
-      *(tint_symbol_11) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     }
     {
       int const x_62 = i_1;
@@ -107,15 +107,21 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread tint_array_wrapper tint_symbol_13 = {};
-  thread tint_array_wrapper_1 tint_symbol_14 = {};
-  thread float4 tint_symbol_15 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(&(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14), &(tint_symbol_15));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper_1* const tint_symbol_12, thread float4* const tint_symbol_13) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(tint_symbol_11, tint_symbol_10, tint_symbol_12, tint_symbol_13);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_13)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+  thread float4 tint_symbol_14 = 0.0f;
+  thread tint_array_wrapper tint_symbol_15 = {};
+  thread tint_array_wrapper_1 tint_symbol_16 = {};
+  thread float4 tint_symbol_17 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl
index b2bb718..1d0f1e8 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.hlsl
@@ -86,11 +86,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl
index 9f12b7c..1405653 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl
@@ -10,22 +10,22 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread tint_array_wrapper_1* const tint_symbol_7) {
+float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol_3, thread float4* const tint_symbol_4, thread tint_array_wrapper_1* const tint_symbol_5) {
   int b = 0;
   int i = 0;
   bool x_115 = false;
   bool x_116_phi = false;
   b = 0;
-  (*(tint_symbol_5)).arr[0] = 5;
-  (*(tint_symbol_5)).arr[2] = 0;
-  (*(tint_symbol_5)).arr[4] = 0;
-  (*(tint_symbol_5)).arr[6] = 0;
-  (*(tint_symbol_5)).arr[8] = 0;
-  float const x_71 = (*(tint_symbol_6)).x;
+  (*(tint_symbol_3)).arr[0] = 5;
+  (*(tint_symbol_3)).arr[2] = 0;
+  (*(tint_symbol_3)).arr[4] = 0;
+  (*(tint_symbol_3)).arr[6] = 0;
+  (*(tint_symbol_3)).arr[8] = 0;
+  float const x_71 = (*(tint_symbol_4)).x;
   if ((x_71 >= 0.0f)) {
     while (true) {
       int const x_79 = b;
@@ -38,8 +38,8 @@
       if ((x_83 <= 5)) {
         int const x_87 = b;
         int const x_88 = b;
-        int const x_90 = (*(tint_symbol_5)).arr[x_88];
-        (*(tint_symbol_7)).arr[x_87] = x_90;
+        int const x_90 = (*(tint_symbol_3)).arr[x_88];
+        (*(tint_symbol_5)).arr[x_87] = x_90;
         int const x_92 = b;
         b = as_type<int>((as_type<uint>(x_92) + as_type<uint>(2)));
       }
@@ -53,18 +53,18 @@
       break;
     }
     int const x_101 = i;
-    int const x_103 = (*(tint_symbol_7)).arr[0];
-    (*(tint_symbol_5)).arr[x_101] = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
+    int const x_103 = (*(tint_symbol_5)).arr[0];
+    (*(tint_symbol_3)).arr[x_101] = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
     {
       int const x_106 = i;
       i = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
     }
   }
-  int const x_109 = (*(tint_symbol_7)).arr[0];
+  int const x_109 = (*(tint_symbol_5)).arr[0];
   bool const x_110 = (x_109 == 5);
   x_116_phi = x_110;
   if (x_110) {
-    int const x_114 = (*(tint_symbol_5)).arr[0];
+    int const x_114 = (*(tint_symbol_3)).arr[0];
     x_115 = (x_114 == 6);
     x_116_phi = x_115;
   }
@@ -77,7 +77,7 @@
   return 0.0f;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread tint_array_wrapper_1* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread tint_array_wrapper_1* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int i_1 = 0;
   int param = 0;
   int param_1 = 0;
@@ -90,14 +90,14 @@
     }
     int const x_54 = i_1;
     param = x_54;
-    float const x_55 = func_i1_(&(param), tint_symbol_8, tint_symbol_9, tint_symbol_10);
+    float const x_55 = func_i1_(&(param), tint_symbol_6, tint_symbol_7, tint_symbol_8);
     int const x_56 = i_1;
     param_1 = x_56;
-    float const x_57 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_9, tint_symbol_10);
+    float const x_57 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_7, tint_symbol_8);
     if ((x_57 == 1.0f)) {
-      *(tint_symbol_11) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     } else {
-      *(tint_symbol_11) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     }
     {
       int const x_62 = i_1;
@@ -107,15 +107,21 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread tint_array_wrapper tint_symbol_13 = {};
-  thread tint_array_wrapper_1 tint_symbol_14 = {};
-  thread float4 tint_symbol_15 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(&(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14), &(tint_symbol_15));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper_1* const tint_symbol_12, thread float4* const tint_symbol_13) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(tint_symbol_11, tint_symbol_10, tint_symbol_12, tint_symbol_13);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_13)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+  thread float4 tint_symbol_14 = 0.0f;
+  thread tint_array_wrapper tint_symbol_15 = {};
+  thread tint_array_wrapper_1 tint_symbol_16 = {};
+  thread float4 tint_symbol_17 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl
index 86ba9e9..cd61498 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.hlsl
@@ -67,9 +67,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl
index 4063dcb..bb5f180 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func_i1_(thread int* const x, thread float4* const tint_symbol_4) {
+void func_i1_(thread int* const x, thread float4* const tint_symbol_3) {
   int a = 0;
   tint_array_wrapper data = {};
   tint_array_wrapper_1 temp = {};
@@ -66,14 +66,14 @@
   }
   bool const x_96 = x_96_phi;
   if (x_96) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-void main_1(thread float4* const tint_symbol_5) {
+void main_1(thread float4* const tint_symbol_4) {
   int i_1 = 0;
   int param = 0;
   i_1 = 1;
@@ -85,7 +85,7 @@
     }
     int const x_46 = i_1;
     param = x_46;
-    func_i1_(&(param), tint_symbol_5);
+    func_i1_(&(param), tint_symbol_4);
     {
       int const x_48 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
@@ -94,11 +94,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5) {
+  main_1(tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl
index 86ba9e9..cd61498 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.hlsl
@@ -67,9 +67,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl
index 4063dcb..bb5f180 100644
--- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func_i1_(thread int* const x, thread float4* const tint_symbol_4) {
+void func_i1_(thread int* const x, thread float4* const tint_symbol_3) {
   int a = 0;
   tint_array_wrapper data = {};
   tint_array_wrapper_1 temp = {};
@@ -66,14 +66,14 @@
   }
   bool const x_96 = x_96_phi;
   if (x_96) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-void main_1(thread float4* const tint_symbol_5) {
+void main_1(thread float4* const tint_symbol_4) {
   int i_1 = 0;
   int param = 0;
   i_1 = 1;
@@ -85,7 +85,7 @@
     }
     int const x_46 = i_1;
     param = x_46;
-    func_i1_(&(param), tint_symbol_5);
+    func_i1_(&(param), tint_symbol_4);
     {
       int const x_48 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
@@ -94,11 +94,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5) {
+  main_1(tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl
index 9ed54bc..475a276 100644
--- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.hlsl
@@ -36,10 +36,13 @@
   uint3 gl_LocalInvocationID_param : SV_GroupThreadID;
 };
 
-[numthreads(16, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_LocalInvocationID_param = tint_symbol.gl_LocalInvocationID_param;
+void main_inner(uint3 gl_LocalInvocationID_param) {
   gl_LocalInvocationID = gl_LocalInvocationID_param;
   main_1();
+}
+
+[numthreads(16, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_LocalInvocationID_param);
   return;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl
index 9d6a2d8..833620b 100644
--- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl
@@ -9,11 +9,11 @@
   /* 0x0000 */ packed_float2 injectionSwitch;
 };
 
-void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_2) {
+void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_1) {
   int lid = 0;
   int val = 0;
   int i = 0;
-  uint const x_40 = (*(tint_symbol_2)).x;
+  uint const x_40 = (*(tint_symbol_1)).x;
   lid = as_type<int>(x_40);
   int const x_43 = x_7.global_seed;
   val = x_43;
@@ -48,10 +48,14 @@
   return;
 }
 
+void tint_symbol_inner(constant buf1& x_10, device doesNotMatter& x_7, uint3 gl_LocalInvocationID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_LocalInvocationID_param;
+  main_1(x_10, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(1)]], device doesNotMatter& x_7 [[buffer(0)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_LocalInvocationID_param;
-  main_1(x_10, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_10, x_7, gl_LocalInvocationID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl
index 9ed54bc..475a276 100644
--- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.hlsl
@@ -36,10 +36,13 @@
   uint3 gl_LocalInvocationID_param : SV_GroupThreadID;
 };
 
-[numthreads(16, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_LocalInvocationID_param = tint_symbol.gl_LocalInvocationID_param;
+void main_inner(uint3 gl_LocalInvocationID_param) {
   gl_LocalInvocationID = gl_LocalInvocationID_param;
   main_1();
+}
+
+[numthreads(16, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_LocalInvocationID_param);
   return;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl
index 9d6a2d8..833620b 100644
--- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl
@@ -9,11 +9,11 @@
   /* 0x0000 */ packed_float2 injectionSwitch;
 };
 
-void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_2) {
+void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const tint_symbol_1) {
   int lid = 0;
   int val = 0;
   int i = 0;
-  uint const x_40 = (*(tint_symbol_2)).x;
+  uint const x_40 = (*(tint_symbol_1)).x;
   lid = as_type<int>(x_40);
   int const x_43 = x_7.global_seed;
   val = x_43;
@@ -48,10 +48,14 @@
   return;
 }
 
+void tint_symbol_inner(constant buf1& x_10, device doesNotMatter& x_7, uint3 gl_LocalInvocationID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_LocalInvocationID_param;
+  main_1(x_10, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(1)]], device doesNotMatter& x_7 [[buffer(0)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_LocalInvocationID_param;
-  main_1(x_10, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_10, x_7, gl_LocalInvocationID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl
index 896cc41..cf40a39 100644
--- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl
index f5bdadc..b3a2b1d 100644
--- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.spvasm.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool GLF_live12c5 = false;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_31 = x_5.injectionSwitch.y;
     if ((x_31 < 0.0f)) {
@@ -55,11 +55,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl
index 896cc41..cf40a39 100644
--- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl
index f5bdadc..b3a2b1d 100644
--- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool GLF_live12c5 = false;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_31 = x_5.injectionSwitch.y;
     if ((x_31 < 0.0f)) {
@@ -55,11 +55,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl
index 993c3df..da68b65 100644
--- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl
index 54b06ad..c50c71e 100644
--- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.spvasm.expected.msl
@@ -19,8 +19,8 @@
   return;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   while (true) {
     func_(x_6);
     if (false) {
@@ -28,15 +28,21 @@
       break;
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl
index 993c3df..da68b65 100644
--- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl
index 54b06ad..c50c71e 100644
--- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl.expected.msl
@@ -19,8 +19,8 @@
   return;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   while (true) {
     func_(x_6);
     if (false) {
@@ -28,15 +28,21 @@
       break;
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl
index b53ef96..1582403 100644
--- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   tint_array_wrapper data = {};
   int x_40 = 0;
   int x_40_phi = 0;
@@ -39,7 +39,7 @@
     x_54_phi = x_40;
     switch(int(x_47)) {
       case 78: {
-        *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
         /* fallthrough */
       }
       case 19: {
@@ -77,15 +77,21 @@
     }
   }
   data.arr[x_40] = 1;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl
index b53ef96..1582403 100644
--- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   tint_array_wrapper data = {};
   int x_40 = 0;
   int x_40_phi = 0;
@@ -39,7 +39,7 @@
     x_54_phi = x_40;
     switch(int(x_47)) {
       case 78: {
-        *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
         /* fallthrough */
       }
       case 19: {
@@ -77,15 +77,21 @@
     }
   }
   data.arr[x_40] = 1;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl
index 7bf030e..492bcf0 100644
--- a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.spvasm.expected.msl
@@ -11,23 +11,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_26 = x_5.injectionSwitch.x;
   if ((x_26 > 1.0f)) {
     while (true) {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
     }
     return;
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl
index 7bf030e..492bcf0 100644
--- a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl.expected.msl
@@ -11,23 +11,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_26 = x_5.injectionSwitch.x;
   if ((x_26 > 1.0f)) {
     while (true) {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
     }
     return;
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl
index f98d1d7..61d9c34 100644
--- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.hlsl
@@ -13,8 +13,8 @@
     S x_45 = (S)0;
     S x_45_phi = (S)0;
     int x_11_phi = 0;
-    const S tint_symbol_4 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
-    x_45_phi = tint_symbol_4;
+    const S tint_symbol_3 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
+    x_45_phi = tint_symbol_3;
     x_11_phi = 0;
     while (true) {
       S x_46 = (S)0;
@@ -68,11 +68,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl
index 85a576d..c6cb6b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl
@@ -8,33 +8,33 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int x_51 = 0;
   int x_12_phi = 0;
   while (true) {
     S x_45 = {};
     S x_45_phi = {};
     int x_11_phi = 0;
-    S const tint_symbol_4 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
-    x_45_phi = tint_symbol_4;
+    S const tint_symbol_2 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
+    x_45_phi = tint_symbol_2;
     x_11_phi = 0;
     while (true) {
       S x_46 = {};
       int x_9 = 0;
       x_45 = x_45_phi;
       int const x_11 = x_11_phi;
-      float const x_49 = (*(tint_symbol_6)).x;
+      float const x_49 = (*(tint_symbol_4)).x;
       x_51 = select(2, 1, (x_49 == 0.0f));
       if ((x_11 < x_51)) {
       } else {
         break;
       }
       {
-        *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
         x_46 = x_45;
         x_46.f0 = as_type<int>((as_type<uint>(x_45.f0) + as_type<uint>(1)));
         x_9 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
@@ -56,7 +56,7 @@
       break;
     }
     {
-      *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       x_6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(1)));
       x_12_phi = x_6;
     }
@@ -64,13 +64,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl
index f98d1d7..61d9c34 100644
--- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.hlsl
@@ -13,8 +13,8 @@
     S x_45 = (S)0;
     S x_45_phi = (S)0;
     int x_11_phi = 0;
-    const S tint_symbol_4 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
-    x_45_phi = tint_symbol_4;
+    const S tint_symbol_3 = {0, float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
+    x_45_phi = tint_symbol_3;
     x_11_phi = 0;
     while (true) {
       S x_46 = (S)0;
@@ -68,11 +68,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl
index 85a576d..c6cb6b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl
@@ -8,33 +8,33 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int x_51 = 0;
   int x_12_phi = 0;
   while (true) {
     S x_45 = {};
     S x_45_phi = {};
     int x_11_phi = 0;
-    S const tint_symbol_4 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
-    x_45_phi = tint_symbol_4;
+    S const tint_symbol_2 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))};
+    x_45_phi = tint_symbol_2;
     x_11_phi = 0;
     while (true) {
       S x_46 = {};
       int x_9 = 0;
       x_45 = x_45_phi;
       int const x_11 = x_11_phi;
-      float const x_49 = (*(tint_symbol_6)).x;
+      float const x_49 = (*(tint_symbol_4)).x;
       x_51 = select(2, 1, (x_49 == 0.0f));
       if ((x_11 < x_51)) {
       } else {
         break;
       }
       {
-        *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
         x_46 = x_45;
         x_46.f0 = as_type<int>((as_type<uint>(x_45.f0) + as_type<uint>(1)));
         x_9 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
@@ -56,7 +56,7 @@
       break;
     }
     {
-      *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       x_6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(1)));
       x_12_phi = x_6;
     }
@@ -64,13 +64,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl
index 626404f..f895653 100644
--- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl
index 8e00df9..76eb9ec 100644
--- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) {
+int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_3) {
   int GLF_live6index = 0;
   int GLF_live6currentNode = 0;
   GLF_live6index = 0;
@@ -24,7 +24,7 @@
       break;
     }
     int const x_10 = GLF_live6index;
-    int const x_11 = (*(tint_symbol_4)).arr[x_10];
+    int const x_11 = (*(tint_symbol_3)).arr[x_10];
     GLF_live6currentNode = x_11;
     int const x_12 = GLF_live6currentNode;
     if ((x_12 != 1)) {
@@ -35,21 +35,27 @@
   return 1;
 }
 
-void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float const x_40 = x_9.injectionSwitch.x;
   if ((x_40 > 1.0f)) {
-    int const x_13 = GLF_live6search_(tint_symbol_5);
+    int const x_13 = GLF_live6search_(tint_symbol_4);
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  main_1(x_9, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
-  thread tint_array_wrapper tint_symbol_7 = {};
-  thread float4 tint_symbol_8 = 0.0f;
-  main_1(x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_8 = {};
+  thread float4 tint_symbol_9 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl
index 626404f..f895653 100644
--- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl
index 8e00df9..76eb9ec 100644
--- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_4) {
+int GLF_live6search_(thread tint_array_wrapper* const tint_symbol_3) {
   int GLF_live6index = 0;
   int GLF_live6currentNode = 0;
   GLF_live6index = 0;
@@ -24,7 +24,7 @@
       break;
     }
     int const x_10 = GLF_live6index;
-    int const x_11 = (*(tint_symbol_4)).arr[x_10];
+    int const x_11 = (*(tint_symbol_3)).arr[x_10];
     GLF_live6currentNode = x_11;
     int const x_12 = GLF_live6currentNode;
     if ((x_12 != 1)) {
@@ -35,21 +35,27 @@
   return 1;
 }
 
-void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float const x_40 = x_9.injectionSwitch.x;
   if ((x_40 > 1.0f)) {
-    int const x_13 = GLF_live6search_(tint_symbol_5);
+    int const x_13 = GLF_live6search_(tint_symbol_4);
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  main_1(x_9, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
-  thread tint_array_wrapper tint_symbol_7 = {};
-  thread float4 tint_symbol_8 = 0.0f;
-  main_1(x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_8 = {};
+  thread float4 tint_symbol_9 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl
index 0ab6d5a..b9958ca 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl
@@ -199,11 +199,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl
index 7fd5883..d5becd4 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -264,7 +264,7 @@
   return float3(1.0f, 1.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_25, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 position = 0.0f;
   float2 param = 0.0f;
   float2 param_1 = 0.0f;
@@ -272,7 +272,7 @@
   float2 param_2 = 0.0f;
   float const x_161 = x_25.injectionSwitch.x;
   if ((x_161 >= 2.0f)) {
-    float4 const x_165 = *(tint_symbol_5);
+    float4 const x_165 = *(tint_symbol_3);
     position = float2(x_165.x, x_165.y);
     float2 const x_167 = position;
     param = x_167;
@@ -296,17 +296,23 @@
       }
     }
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_25, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_25, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_25, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_25, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl
index 1907070..4e46c3d 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.hlsl
@@ -227,11 +227,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl
index 5842374..8fcd116 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -264,7 +264,7 @@
   return float3(1.0f, 1.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_25, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 position = 0.0f;
   float2 param = 0.0f;
   float2 param_1 = 0.0f;
@@ -272,7 +272,7 @@
   float2 param_2 = 0.0f;
   float const x_161 = x_25.injectionSwitch.x;
   if ((x_161 >= 2.0f)) {
-    float4 const x_165 = *(tint_symbol_5);
+    float4 const x_165 = *(tint_symbol_3);
     position = float2(x_165.x, x_165.y);
     float2 const x_167 = position;
     param = x_167;
@@ -296,17 +296,23 @@
       }
     }
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_25, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_25, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_25 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_25, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_25, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl
index 96c79d3..4e2e246 100644
--- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.hlsl
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl
index c65a101..a676889 100644
--- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+float func_i1_(thread int* const b, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int ndx = 0;
   int i = 0;
   ndx = 0;
@@ -21,7 +21,7 @@
     } else {
       break;
     }
-    float const x_104 = (*(tint_symbol_5)).x;
+    float const x_104 = (*(tint_symbol_3)).x;
     if ((x_104 < 0.0f)) {
       i = 0;
       while (true) {
@@ -48,31 +48,31 @@
   if ((x_125 > 1)) {
     return 3.0f;
   }
-  float const x_130 = (*(tint_symbol_5)).x;
+  float const x_130 = (*(tint_symbol_3)).x;
   if ((x_130 < 0.0f)) {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return 5.0f;
 }
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   float f = 0.0f;
   int param = 0;
   int x_1 = 0;
   int param_1 = 0;
-  *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+  *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   f = 0.0f;
   while (true) {
-    float const x_54 = (*(tint_symbol_7)).y;
+    float const x_54 = (*(tint_symbol_5)).y;
     if ((int(x_54) < 0)) {
       discard_fragment();
     } else {
       float const x_61 = x_11.zero;
       param = int(x_61);
-      float const x_63 = func_i1_(&(param), tint_symbol_8, tint_symbol_7);
+      float const x_63 = func_i1_(&(param), tint_symbol_6, tint_symbol_5);
       f = x_63;
     }
-    float const x_65 = (*(tint_symbol_7)).y;
+    float const x_65 = (*(tint_symbol_5)).y;
     if ((int(x_65) > 65)) {
       discard_fragment();
     }
@@ -86,7 +86,7 @@
       }
       int const x_81 = x_1;
       param_1 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(10)));
-      float const x_83 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_7);
+      float const x_83 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_5);
       f = x_83;
       {
         int const x_84 = x_1;
@@ -103,20 +103,26 @@
   }
   float const x_90 = f;
   if ((x_90 == 3.0f)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_11, tint_symbol_8, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_11, &(tint_symbol_10), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl
index 96c79d3..4e2e246 100644
--- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.hlsl
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl
index c65a101..a676889 100644
--- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+float func_i1_(thread int* const b, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int ndx = 0;
   int i = 0;
   ndx = 0;
@@ -21,7 +21,7 @@
     } else {
       break;
     }
-    float const x_104 = (*(tint_symbol_5)).x;
+    float const x_104 = (*(tint_symbol_3)).x;
     if ((x_104 < 0.0f)) {
       i = 0;
       while (true) {
@@ -48,31 +48,31 @@
   if ((x_125 > 1)) {
     return 3.0f;
   }
-  float const x_130 = (*(tint_symbol_5)).x;
+  float const x_130 = (*(tint_symbol_3)).x;
   if ((x_130 < 0.0f)) {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return 5.0f;
 }
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   float f = 0.0f;
   int param = 0;
   int x_1 = 0;
   int param_1 = 0;
-  *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+  *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   f = 0.0f;
   while (true) {
-    float const x_54 = (*(tint_symbol_7)).y;
+    float const x_54 = (*(tint_symbol_5)).y;
     if ((int(x_54) < 0)) {
       discard_fragment();
     } else {
       float const x_61 = x_11.zero;
       param = int(x_61);
-      float const x_63 = func_i1_(&(param), tint_symbol_8, tint_symbol_7);
+      float const x_63 = func_i1_(&(param), tint_symbol_6, tint_symbol_5);
       f = x_63;
     }
-    float const x_65 = (*(tint_symbol_7)).y;
+    float const x_65 = (*(tint_symbol_5)).y;
     if ((int(x_65) > 65)) {
       discard_fragment();
     }
@@ -86,7 +86,7 @@
       }
       int const x_81 = x_1;
       param_1 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(10)));
-      float const x_83 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_7);
+      float const x_83 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_5);
       f = x_83;
       {
         int const x_84 = x_1;
@@ -103,20 +103,26 @@
   }
   float const x_90 = f;
   if ((x_90 == 3.0f)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_11, tint_symbol_8, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_11, &(tint_symbol_10), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl
index 01b699a..f144bdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl
index 1545462..cdcf6c0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 numbers = {};
   float2 a = 0.0f;
   float b = 0.0f;
@@ -59,20 +59,26 @@
     int const x_81 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_87 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_78), float(x_81), float(x_84), float(x_87));
+    *(tint_symbol_3) = float4(float(x_78), float(x_81), float(x_84), float(x_87));
   } else {
     int const x_91 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_92 = float(x_91);
-    *(tint_symbol_4) = float4(x_92, x_92, x_92, x_92);
+    *(tint_symbol_3) = float4(x_92, x_92, x_92, x_92);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl
index 01b699a..f144bdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl
index 1545462..cdcf6c0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 numbers = {};
   float2 a = 0.0f;
   float b = 0.0f;
@@ -59,20 +59,26 @@
     int const x_81 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_87 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_78), float(x_81), float(x_84), float(x_87));
+    *(tint_symbol_3) = float4(float(x_78), float(x_81), float(x_84), float(x_87));
   } else {
     int const x_91 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_92 = float(x_91);
-    *(tint_symbol_4) = float4(x_92, x_92, x_92, x_92);
+    *(tint_symbol_3) = float4(x_92, x_92, x_92, x_92);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl
index 897064d..f7df751 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl
index 007dbce..3c0bbb7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl
@@ -51,25 +51,31 @@
   return x_71;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float4 c = 0.0f;
   float const x_34 = func_(x_8);
   c = float4(x_34, 0.0f, 0.0f, 1.0f);
   float const x_36 = func_(x_8);
   if ((x_36 == 5.0f)) {
     float4 const x_41 = c;
-    *(tint_symbol_4) = x_41;
+    *(tint_symbol_3) = x_41;
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl
index 897064d..f7df751 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl
index 007dbce..3c0bbb7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl
@@ -51,25 +51,31 @@
   return x_71;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float4 c = 0.0f;
   float const x_34 = func_(x_8);
   c = float4(x_34, 0.0f, 0.0f, 1.0f);
   float const x_36 = func_(x_8);
   if ((x_36 == 5.0f)) {
     float4 const x_41 = c;
-    *(tint_symbol_4) = x_41;
+    *(tint_symbol_3) = x_41;
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl
index 810c81c..7d70ea9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.hlsl
@@ -46,11 +46,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl
index 6c4b3c8..6b0ac98 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl
@@ -24,20 +24,20 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int2 v = 0;
-  float const x_39 = (*(tint_symbol_5)).y;
+  float const x_39 = (*(tint_symbol_3)).y;
   float const x_41 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_39 < x_41)) {
     int const x_47 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_48 = float(x_47);
-    *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48);
+    *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
   } else {
-    float4 const x_50 = *(tint_symbol_5);
+    float4 const x_50 = *(tint_symbol_3);
     float const x_53 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_55 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_59 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -49,18 +49,24 @@
     int const x_74 = v.x;
     int const x_76 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_80 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_6) = float4(x_63, float((as_type<int>((as_type<uint>(x_65) - as_type<uint>(x_67))) & x_70)), float((x_74 & x_76)), x_80);
+    *(tint_symbol_4) = float4(x_63, float((as_type<int>((as_type<uint>(x_65) - as_type<uint>(x_67))) & x_70)), float((x_74 & x_76)), x_80);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl
index 810c81c..7d70ea9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.hlsl
@@ -46,11 +46,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl
index 6c4b3c8..6b0ac98 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl
@@ -24,20 +24,20 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int2 v = 0;
-  float const x_39 = (*(tint_symbol_5)).y;
+  float const x_39 = (*(tint_symbol_3)).y;
   float const x_41 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_39 < x_41)) {
     int const x_47 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_48 = float(x_47);
-    *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48);
+    *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
   } else {
-    float4 const x_50 = *(tint_symbol_5);
+    float4 const x_50 = *(tint_symbol_3);
     float const x_53 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_55 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_59 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -49,18 +49,24 @@
     int const x_74 = v.x;
     int const x_76 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_80 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_6) = float4(x_63, float((as_type<int>((as_type<uint>(x_65) - as_type<uint>(x_67))) & x_70)), float((x_74 & x_76)), x_80);
+    *(tint_symbol_4) = float4(x_63, float((as_type<int>((as_type<uint>(x_65) - as_type<uint>(x_67))) & x_70)), float((x_74 & x_76)), x_80);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl
index 7f591b1..52308d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.hlsl
@@ -24,9 +24,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl
index 7cbea1f..7baf635 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 v = 0.0f;
   float d = 0.0f;
   int const x_35 = x_6.two;
@@ -20,18 +20,24 @@
   d = distance(x_39, float2(1.159279943f, 0.64349997f));
   float const x_41 = d;
   if ((x_41 < 0.01f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl
index 7f591b1..52308d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.hlsl
@@ -24,9 +24,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl
index 7cbea1f..7baf635 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 v = 0.0f;
   float d = 0.0f;
   int const x_35 = x_6.two;
@@ -20,18 +20,24 @@
   d = distance(x_39, float2(1.159279943f, 0.64349997f));
   float const x_41 = d;
   if ((x_41 < 0.01f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl
index b8826cf..c4f79bd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl
index 95cc7fb..6e62aae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float nan = 0.0f;
   float4 undefined = 0.0f;
   bool x_83 = false;
@@ -60,20 +60,26 @@
     int const x_92 = x_7.x_GLF_uniform_int_values.arr[8].el;
     int const x_95 = x_7.x_GLF_uniform_int_values.arr[8].el;
     int const x_98 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
+    *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
   } else {
     int const x_102 = x_7.x_GLF_uniform_int_values.arr[8].el;
     float const x_103 = float(x_102);
-    *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103);
+    *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl
index b8826cf..c4f79bd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl
index 95cc7fb..6e62aae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float nan = 0.0f;
   float4 undefined = 0.0f;
   bool x_83 = false;
@@ -60,20 +60,26 @@
     int const x_92 = x_7.x_GLF_uniform_int_values.arr[8].el;
     int const x_95 = x_7.x_GLF_uniform_int_values.arr[8].el;
     int const x_98 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
+    *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
   } else {
     int const x_102 = x_7.x_GLF_uniform_int_values.arr[8].el;
     float const x_103 = float(x_102);
-    *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103);
+    *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl
index c5053c4..fa6f99a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl
index 7e3095b..7a82ca4 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   float undefined = 0.0f;
   bool x_51 = false;
   bool x_52_phi = false;
@@ -50,20 +50,26 @@
     int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_17 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_18 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
+    *(tint_symbol_3) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
   } else {
     int const x_19 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_66 = float(x_19);
-    *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66);
+    *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl
index 84838ef..c21b5ad 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl
index 05942bc..ab0ee7b 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   float undefined = 0.0f;
   bool x_51 = false;
   bool x_52_phi = false;
@@ -50,20 +50,26 @@
     int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_17 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_18 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
+    *(tint_symbol_3) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
   } else {
     int const x_19 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_66 = float(x_19);
-    *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66);
+    *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl
index 0886ad0..f08846b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
index d72281e..63a5368 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_8, thread float4* const tint_symbol_3) {
   float f0 = 0.0f;
   float s1 = 0.0f;
   float f1 = 0.0f;
@@ -79,20 +79,26 @@
     int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_90 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_81), float(x_84), float(x_87), float(x_90));
+    *(tint_symbol_3) = float4(float(x_81), float(x_84), float(x_87), float(x_90));
   } else {
     int const x_94 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_95 = float(x_94);
-    *(tint_symbol_4) = float4(x_95, x_95, x_95, x_95);
+    *(tint_symbol_3) = float4(x_95, x_95, x_95, x_95);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl
index 134d1e5..e84ccc9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl
@@ -80,9 +80,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
index a8cf684..058c094 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_8, thread float4* const tint_symbol_3) {
   float f0 = 0.0f;
   float s1 = 0.0f;
   float f1 = 0.0f;
@@ -79,20 +79,26 @@
     int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_90 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_81), float(x_84), float(x_87), float(x_90));
+    *(tint_symbol_3) = float4(float(x_81), float(x_84), float(x_87), float(x_90));
   } else {
     int const x_94 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_95 = float(x_94);
-    *(tint_symbol_4) = float4(x_95, x_95, x_95, x_95);
+    *(tint_symbol_3) = float4(x_95, x_95, x_95, x_95);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl
index c006c3f..427a06e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl
index 9237c80..afdf0a0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float4 I = 0.0f;
   float4 N = 0.0f;
   float4 R = 0.0f;
@@ -55,20 +55,26 @@
     int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
+    *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
   } else {
     int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_89 = float(x_88);
-    *(tint_symbol_4) = float4(x_89, x_89, x_89, x_89);
+    *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl
index c006c3f..427a06e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl
index 9237c80..afdf0a0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float4 I = 0.0f;
   float4 N = 0.0f;
   float4 R = 0.0f;
@@ -55,20 +55,26 @@
     int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
+    *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
   } else {
     int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_89 = float(x_88);
-    *(tint_symbol_4) = float4(x_89, x_89, x_89, x_89);
+    *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl
index ed5eaec..b61eb9d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl
index bea3fa4..41d7b01 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float undefined = 0.0f;
   bool x_45 = false;
   bool x_46_phi = false;
@@ -48,20 +48,26 @@
     int const x_13 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_14 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_15 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_12), float(x_13), float(x_14), float(x_15));
+    *(tint_symbol_3) = float4(float(x_12), float(x_13), float(x_14), float(x_15));
   } else {
     int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_60 = float(x_16);
-    *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+    *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl
index a6d9593..9b834f7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl
index 7a89ea8..1e7b6c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float undefined = 0.0f;
   bool x_45 = false;
   bool x_46_phi = false;
@@ -48,20 +48,26 @@
     int const x_13 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_14 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_15 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_12), float(x_13), float(x_14), float(x_15));
+    *(tint_symbol_3) = float4(float(x_12), float(x_13), float(x_14), float(x_15));
   } else {
     int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_60 = float(x_16);
-    *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+    *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl
index f7fa990..27fad2b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl
index 1659188..5c3bb08 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float dist1 = 0.0f;
   float dist2 = 0.0f;
@@ -22,18 +22,24 @@
   float const x_41 = dist1;
   float const x_43 = dist2;
   if (((x_41 < 0.100000001f) & (x_43 < 0.100000001f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl
index 5cb60bd..3d2c160 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl
index 3b940f3..1881300 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float dist1 = 0.0f;
   float dist2 = 0.0f;
@@ -22,18 +22,24 @@
   float const x_41 = dist1;
   float const x_43 = dist2;
   if (((x_41 < 0.100000001f) && (x_43 < 0.100000001f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl
index 4a1c25c..1f0d1c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.hlsl
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl
index 8009725..5a4b18d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_3) {
   float3x4 m0 = float3x4(0.0f);
   float3x4 m1 = float3x4(0.0f);
   float3 undefined = 0.0f;
@@ -75,26 +75,32 @@
     int const x_31 = x_6.x_GLF_uniform_int_values.arr[9].el;
     int const x_32 = x_6.x_GLF_uniform_int_values.arr[9].el;
     int const x_33 = x_6.x_GLF_uniform_int_values.arr[4].el;
-    *(tint_symbol_4) = float4(float(x_30), float(x_31), float(x_32), float(x_33));
+    *(tint_symbol_3) = float4(float(x_30), float(x_31), float(x_32), float(x_33));
   } else {
     int const x_34 = x_6.x_GLF_uniform_int_values.arr[9].el;
     float const x_146 = float(x_34);
-    *(tint_symbol_4) = float4(x_146, x_146, x_146, x_146);
+    *(tint_symbol_3) = float4(x_146, x_146, x_146, x_146);
   }
   float const x_149 = v0.x;
   float const x_151 = v1.x;
   if ((x_149 < x_151)) {
     float const x_156 = x_15.x_GLF_uniform_float_values.arr[0].el;
-    (*(tint_symbol_4)).y = x_156;
+    (*(tint_symbol_3)).y = x_156;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_15, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_15, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_15, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl
index 4a1c25c..1f0d1c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.hlsl
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl
index 8009725..5a4b18d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_3) {
   float3x4 m0 = float3x4(0.0f);
   float3x4 m1 = float3x4(0.0f);
   float3 undefined = 0.0f;
@@ -75,26 +75,32 @@
     int const x_31 = x_6.x_GLF_uniform_int_values.arr[9].el;
     int const x_32 = x_6.x_GLF_uniform_int_values.arr[9].el;
     int const x_33 = x_6.x_GLF_uniform_int_values.arr[4].el;
-    *(tint_symbol_4) = float4(float(x_30), float(x_31), float(x_32), float(x_33));
+    *(tint_symbol_3) = float4(float(x_30), float(x_31), float(x_32), float(x_33));
   } else {
     int const x_34 = x_6.x_GLF_uniform_int_values.arr[9].el;
     float const x_146 = float(x_34);
-    *(tint_symbol_4) = float4(x_146, x_146, x_146, x_146);
+    *(tint_symbol_3) = float4(x_146, x_146, x_146, x_146);
   }
   float const x_149 = v0.x;
   float const x_151 = v1.x;
   if ((x_149 < x_151)) {
     float const x_156 = x_15.x_GLF_uniform_float_values.arr[0].el;
-    (*(tint_symbol_4)).y = x_156;
+    (*(tint_symbol_3)).y = x_156;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_15, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_15, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_15, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_15, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl
index 7fc33ee..7fed836 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl
index 1b780b8..62f0616 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   float4 v = 0.0f;
   int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -36,7 +36,7 @@
     if ((int(x_42) > x_44)) {
       int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el;
       float const x_50 = float(x_49);
-      *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50);
+      *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
       return;
     }
     {
@@ -48,15 +48,21 @@
   int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+  *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl
index 7fc33ee..7fed836 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl
index 1b780b8..62f0616 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   float4 v = 0.0f;
   int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -36,7 +36,7 @@
     if ((int(x_42) > x_44)) {
       int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el;
       float const x_50 = float(x_49);
-      *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50);
+      *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
       return;
     }
     {
@@ -48,15 +48,21 @@
   int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+  *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl
index 82c801a..4b0f991 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.hlsl
@@ -15,8 +15,8 @@
   const int x_40 = asint(x_7[1].x);
   const int x_42 = asint(x_7[1].x);
   const int x_44 = asint(x_7[1].x);
-  const int tint_symbol_6[3] = {x_40, x_42, x_44};
-  arr = tint_symbol_6;
+  const int tint_symbol_5[3] = {x_40, x_42, x_44};
+  arr = tint_symbol_5;
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_47 = asint(x_7[scalar_offset / 4][scalar_offset % 4]);
   const int x_49 = arr[x_47];
@@ -58,11 +58,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl
index 24f173c..ace5774 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper_2 arr = {};
   int a = 0;
   int b = 0;
@@ -39,14 +39,14 @@
   int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_44 = x_7.x_GLF_uniform_int_values.arr[1].el;
-  tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_40, x_42, x_44}};
-  arr = tint_symbol_4;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}};
+  arr = tint_symbol_2;
   int const x_47 = x_7.x_GLF_uniform_int_values.arr[0].el;
   int const x_49 = arr.arr[x_47];
   a = x_49;
   int const x_50 = a;
   b = as_type<int>((as_type<uint>(x_50) - as_type<uint>(1)));
-  float const x_53 = (*(tint_symbol_6)).x;
+  float const x_53 = (*(tint_symbol_4)).x;
   float const x_55 = x_11.x_GLF_uniform_float_values.arr[0].el;
   if ((x_53 < x_55)) {
     int const x_59 = b;
@@ -67,17 +67,23 @@
   int const x_84 = arr.arr[x_82];
   int const x_87 = x_7.x_GLF_uniform_int_values.arr[2].el;
   int const x_89 = arr.arr[x_87];
-  *(tint_symbol_7) = float4(float(x_74), float(x_79), float(x_84), float(x_89));
+  *(tint_symbol_5) = float4(float(x_74), float(x_79), float(x_84), float(x_89));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl
index 82c801a..4b0f991 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.hlsl
@@ -15,8 +15,8 @@
   const int x_40 = asint(x_7[1].x);
   const int x_42 = asint(x_7[1].x);
   const int x_44 = asint(x_7[1].x);
-  const int tint_symbol_6[3] = {x_40, x_42, x_44};
-  arr = tint_symbol_6;
+  const int tint_symbol_5[3] = {x_40, x_42, x_44};
+  arr = tint_symbol_5;
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_47 = asint(x_7[scalar_offset / 4][scalar_offset % 4]);
   const int x_49 = arr[x_47];
@@ -58,11 +58,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl
index 24f173c..ace5774 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper_2 arr = {};
   int a = 0;
   int b = 0;
@@ -39,14 +39,14 @@
   int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_44 = x_7.x_GLF_uniform_int_values.arr[1].el;
-  tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_40, x_42, x_44}};
-  arr = tint_symbol_4;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}};
+  arr = tint_symbol_2;
   int const x_47 = x_7.x_GLF_uniform_int_values.arr[0].el;
   int const x_49 = arr.arr[x_47];
   a = x_49;
   int const x_50 = a;
   b = as_type<int>((as_type<uint>(x_50) - as_type<uint>(1)));
-  float const x_53 = (*(tint_symbol_6)).x;
+  float const x_53 = (*(tint_symbol_4)).x;
   float const x_55 = x_11.x_GLF_uniform_float_values.arr[0].el;
   if ((x_53 < x_55)) {
     int const x_59 = b;
@@ -67,17 +67,23 @@
   int const x_84 = arr.arr[x_82];
   int const x_87 = x_7.x_GLF_uniform_int_values.arr[2].el;
   int const x_89 = arr.arr[x_87];
-  *(tint_symbol_7) = float4(float(x_74), float(x_79), float(x_84), float(x_89));
+  *(tint_symbol_5) = float4(float(x_74), float(x_79), float(x_84), float(x_89));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl
index de01a1a..34f8a21 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.hlsl
@@ -30,8 +30,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_75 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
   const int x_77 = asint(x_6[10].x);
-  const int tint_symbol_3[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77};
-  arr0 = tint_symbol_3;
+  const int tint_symbol_2[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77};
+  arr0 = tint_symbol_2;
   const int x_80 = asint(x_6[1].x);
   const int x_82 = asint(x_6[12].x);
   const int x_84 = asint(x_6[15].x);
@@ -42,8 +42,8 @@
   const int x_94 = asint(x_6[11].x);
   const int x_96 = asint(x_6[18].x);
   const int x_98 = asint(x_6[19].x);
-  const int tint_symbol_4[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98};
-  arr1 = tint_symbol_4;
+  const int tint_symbol_3[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98};
+  arr1 = tint_symbol_3;
   const int x_101 = asint(x_6[8].x);
   a = x_101;
   while (true) {
@@ -137,8 +137,8 @@
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
   const int x_212 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
   const int x_214 = asint(x_6[10].x);
-  const int tint_symbol_5[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214};
-  ref0 = tint_symbol_5;
+  const int tint_symbol_4[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214};
+  ref0 = tint_symbol_4;
   const int x_217 = asint(x_6[11].x);
   const int x_219 = asint(x_6[12].x);
   const int x_221 = asint(x_6[11].x);
@@ -149,8 +149,8 @@
   const int x_231 = asint(x_6[11].x);
   const int x_233 = asint(x_6[18].x);
   const int x_235 = asint(x_6[19].x);
-  const int tint_symbol_6[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235};
-  ref1 = tint_symbol_6;
+  const int tint_symbol_5[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235};
+  ref1 = tint_symbol_5;
   const int x_238 = asint(x_6[2].x);
   const int x_241 = asint(x_6[3].x);
   const int x_244 = asint(x_6[3].x);
@@ -196,9 +196,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl
index 60b542a..fdc26d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl
@@ -24,7 +24,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper_1 arr0 = {};
   tint_array_wrapper_1 arr1 = {};
   int a = 0;
@@ -47,8 +47,8 @@
   int const x_73 = x_6.x_GLF_uniform_int_values.arr[9].el;
   int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_77 = x_6.x_GLF_uniform_int_values.arr[10].el;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}};
-  arr0 = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}};
+  arr0 = tint_symbol_2;
   int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_82 = x_6.x_GLF_uniform_int_values.arr[12].el;
   int const x_84 = x_6.x_GLF_uniform_int_values.arr[15].el;
@@ -59,8 +59,8 @@
   int const x_94 = x_6.x_GLF_uniform_int_values.arr[11].el;
   int const x_96 = x_6.x_GLF_uniform_int_values.arr[18].el;
   int const x_98 = x_6.x_GLF_uniform_int_values.arr[19].el;
-  tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}};
-  arr1 = tint_symbol_4;
+  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}};
+  arr1 = tint_symbol_3;
   int const x_101 = x_6.x_GLF_uniform_int_values.arr[8].el;
   a = x_101;
   while (true) {
@@ -169,8 +169,8 @@
   int const x_210 = x_6.x_GLF_uniform_int_values.arr[9].el;
   int const x_212 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_214 = x_6.x_GLF_uniform_int_values.arr[10].el;
-  tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}};
-  ref0 = tint_symbol_5;
+  tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}};
+  ref0 = tint_symbol_4;
   int const x_217 = x_6.x_GLF_uniform_int_values.arr[11].el;
   int const x_219 = x_6.x_GLF_uniform_int_values.arr[12].el;
   int const x_221 = x_6.x_GLF_uniform_int_values.arr[11].el;
@@ -181,13 +181,13 @@
   int const x_231 = x_6.x_GLF_uniform_int_values.arr[11].el;
   int const x_233 = x_6.x_GLF_uniform_int_values.arr[18].el;
   int const x_235 = x_6.x_GLF_uniform_int_values.arr[19].el;
-  tint_array_wrapper_1 const tint_symbol_6 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}};
-  ref1 = tint_symbol_6;
+  tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}};
+  ref1 = tint_symbol_5;
   int const x_238 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_241 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_244 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_247 = x_6.x_GLF_uniform_int_values.arr[2].el;
-  *(tint_symbol_8) = float4(float(x_238), float(x_241), float(x_244), float(x_247));
+  *(tint_symbol_7) = float4(float(x_238), float(x_241), float(x_244), float(x_247));
   int const x_251 = x_6.x_GLF_uniform_int_values.arr[3].el;
   i = x_251;
   while (true) {
@@ -217,7 +217,7 @@
     if (x_278) {
       int const x_282 = x_6.x_GLF_uniform_int_values.arr[3].el;
       float const x_283 = float(x_282);
-      *(tint_symbol_8) = float4(x_283, x_283, x_283, x_283);
+      *(tint_symbol_7) = float4(x_283, x_283, x_283, x_283);
     }
     {
       int const x_285 = i;
@@ -227,11 +227,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_8) {
+  main_1(x_6, tint_symbol_8);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_6;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
-  main_1(x_6, &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl
index de01a1a..34f8a21 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.hlsl
@@ -30,8 +30,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_75 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
   const int x_77 = asint(x_6[10].x);
-  const int tint_symbol_3[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77};
-  arr0 = tint_symbol_3;
+  const int tint_symbol_2[10] = {x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77};
+  arr0 = tint_symbol_2;
   const int x_80 = asint(x_6[1].x);
   const int x_82 = asint(x_6[12].x);
   const int x_84 = asint(x_6[15].x);
@@ -42,8 +42,8 @@
   const int x_94 = asint(x_6[11].x);
   const int x_96 = asint(x_6[18].x);
   const int x_98 = asint(x_6[19].x);
-  const int tint_symbol_4[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98};
-  arr1 = tint_symbol_4;
+  const int tint_symbol_3[10] = {x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98};
+  arr1 = tint_symbol_3;
   const int x_101 = asint(x_6[8].x);
   a = x_101;
   while (true) {
@@ -137,8 +137,8 @@
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
   const int x_212 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
   const int x_214 = asint(x_6[10].x);
-  const int tint_symbol_5[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214};
-  ref0 = tint_symbol_5;
+  const int tint_symbol_4[10] = {x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214};
+  ref0 = tint_symbol_4;
   const int x_217 = asint(x_6[11].x);
   const int x_219 = asint(x_6[12].x);
   const int x_221 = asint(x_6[11].x);
@@ -149,8 +149,8 @@
   const int x_231 = asint(x_6[11].x);
   const int x_233 = asint(x_6[18].x);
   const int x_235 = asint(x_6[19].x);
-  const int tint_symbol_6[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235};
-  ref1 = tint_symbol_6;
+  const int tint_symbol_5[10] = {x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235};
+  ref1 = tint_symbol_5;
   const int x_238 = asint(x_6[2].x);
   const int x_241 = asint(x_6[3].x);
   const int x_244 = asint(x_6[3].x);
@@ -196,9 +196,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl
index 60b542a..fdc26d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl
@@ -24,7 +24,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper_1 arr0 = {};
   tint_array_wrapper_1 arr1 = {};
   int a = 0;
@@ -47,8 +47,8 @@
   int const x_73 = x_6.x_GLF_uniform_int_values.arr[9].el;
   int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_77 = x_6.x_GLF_uniform_int_values.arr[10].el;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}};
-  arr0 = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}};
+  arr0 = tint_symbol_2;
   int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_82 = x_6.x_GLF_uniform_int_values.arr[12].el;
   int const x_84 = x_6.x_GLF_uniform_int_values.arr[15].el;
@@ -59,8 +59,8 @@
   int const x_94 = x_6.x_GLF_uniform_int_values.arr[11].el;
   int const x_96 = x_6.x_GLF_uniform_int_values.arr[18].el;
   int const x_98 = x_6.x_GLF_uniform_int_values.arr[19].el;
-  tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}};
-  arr1 = tint_symbol_4;
+  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}};
+  arr1 = tint_symbol_3;
   int const x_101 = x_6.x_GLF_uniform_int_values.arr[8].el;
   a = x_101;
   while (true) {
@@ -169,8 +169,8 @@
   int const x_210 = x_6.x_GLF_uniform_int_values.arr[9].el;
   int const x_212 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_214 = x_6.x_GLF_uniform_int_values.arr[10].el;
-  tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}};
-  ref0 = tint_symbol_5;
+  tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}};
+  ref0 = tint_symbol_4;
   int const x_217 = x_6.x_GLF_uniform_int_values.arr[11].el;
   int const x_219 = x_6.x_GLF_uniform_int_values.arr[12].el;
   int const x_221 = x_6.x_GLF_uniform_int_values.arr[11].el;
@@ -181,13 +181,13 @@
   int const x_231 = x_6.x_GLF_uniform_int_values.arr[11].el;
   int const x_233 = x_6.x_GLF_uniform_int_values.arr[18].el;
   int const x_235 = x_6.x_GLF_uniform_int_values.arr[19].el;
-  tint_array_wrapper_1 const tint_symbol_6 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}};
-  ref1 = tint_symbol_6;
+  tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}};
+  ref1 = tint_symbol_5;
   int const x_238 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_241 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_244 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_247 = x_6.x_GLF_uniform_int_values.arr[2].el;
-  *(tint_symbol_8) = float4(float(x_238), float(x_241), float(x_244), float(x_247));
+  *(tint_symbol_7) = float4(float(x_238), float(x_241), float(x_244), float(x_247));
   int const x_251 = x_6.x_GLF_uniform_int_values.arr[3].el;
   i = x_251;
   while (true) {
@@ -217,7 +217,7 @@
     if (x_278) {
       int const x_282 = x_6.x_GLF_uniform_int_values.arr[3].el;
       float const x_283 = float(x_282);
-      *(tint_symbol_8) = float4(x_283, x_283, x_283, x_283);
+      *(tint_symbol_7) = float4(x_283, x_283, x_283, x_283);
     }
     {
       int const x_285 = i;
@@ -227,11 +227,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_8) {
+  main_1(x_6, tint_symbol_8);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_6;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
-  main_1(x_6, &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl
index 841bebf..ade1ece 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.hlsl
@@ -86,9 +86,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl
index f541d0e..de0a874 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v1 = 0.0f;
   float4 v2 = 0.0f;
   float4 v3 = 0.0f;
@@ -44,7 +44,7 @@
   float4 const x_54 = v3;
   v4 = smoothstep(x_52, x_53, x_54);
   float4 const x_56 = v4;
-  *(tint_symbol_4) = float4(x_56.x, x_56.y, x_56.w, x_56.x);
+  *(tint_symbol_3) = float4(x_56.x, x_56.y, x_56.w, x_56.x);
   float const x_59 = v4.x;
   float const x_61 = x_6.x_GLF_uniform_float_values.arr[4].el;
   bool const x_62 = (x_59 > x_61);
@@ -85,19 +85,25 @@
     float const x_101 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_103 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_105 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_99, x_101, x_103, x_105);
+    *(tint_symbol_3) = float4(x_99, x_101, x_103, x_105);
   } else {
     float const x_108 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_108, x_108, x_108, x_108);
+    *(tint_symbol_3) = float4(x_108, x_108, x_108, x_108);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl
index 2624127..26aeb1f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl
@@ -86,9 +86,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl
index 66032b1..b77e17c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v1 = 0.0f;
   float4 v2 = 0.0f;
   float4 v3 = 0.0f;
@@ -44,7 +44,7 @@
   float4 const x_54 = v3;
   v4 = smoothstep(x_52, x_53, x_54);
   float4 const x_56 = v4;
-  *(tint_symbol_4) = float4(x_56.x, x_56.y, x_56.w, x_56.x);
+  *(tint_symbol_3) = float4(x_56.x, x_56.y, x_56.w, x_56.x);
   float const x_59 = v4.x;
   float const x_61 = x_6.x_GLF_uniform_float_values.arr[4].el;
   bool const x_62 = (x_59 > x_61);
@@ -85,19 +85,25 @@
     float const x_101 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_103 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_105 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_99, x_101, x_103, x_105);
+    *(tint_symbol_3) = float4(x_99, x_101, x_103, x_105);
   } else {
     float const x_108 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_108, x_108, x_108, x_108);
+    *(tint_symbol_3) = float4(x_108, x_108, x_108, x_108);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl
index be0338b..d25ae2c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl
index 7559de0..12462b9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float f = 0.0f;
   bool x_56 = false;
@@ -55,20 +55,26 @@
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_68 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
+    *(tint_symbol_3) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
   } else {
     int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_76 = float(x_75);
-    *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76);
+    *(tint_symbol_3) = float4(x_76, x_76, x_76, x_76);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl
index be0338b..d25ae2c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl
index 7559de0..12462b9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float f = 0.0f;
   bool x_56 = false;
@@ -55,20 +55,26 @@
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_68 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
+    *(tint_symbol_3) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
   } else {
     int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_76 = float(x_75);
-    *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76);
+    *(tint_symbol_3) = float4(x_76, x_76, x_76, x_76);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl
index 89cd260..a5a977a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return x_49;
 }
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int param = 0;
@@ -44,18 +44,24 @@
     }
   }
   if ((x_37 == as_type<int>(3))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl
index 89cd260..a5a977a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl
@@ -20,7 +20,7 @@
   return x_49;
 }
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int param = 0;
@@ -44,18 +44,24 @@
     }
   }
   if ((x_37 == as_type<int>(3))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl
index ff5511e..8139112 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl
index 1cfbbb0..f7867d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl
@@ -24,15 +24,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_5) {
+int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 256;
-  float const x_65 = (*(tint_symbol_5)).y;
+  float const x_65 = (*(tint_symbol_3)).y;
   float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_65 > x_67)) {
     int const x_71 = a;
@@ -50,9 +50,9 @@
   return x_83;
 }
 
-void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int a_1 = 0;
-  int const x_38 = f1_(x_8, x_11, tint_symbol_6);
+  int const x_38 = f1_(x_8, x_11, tint_symbol_4);
   a_1 = x_38;
   int const x_39 = a_1;
   int const x_41 = x_11.x_GLF_uniform_int_values.arr[2].el;
@@ -61,22 +61,28 @@
     int const x_50 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_11.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_7) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
+    *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
   } else {
     int const x_60 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_61 = float(x_60);
-    *(tint_symbol_7) = float4(x_61, x_61, x_61, x_61);
+    *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl
index ff5511e..8139112 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl
index 1cfbbb0..f7867d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl
@@ -24,15 +24,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_5) {
+int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 256;
-  float const x_65 = (*(tint_symbol_5)).y;
+  float const x_65 = (*(tint_symbol_3)).y;
   float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_65 > x_67)) {
     int const x_71 = a;
@@ -50,9 +50,9 @@
   return x_83;
 }
 
-void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int a_1 = 0;
-  int const x_38 = f1_(x_8, x_11, tint_symbol_6);
+  int const x_38 = f1_(x_8, x_11, tint_symbol_4);
   a_1 = x_38;
   int const x_39 = a_1;
   int const x_41 = x_11.x_GLF_uniform_int_values.arr[2].el;
@@ -61,22 +61,28 @@
     int const x_50 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_11.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_7) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
+    *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
   } else {
     int const x_60 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_61 = float(x_60);
-    *(tint_symbol_7) = float4(x_61, x_61, x_61, x_61);
+    *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl
index d241a8e..ef9a28d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.hlsl
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl
index be7c5a2..d0803c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_28 = 0;
   int x_29 = 0;
   int x_28_phi = 0;
@@ -56,20 +56,26 @@
     float const x_51 = float(x_50);
     int const x_53 = x_5.x_GLF_uniform_int_values.arr[1].el;
     float const x_54 = float(x_53);
-    *(tint_symbol_4) = float4(x_51, x_54, x_54, x_51);
+    *(tint_symbol_3) = float4(x_51, x_54, x_54, x_51);
   } else {
     int const x_57 = x_5.x_GLF_uniform_int_values.arr[1].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl
index d241a8e..ef9a28d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.hlsl
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl
index be7c5a2..d0803c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_28 = 0;
   int x_29 = 0;
   int x_28_phi = 0;
@@ -56,20 +56,26 @@
     float const x_51 = float(x_50);
     int const x_53 = x_5.x_GLF_uniform_int_values.arr[1].el;
     float const x_54 = float(x_53);
-    *(tint_symbol_4) = float4(x_51, x_54, x_54, x_51);
+    *(tint_symbol_3) = float4(x_51, x_54, x_54, x_51);
   } else {
     int const x_57 = x_5.x_GLF_uniform_int_values.arr[1].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl
index 53fa4d4..039913f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl
index d5bab81..7a45463 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) {
   int a = 0;
   int x_32 = 0;
   float const x_34 = x_6.zero;
@@ -52,20 +52,26 @@
     int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_66 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
+    *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
   } else {
     int const x_70 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_71 = float(x_70);
-    *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71);
+    *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl
index 53fa4d4..039913f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl
index d5bab81..7a45463 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) {
   int a = 0;
   int x_32 = 0;
   float const x_34 = x_6.zero;
@@ -52,20 +52,26 @@
     int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_66 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
+    *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
   } else {
     int const x_70 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_71 = float(x_70);
-    *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71);
+    *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf2& x_6, constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl
index 400e058..53ef080 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.hlsl
@@ -92,11 +92,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl
index b50ffb6..6f4d4bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl
@@ -4,11 +4,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 c = 0.0f;
   int a = 0;
   int i1 = 0;
@@ -124,7 +124,7 @@
         }
       }
       {
-        float const x_123 = (*(tint_symbol_5)).x;
+        float const x_123 = (*(tint_symbol_3)).x;
         if ((x_123 < -1.0f)) {
         } else {
           break;
@@ -132,7 +132,7 @@
       }
     }
     {
-      float const x_126 = (*(tint_symbol_5)).y;
+      float const x_126 = (*(tint_symbol_3)).y;
       if ((x_126 < -1.0f)) {
       } else {
         break;
@@ -140,17 +140,23 @@
     }
   }
   float4 const x_128 = c;
-  *(tint_symbol_6) = x_128;
+  *(tint_symbol_4) = x_128;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl
index 400e058..53ef080 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.hlsl
@@ -92,11 +92,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl
index b50ffb6..6f4d4bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl
@@ -4,11 +4,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 c = 0.0f;
   int a = 0;
   int i1 = 0;
@@ -124,7 +124,7 @@
         }
       }
       {
-        float const x_123 = (*(tint_symbol_5)).x;
+        float const x_123 = (*(tint_symbol_3)).x;
         if ((x_123 < -1.0f)) {
         } else {
           break;
@@ -132,7 +132,7 @@
       }
     }
     {
-      float const x_126 = (*(tint_symbol_5)).y;
+      float const x_126 = (*(tint_symbol_3)).y;
       if ((x_126 < -1.0f)) {
       } else {
         break;
@@ -140,17 +140,23 @@
     }
   }
   float4 const x_128 = c;
-  *(tint_symbol_6) = x_128;
+  *(tint_symbol_4) = x_128;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl
index 2d3af22..dc1d29c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.hlsl
@@ -120,9 +120,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl
index 0972c1e..c933708 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 sums = {};
   int a = 0;
   int b = 0;
@@ -138,20 +138,26 @@
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_49), float(x_50), float(x_51), float(x_52));
+    *(tint_symbol_3) = float4(float(x_49), float(x_50), float(x_51), float(x_52));
   } else {
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_173 = float(x_53);
-    *(tint_symbol_4) = float4(x_173, x_173, x_173, x_173);
+    *(tint_symbol_3) = float4(x_173, x_173, x_173, x_173);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl
index 2d3af22..dc1d29c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.hlsl
@@ -120,9 +120,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl
index 0972c1e..c933708 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 sums = {};
   int a = 0;
   int b = 0;
@@ -138,20 +138,26 @@
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_49), float(x_50), float(x_51), float(x_52));
+    *(tint_symbol_3) = float4(float(x_49), float(x_50), float(x_51), float(x_52));
   } else {
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_173 = float(x_53);
-    *(tint_symbol_4) = float4(x_173, x_173, x_173, x_173);
+    *(tint_symbol_3) = float4(x_173, x_173, x_173, x_173);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl
index 77a66e8..d2b9503 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl
index 739634a..c2932f4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = 142.699996948f;
   float const x_25 = f;
@@ -27,20 +27,26 @@
     int const x_36 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_39 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_33), float(x_36), float(x_39), float(x_42));
+    *(tint_symbol_3) = float4(float(x_33), float(x_36), float(x_39), float(x_42));
   } else {
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_47 = float(x_46);
-    *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47);
+    *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl
index 77a66e8..d2b9503 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl
index 739634a..c2932f4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = 142.699996948f;
   float const x_25 = f;
@@ -27,20 +27,26 @@
     int const x_36 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_39 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_33), float(x_36), float(x_39), float(x_42));
+    *(tint_symbol_3) = float4(float(x_33), float(x_36), float(x_39), float(x_42));
   } else {
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_47 = float(x_46);
-    *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47);
+    *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl
index d99ee63..6c104ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.hlsl
@@ -16,8 +16,8 @@
   const float x_42 = asfloat(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
   const float x_44 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
-  const float tint_symbol_4[3] = {x_40, x_42, x_44};
-  sums = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_40, x_42, x_44};
+  sums = tint_symbol_3;
   i = 0;
   while (true) {
     const int x_50 = i;
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl
index 2fbf155..5c389b2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl
@@ -31,15 +31,15 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 sums = {};
   int i = 0;
   float2x4 indexable = float2x4(0.0f);
   float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_42, x_44}};
-  sums = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}};
+  sums = tint_symbol_2;
   i = 0;
   while (true) {
     int const x_50 = i;
@@ -70,20 +70,26 @@
     int const x_90 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_93 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_96 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_87), float(x_90), float(x_93), float(x_96));
+    *(tint_symbol_4) = float4(float(x_87), float(x_90), float(x_93), float(x_96));
   } else {
     int const x_100 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_101 = float(x_100);
-    *(tint_symbol_5) = float4(x_101, x_101, x_101, x_101);
+    *(tint_symbol_4) = float4(x_101, x_101, x_101, x_101);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl
index d99ee63..6c104ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.hlsl
@@ -16,8 +16,8 @@
   const float x_42 = asfloat(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
   const float x_44 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
-  const float tint_symbol_4[3] = {x_40, x_42, x_44};
-  sums = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_40, x_42, x_44};
+  sums = tint_symbol_3;
   i = 0;
   while (true) {
     const int x_50 = i;
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl
index 2fbf155..5c389b2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl
@@ -31,15 +31,15 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 sums = {};
   int i = 0;
   float2x4 indexable = float2x4(0.0f);
   float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_42, x_44}};
-  sums = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_42, x_44}};
+  sums = tint_symbol_2;
   i = 0;
   while (true) {
     int const x_50 = i;
@@ -70,20 +70,26 @@
     int const x_90 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_93 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_96 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_87), float(x_90), float(x_93), float(x_96));
+    *(tint_symbol_4) = float4(float(x_87), float(x_90), float(x_93), float(x_96));
   } else {
     int const x_100 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_101 = float(x_100);
-    *(tint_symbol_5) = float4(x_101, x_101, x_101, x_101);
+    *(tint_symbol_4) = float4(x_101, x_101, x_101, x_101);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl
index 9f5ecd9..f9af10d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl
index 526c96a..3cd5c26 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   a = 1.0f;
@@ -43,20 +43,26 @@
     int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55));
+    *(tint_symbol_3) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55));
   } else {
     int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el;
     float const x_60 = float(x_59);
-    *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+    *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl
index 9f5ecd9..f9af10d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl
index 526c96a..3cd5c26 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   a = 1.0f;
@@ -43,20 +43,26 @@
     int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55));
+    *(tint_symbol_3) = float4((x_44 * x_46), float(x_49), float(x_52), float(x_55));
   } else {
     int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el;
     float const x_60 = float(x_59);
-    *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+    *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl
index 2f20f12..0354a8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl
index 95cd418..9a348cb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   int i = 0;
   int const x_40 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -72,20 +72,26 @@
     int const x_125 = x_6.x_GLF_uniform_int_values.arr[4].el;
     int const x_128 = x_6.x_GLF_uniform_int_values.arr[4].el;
     int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
+    *(tint_symbol_3) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
   } else {
     int const x_135 = x_6.x_GLF_uniform_int_values.arr[4].el;
     float const x_136 = float(x_135);
-    *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136);
+    *(tint_symbol_3) = float4(x_136, x_136, x_136, x_136);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl
index 2f20f12..0354a8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl
index 95cd418..9a348cb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   int i = 0;
   int const x_40 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -72,20 +72,26 @@
     int const x_125 = x_6.x_GLF_uniform_int_values.arr[4].el;
     int const x_128 = x_6.x_GLF_uniform_int_values.arr[4].el;
     int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
+    *(tint_symbol_3) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
   } else {
     int const x_135 = x_6.x_GLF_uniform_int_values.arr[4].el;
     float const x_136 = float(x_135);
-    *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136);
+    *(tint_symbol_3) = float4(x_136, x_136, x_136, x_136);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl
index 50ae4f3..7345f93 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl
index 79fe600..6bbaedc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float2 v0 = 0.0f;
   float2 v1 = 0.0f;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[1].el;
@@ -44,20 +44,26 @@
     int const x_58 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     int const x_68 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_69 = float(x_68);
-    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl
index 50ae4f3..7345f93 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl
index 79fe600..6bbaedc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float2 v0 = 0.0f;
   float2 v1 = 0.0f;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[1].el;
@@ -44,20 +44,26 @@
     int const x_58 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     int const x_68 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_69 = float(x_68);
-    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl
index 8f6279c..56606d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl
index 154e812..e87cab7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float2 v0 = 0.0f;
   float2 v1 = 0.0f;
   float const x_37 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -44,20 +44,26 @@
     int const x_62 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_68 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
+    *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
   } else {
     int const x_72 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_73 = float(x_72);
-    *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73);
+    *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl
index 8f6279c..56606d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl
index 154e812..e87cab7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float2 v0 = 0.0f;
   float2 v1 = 0.0f;
   float const x_37 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -44,20 +44,26 @@
     int const x_62 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_68 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
+    *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
   } else {
     int const x_72 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_73 = float(x_72);
-    *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73);
+    *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl
index 011b17f..ed9d8cf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl
index ef7e17e..f8c35f1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float2 v0 = 0.0f;
   float4 v1 = 0.0f;
   float4 x_57 = 0.0f;
@@ -45,15 +45,21 @@
   } else {
     discard_fragment();
   }
-  *(tint_symbol_4) = x_57;
+  *(tint_symbol_3) = x_57;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl
index 011b17f..ed9d8cf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl
index ef7e17e..f8c35f1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float2 v0 = 0.0f;
   float4 v1 = 0.0f;
   float4 x_57 = 0.0f;
@@ -45,15 +45,21 @@
   } else {
     discard_fragment();
   }
-  *(tint_symbol_4) = x_57;
+  *(tint_symbol_3) = x_57;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl
index 9ea252e..4826bc2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.hlsl
@@ -109,11 +109,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl
index 335c044..4702f9a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl
@@ -37,24 +37,24 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func0_(constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void func0_(constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 tmp = 0.0f;
-  float const x_112 = (*(tint_symbol_5)).x;
+  float const x_112 = (*(tint_symbol_3)).x;
   float const x_114 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_112 > x_114)) {
-    float4 const x_118 = *(tint_symbol_6);
+    float4 const x_118 = *(tint_symbol_4);
     tmp = x_118;
   }
   float4 const x_119 = tmp;
-  *(tint_symbol_6) = x_119;
+  *(tint_symbol_4) = x_119;
   return;
 }
 
-int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int a = 0;
   int const x_122 = x_12.x_GLF_uniform_int_values.arr[1].el;
   a = x_122;
@@ -68,32 +68,32 @@
     int const x_133 = x_14.three;
     int const x_135 = x_12.x_GLF_uniform_int_values.arr[1].el;
     if ((x_133 > x_135)) {
-      func0_(x_8, tint_symbol_7, tint_symbol_8);
+      func0_(x_8, tint_symbol_5, tint_symbol_6);
       int const x_142 = x_12.x_GLF_uniform_int_values.arr[3].el;
       a = x_142;
     } else {
-      func0_(x_8, tint_symbol_7, tint_symbol_8);
+      func0_(x_8, tint_symbol_5, tint_symbol_6);
     }
   }
   int const x_144 = a;
   return x_144;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int a_1 = 0;
   int i = 0;
   int j = 0;
-  float const x_56 = (*(tint_symbol_9)).x;
+  float const x_56 = (*(tint_symbol_7)).x;
   float const x_58 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_56 > x_58)) {
     float const x_64 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_66 = x_8.x_GLF_uniform_float_values.arr[1].el;
     float const x_68 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_70 = x_8.x_GLF_uniform_float_values.arr[2].el;
-    *(tint_symbol_10) = float4(x_64, x_66, x_68, x_70);
+    *(tint_symbol_8) = float4(x_64, x_66, x_68, x_70);
   } else {
     uint const x_73 = x_16.x_GLF_uniform_uint_values.arr[0].el;
-    *(tint_symbol_10) = unpack_snorm4x8_to_float(x_73);
+    *(tint_symbol_8) = unpack_snorm4x8_to_float(x_73);
   }
   int const x_76 = x_12.x_GLF_uniform_int_values.arr[2].el;
   a_1 = x_76;
@@ -111,7 +111,7 @@
       } else {
         break;
       }
-      int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_9, tint_symbol_10);
+      int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_7, tint_symbol_8);
       int const x_92 = a_1;
       a_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(x_91)));
       {
@@ -128,19 +128,25 @@
   int const x_100 = x_12.x_GLF_uniform_int_values.arr[0].el;
   if ((x_98 == x_100)) {
     float const x_105 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    float const x_107 = (*(tint_symbol_10)).z;
-    (*(tint_symbol_10)).z = (x_107 - x_105);
+    float const x_107 = (*(tint_symbol_8)).z;
+    (*(tint_symbol_8)).z = (x_107 - x_105);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_8, x_16, x_12, x_14, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_8, x_16, x_12, x_14, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_16, x_12, x_14, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl
index 9ea252e..4826bc2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.hlsl
@@ -109,11 +109,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl
index 335c044..4702f9a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl
@@ -37,24 +37,24 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func0_(constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void func0_(constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 tmp = 0.0f;
-  float const x_112 = (*(tint_symbol_5)).x;
+  float const x_112 = (*(tint_symbol_3)).x;
   float const x_114 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_112 > x_114)) {
-    float4 const x_118 = *(tint_symbol_6);
+    float4 const x_118 = *(tint_symbol_4);
     tmp = x_118;
   }
   float4 const x_119 = tmp;
-  *(tint_symbol_6) = x_119;
+  *(tint_symbol_4) = x_119;
   return;
 }
 
-int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+int func1_(constant buf2& x_12, constant buf3& x_14, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int a = 0;
   int const x_122 = x_12.x_GLF_uniform_int_values.arr[1].el;
   a = x_122;
@@ -68,32 +68,32 @@
     int const x_133 = x_14.three;
     int const x_135 = x_12.x_GLF_uniform_int_values.arr[1].el;
     if ((x_133 > x_135)) {
-      func0_(x_8, tint_symbol_7, tint_symbol_8);
+      func0_(x_8, tint_symbol_5, tint_symbol_6);
       int const x_142 = x_12.x_GLF_uniform_int_values.arr[3].el;
       a = x_142;
     } else {
-      func0_(x_8, tint_symbol_7, tint_symbol_8);
+      func0_(x_8, tint_symbol_5, tint_symbol_6);
     }
   }
   int const x_144 = a;
   return x_144;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int a_1 = 0;
   int i = 0;
   int j = 0;
-  float const x_56 = (*(tint_symbol_9)).x;
+  float const x_56 = (*(tint_symbol_7)).x;
   float const x_58 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_56 > x_58)) {
     float const x_64 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_66 = x_8.x_GLF_uniform_float_values.arr[1].el;
     float const x_68 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_70 = x_8.x_GLF_uniform_float_values.arr[2].el;
-    *(tint_symbol_10) = float4(x_64, x_66, x_68, x_70);
+    *(tint_symbol_8) = float4(x_64, x_66, x_68, x_70);
   } else {
     uint const x_73 = x_16.x_GLF_uniform_uint_values.arr[0].el;
-    *(tint_symbol_10) = unpack_snorm4x8_to_float(x_73);
+    *(tint_symbol_8) = unpack_snorm4x8_to_float(x_73);
   }
   int const x_76 = x_12.x_GLF_uniform_int_values.arr[2].el;
   a_1 = x_76;
@@ -111,7 +111,7 @@
       } else {
         break;
       }
-      int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_9, tint_symbol_10);
+      int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_7, tint_symbol_8);
       int const x_92 = a_1;
       a_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(x_91)));
       {
@@ -128,19 +128,25 @@
   int const x_100 = x_12.x_GLF_uniform_int_values.arr[0].el;
   if ((x_98 == x_100)) {
     float const x_105 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    float const x_107 = (*(tint_symbol_10)).z;
-    (*(tint_symbol_10)).z = (x_107 - x_105);
+    float const x_107 = (*(tint_symbol_8)).z;
+    (*(tint_symbol_8)).z = (x_107 - x_105);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, constant buf3& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_8, x_16, x_12, x_14, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_8, x_16, x_12, x_14, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_16, x_12, x_14, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl
index 87a0b35..5e80c3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.hlsl
@@ -35,11 +35,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl
index 1102160..2846e5c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.spvasm.expected.msl
@@ -14,38 +14,44 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_33 = (*(tint_symbol_5)).x;
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_33 = (*(tint_symbol_3)).x;
   float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_33 > x_35)) {
     float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el;
-    *(tint_symbol_6) = float4(x_40, x_40, x_40, x_40);
-    float const x_43 = (*(tint_symbol_5)).y;
+    *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40);
+    float const x_43 = (*(tint_symbol_3)).y;
     if ((x_43 > x_35)) {
       float const x_48 = x_6.x_GLF_uniform_float_values.arr[4].el;
-      *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48);
+      *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
     }
     float const x_51 = x_6.x_GLF_uniform_float_values.arr[3].el;
-    *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51);
+    *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51);
   }
   float const x_54 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_6) = float4(x_35, x_54, x_54, 10.0f);
-  float4 const x_61 = *(tint_symbol_6);
-  *(tint_symbol_6) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61);
+  *(tint_symbol_4) = float4(x_35, x_54, x_54, 10.0f);
+  float4 const x_61 = *(tint_symbol_4);
+  *(tint_symbol_4) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl
index 87a0b35..5e80c3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.hlsl
@@ -35,11 +35,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl
index 1102160..2846e5c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl.expected.msl
@@ -14,38 +14,44 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_33 = (*(tint_symbol_5)).x;
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_33 = (*(tint_symbol_3)).x;
   float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_33 > x_35)) {
     float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el;
-    *(tint_symbol_6) = float4(x_40, x_40, x_40, x_40);
-    float const x_43 = (*(tint_symbol_5)).y;
+    *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40);
+    float const x_43 = (*(tint_symbol_3)).y;
     if ((x_43 > x_35)) {
       float const x_48 = x_6.x_GLF_uniform_float_values.arr[4].el;
-      *(tint_symbol_6) = float4(x_48, x_48, x_48, x_48);
+      *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
     }
     float const x_51 = x_6.x_GLF_uniform_float_values.arr[3].el;
-    *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51);
+    *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51);
   }
   float const x_54 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_6) = float4(x_35, x_54, x_54, 10.0f);
-  float4 const x_61 = *(tint_symbol_6);
-  *(tint_symbol_6) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61);
+  *(tint_symbol_4) = float4(x_35, x_54, x_54, 10.0f);
+  float4 const x_61 = *(tint_symbol_4);
+  *(tint_symbol_4) = (float4x4(float4(x_35, 0.0f, 0.0f, 0.0f), float4(0.0f, x_35, 0.0f, 0.0f), float4(0.0f, 0.0f, x_35, 0.0f), float4(0.0f, 0.0f, 0.0f, x_35)) * x_61);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl
index f628868..4038aef 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl
index 944acdb..c881e3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   bool b = false;
   b = true;
   float const x_38 = x_6.v1.x;
@@ -39,20 +39,26 @@
     int const x_11 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_12 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_13 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+    *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
   } else {
     int const x_14 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_65 = float(x_14);
-    *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65);
+    *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl
index f628868..4038aef 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl
index 944acdb..c881e3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   bool b = false;
   b = true;
   float const x_38 = x_6.v1.x;
@@ -39,20 +39,26 @@
     int const x_11 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_12 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_13 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+    *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
   } else {
     int const x_14 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_65 = float(x_14);
-    *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65);
+    *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl
index 6d029f8..55d825c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.hlsl
@@ -49,9 +49,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl
index 94b9529..d38b081 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -49,20 +49,26 @@
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     int const x_68 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_69 = float(x_68);
-    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl
index 6d029f8..55d825c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.hlsl
@@ -49,9 +49,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl
index 94b9529..d38b081 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -49,20 +49,26 @@
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     int const x_68 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_69 = float(x_68);
-    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl
index 8a9fa57..873f73d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl
index 80079dc..08bc379 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 1;
@@ -39,7 +39,7 @@
   int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
+  *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
   int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
   i = x_51;
   while (true) {
@@ -67,11 +67,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl
index 8a9fa57..873f73d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl
index 80079dc..08bc379 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 1;
@@ -39,7 +39,7 @@
   int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
+  *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
   int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
   i = x_51;
   while (true) {
@@ -67,11 +67,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl
index 1009de2..0e7ea3c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl
index 8e6db1d..a11c17f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.spvasm.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float const x_32 = x_6.quarter;
   v = ceil(float4(424.113006592f, x_32, 1.299999952f, 19.620000839f));
   float4 const x_35 = v;
   if (all((x_35 == float4(425.0f, 1.0f, 2.0f, 20.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl
index 1009de2..0e7ea3c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl
index 8e6db1d..a11c17f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float const x_32 = x_6.quarter;
   v = ceil(float4(424.113006592f, x_32, 1.299999952f, 19.620000839f));
   float4 const x_35 = v;
   if (all((x_35 == float4(425.0f, 1.0f, 2.0f, 20.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl
index e12b4af..ddb1d03 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl
index 57e7f66..35277c7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   int j = 0;
   i = 0;
@@ -28,18 +28,24 @@
   int const x_37 = i;
   int const x_39 = j;
   if (((x_37 == 9) & (x_39 == 10))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl
index cef004d..272d437 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl
index d1907be..c0a47ab 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   int j = 0;
   i = 0;
@@ -28,18 +28,24 @@
   int const x_37 = i;
   int const x_39 = j;
   if (((x_37 == 9) && (x_39 == 10))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl
index 94f03e4..d2b12a9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.hlsl
@@ -21,9 +21,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl
index 53f9786..dea3c08 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.spvasm.expected.msl
@@ -11,22 +11,28 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_25 = x_5.zero;
   float const x_28 = x_5.zero;
   if (any((float4(clamp(2.0f, x_25, 1.0f), clamp(-1.0f, 0.0f, x_28), 0.0f, 1.0f) != float4(1.0f, 0.0f, 0.0f, 1.0f)))) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl
index 94f03e4..d2b12a9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.hlsl
@@ -21,9 +21,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl
index 53f9786..dea3c08 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl.expected.msl
@@ -11,22 +11,28 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_25 = x_5.zero;
   float const x_28 = x_5.zero;
   if (any((float4(clamp(2.0f, x_25, 1.0f), clamp(-1.0f, 0.0f, x_28), 0.0f, 1.0f) != float4(1.0f, 0.0f, 0.0f, 1.0f)))) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl
index e17c5d1..95eb595 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl
index 8239923..3528b01 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.spvasm.expected.msl
@@ -11,27 +11,33 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float const x_23 = x_6.one;
   f = clamp(x_23, 1.0f, 1.0f);
   float const x_25 = f;
   float const x_27 = x_6.one;
   if ((x_25 > x_27)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
     float const x_32 = f;
-    *(tint_symbol_4) = float4(x_32, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(x_32, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl
index e17c5d1..95eb595 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl
index 8239923..3528b01 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl.expected.msl
@@ -11,27 +11,33 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float const x_23 = x_6.one;
   f = clamp(x_23, 1.0f, 1.0f);
   float const x_25 = f;
   float const x_27 = x_6.one;
   if ((x_25 > x_27)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
     float const x_32 = f;
-    *(tint_symbol_4) = float4(x_32, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(x_32, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl
index 88c1339..00db13a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl
index d8002a7..f8619a4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_36 = false;
   bool x_37_phi = false;
   float const x_23 = x_5.fourtytwo;
@@ -26,18 +26,24 @@
   }
   bool const x_37 = x_37_phi;
   if (x_37) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl
index 88c1339..00db13a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl
index d8002a7..f8619a4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_36 = false;
   bool x_37_phi = false;
   float const x_23 = x_5.fourtytwo;
@@ -26,18 +26,24 @@
   }
   bool const x_37 = x_37_phi;
   if (x_37) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl
index 5c12f10..b97f10b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl
index a096be9..bbbab38 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.spvasm.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float one = 0.0f;
   one = 1.0f;
   float const x_21 = one;
   if ((dot(float2(2.0f, 1.0f), float2(1.0f, select(x_21, 0.0f, true))) != 2.0f)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl
index 5c12f10..b97f10b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl
index a096be9..bbbab38 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float one = 0.0f;
   one = 1.0f;
   float const x_21 = one;
   if ((dot(float2(2.0f, 1.0f), float2(1.0f, select(x_21, 0.0f, true))) != 2.0f)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl
index 1ca0a69..add5b55 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.hlsl
@@ -25,11 +25,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl
index 6dd8555..956c54f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.spvasm.expected.msl
@@ -7,28 +7,34 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_29 = (*(tint_symbol_5)).x;
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_29 = (*(tint_symbol_3)).x;
   float const x_31 = x_6.one;
   if ((3.0f >= clamp(x_29, 1.0f, (2.0f + x_31)))) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl
index 1ca0a69..add5b55 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.hlsl
@@ -25,11 +25,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl
index 6dd8555..956c54f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl.expected.msl
@@ -7,28 +7,34 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_29 = (*(tint_symbol_5)).x;
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_29 = (*(tint_symbol_3)).x;
   float const x_31 = x_6.one;
   if ((3.0f >= clamp(x_29, 1.0f, (2.0f + x_31)))) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl
index fa2f460..18a3078 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.hlsl
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl
index e4553af..f7730d2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int highSigned = 0;
   uint highUnsigned = 0u;
   int i = 0;
@@ -66,18 +66,24 @@
   }
   bool const x_79 = x_79_phi;
   if (x_79) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl
index fa2f460..18a3078 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.hlsl
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl
index e4553af..f7730d2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int highSigned = 0;
   uint highUnsigned = 0u;
   int i = 0;
@@ -66,18 +66,24 @@
   }
   bool const x_79 = x_79_phi;
   if (x_79) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl
index ca4f0b8..629e521 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl
index 5531972..9e84444 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.spvasm.expected.msl
@@ -18,25 +18,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   if (((1.0f - (1.0f * floor((1.0f / 1.0f)))) <= 0.01f)) {
     int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(1.0f, float(x_29), float(x_32), float(x_35));
+    *(tint_symbol_3) = float4(1.0f, float(x_29), float(x_32), float(x_35));
   } else {
     int const x_39 = x_5.x_GLF_uniform_int_values.arr[0].el;
     float const x_40 = float(x_39);
-    *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40);
+    *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl
index 4cb3c14..5c592bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl
index 3108d65..a5fdea0 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl.expected.msl
@@ -18,25 +18,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   if ((fmod(1.0f, 1.0f) <= 0.01f)) {
     int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(1.0f, float(x_29), float(x_32), float(x_35));
+    *(tint_symbol_3) = float4(1.0f, float(x_29), float(x_32), float(x_35));
   } else {
     int const x_39 = x_5.x_GLF_uniform_int_values.arr[0].el;
     float const x_40 = float(x_39);
-    *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40);
+    *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl
index f6a50e2..53fefd1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl
index 5954cdd..cddd816 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   bool x_48 = false;
   bool x_49_phi = false;
@@ -50,20 +50,26 @@
     int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_63 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
+    *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
   } else {
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_68 = float(x_67);
-    *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68);
+    *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl
index f6a50e2..53fefd1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl
index 5954cdd..cddd816 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   bool x_48 = false;
   bool x_49_phi = false;
@@ -50,20 +50,26 @@
     int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_63 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
+    *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
   } else {
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_68 = float(x_67);
-    *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68);
+    *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl
index 40ad3c7..2d6e50f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl
index 526a975..c4559a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.spvasm.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_30 = false;
   bool x_31_phi = false;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float const x_23 = x_5.one;
   bool const x_24 = (x_23 < 0.0f);
   x_31_phi = x_24;
@@ -35,20 +35,26 @@
       } else {
         break;
       }
-      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       break;
     }
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl
index 40ad3c7..2d6e50f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl
index 526a975..c4559a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_30 = false;
   bool x_31_phi = false;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float const x_23 = x_5.one;
   bool const x_24 = (x_23 < 0.0f);
   x_31_phi = x_24;
@@ -35,20 +35,26 @@
       } else {
         break;
       }
-      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       break;
     }
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl
index 3b7aff0..dd5987c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl
index 1396285..a3656f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   bool x_38 = false;
   bool x_39_phi = false;
@@ -27,18 +27,24 @@
   }
   bool const x_39 = x_39_phi;
   if (x_39) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl
index 3b7aff0..dd5987c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl
index 1396285..a3656f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   bool x_38 = false;
   bool x_39_phi = false;
@@ -27,18 +27,24 @@
   }
   bool const x_39 = x_39_phi;
   if (x_39) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl
index 527fc4b..429b614 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl
index 51d38f6..4f21011 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 x_26 = 0.0f;
   bool x_39 = false;
   float2 x_26_phi = 0.0f;
@@ -41,18 +41,24 @@
   }
   bool const x_40 = x_40_phi;
   if (x_40) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl
index 527fc4b..429b614 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl
index 51d38f6..4f21011 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 x_26 = 0.0f;
   bool x_39 = false;
   float2 x_26_phi = 0.0f;
@@ -41,18 +41,24 @@
   }
   bool const x_40 = x_40_phi;
   if (x_40) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl
index 3067c8a..b66716a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl
index b162726..cee837a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl
@@ -8,24 +8,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = atan2(1.0f, tanh(1.0f));
   float const x_21 = f;
   float const x_23 = f;
   if (((x_21 > 0.910000026f) & (x_23 < 0.930000007f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl
index c627f2d..51bc1bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl
index 2bef818..7e20a84 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl.expected.msl
@@ -8,24 +8,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = atan2(1.0f, tanh(1.0f));
   float const x_21 = f;
   float const x_23 = f;
   if (((x_21 > 0.910000026f) && (x_23 < 0.930000007f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl
index b8364d7..e0331b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.hlsl
@@ -72,9 +72,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl
index 4219d43..5383bb2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl
@@ -63,7 +63,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float param = 0.0f;
   param = 0.699999988f;
   int const x_34 = func_f1_(x_8, &(param));
@@ -73,20 +73,26 @@
     int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+    *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
   } else {
     int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el;
     float const x_56 = float(x_55);
-    *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
+    *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl
index b8364d7..e0331b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.hlsl
@@ -72,9 +72,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl
index 4219d43..5383bb2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl
@@ -63,7 +63,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float param = 0.0f;
   param = 0.699999988f;
   int const x_34 = func_f1_(x_8, &(param));
@@ -73,20 +73,26 @@
     int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+    *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
   } else {
     int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el;
     float const x_56 = float(x_55);
-    *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
+    *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl
index e67d2bc..2a6bcdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl
index b48da79..4d278f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.spvasm.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 mixed = 0.0f;
   float2 const x_30 = x_6.one;
   mixed = mix(float2(1.0f, 1.0f), x_30, float2(0.5f, 0.5f));
   float2 const x_33 = mixed;
   if (all((x_33 == float2(1.0f, 1.0f)))) {
     float const x_40 = mixed.x;
-    *(tint_symbol_4) = float4(x_40, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(x_40, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl
index e67d2bc..2a6bcdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl
index b48da79..4d278f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 mixed = 0.0f;
   float2 const x_30 = x_6.one;
   mixed = mix(float2(1.0f, 1.0f), x_30, float2(0.5f, 0.5f));
   float2 const x_33 = mixed;
   if (all((x_33 == float2(1.0f, 1.0f)))) {
     float const x_40 = mixed.x;
-    *(tint_symbol_4) = float4(x_40, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(x_40, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl
index ad30a5c..cf1b13a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl
index fc4bcb7..97fc701 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.spvasm.expected.msl
@@ -21,12 +21,12 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) {
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_34 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_28), float(x_31), float(x_34), float(x_37));
+  *(tint_symbol_3) = float4(float(x_28), float(x_31), float(x_34), float(x_37));
   while (true) {
     int const x_45 = x_7.zero;
     int const x_47 = x_5.x_GLF_uniform_int_values.arr[0].el;
@@ -59,15 +59,21 @@
   }
   int const x_66 = x_5.x_GLF_uniform_int_values.arr[1].el;
   float const x_67 = float(x_66);
-  *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+  *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl
index ad30a5c..cf1b13a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl
index fc4bcb7..97fc701 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl.expected.msl
@@ -21,12 +21,12 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) {
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_34 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_28), float(x_31), float(x_34), float(x_37));
+  *(tint_symbol_3) = float4(float(x_28), float(x_31), float(x_34), float(x_37));
   while (true) {
     int const x_45 = x_7.zero;
     int const x_47 = x_5.x_GLF_uniform_int_values.arr[0].el;
@@ -59,15 +59,21 @@
   }
   int const x_66 = x_5.x_GLF_uniform_int_values.arr[1].el;
   float const x_67 = float(x_66);
-  *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+  *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl
index fc32950..afcae45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.hlsl
@@ -14,9 +14,9 @@
   Array param = (Array)0;
   int x_19 = 0;
   int x_20_phi = 0;
-  const int tint_symbol_3[2] = {0, 0};
-  const Array tint_symbol_4 = {tint_symbol_3};
-  param = tint_symbol_4;
+  const int tint_symbol_2[2] = {0, 0};
+  const Array tint_symbol_3 = {tint_symbol_2};
+  param = tint_symbol_3;
   x_50 = false;
   while (true) {
     int x_19_phi = 0;
@@ -63,11 +63,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(inout Array a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl
index a3005e8..976e76d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.spvasm.expected.msl
@@ -17,16 +17,16 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) {
   bool x_50 = false;
   int x_15 = 0;
   int x_16 = 0;
   Array param = {};
   int x_19 = 0;
   int x_20_phi = 0;
-  tint_array_wrapper const tint_symbol_3 = {.arr={0, 0}};
-  Array const tint_symbol_4 = {.values=tint_symbol_3};
-  param = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={0, 0}};
+  Array const tint_symbol_3 = {.values=tint_symbol_2};
+  param = tint_symbol_3;
   x_50 = false;
   while (true) {
     int x_19_phi = 0;
@@ -59,19 +59,25 @@
   int const x_20 = x_20_phi;
   x_16 = x_20;
   if ((x_20 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_6) {
+  main_1(x_8, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_8, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl
index fc32950..afcae45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.hlsl
@@ -14,9 +14,9 @@
   Array param = (Array)0;
   int x_19 = 0;
   int x_20_phi = 0;
-  const int tint_symbol_3[2] = {0, 0};
-  const Array tint_symbol_4 = {tint_symbol_3};
-  param = tint_symbol_4;
+  const int tint_symbol_2[2] = {0, 0};
+  const Array tint_symbol_3 = {tint_symbol_2};
+  param = tint_symbol_3;
   x_50 = false;
   while (true) {
     int x_19_phi = 0;
@@ -63,11 +63,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(inout Array a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl
index a3005e8..976e76d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl.expected.msl
@@ -17,16 +17,16 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) {
   bool x_50 = false;
   int x_15 = 0;
   int x_16 = 0;
   Array param = {};
   int x_19 = 0;
   int x_20_phi = 0;
-  tint_array_wrapper const tint_symbol_3 = {.arr={0, 0}};
-  Array const tint_symbol_4 = {.values=tint_symbol_3};
-  param = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={0, 0}};
+  Array const tint_symbol_3 = {.values=tint_symbol_2};
+  param = tint_symbol_3;
   x_50 = false;
   while (true) {
     int x_19_phi = 0;
@@ -59,19 +59,25 @@
   int const x_20 = x_20_phi;
   x_16 = x_20;
   if ((x_20 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_6) {
+  main_1(x_8, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_8, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl
index 92b1932..1aae8b5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   Array a = {};
   Array b = {};
   float one = 0.0f;
@@ -32,15 +32,21 @@
     one = 1.0f;
   }
   float const x_41 = one;
-  *(tint_symbol_4) = float4(x_41, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(x_41, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl
index 92b1932..1aae8b5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   Array a = {};
   Array b = {};
   float one = 0.0f;
@@ -32,15 +32,21 @@
     one = 1.0f;
   }
   float const x_41 = one;
-  *(tint_symbol_4) = float4(x_41, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(x_41, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl
index e7e6754..2ba993e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.hlsl
@@ -19,8 +19,8 @@
   int x_23_1[2] = x_16;
   x_23_1[0u] = x_12;
   x_16 = x_23_1;
-  const Array tint_symbol_3 = {x_16};
-  param = tint_symbol_3;
+  const Array tint_symbol_2 = {x_16};
+  param = tint_symbol_2;
   x_52 = false;
   while (true) {
     int x_20_phi = 0;
@@ -66,11 +66,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(inout Array a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl
index d77e254..9ad9d6e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
   bool x_52 = false;
   int x_17 = 0;
   int x_18 = 0;
@@ -32,8 +32,8 @@
   tint_array_wrapper const x_23 = x_23_1;
   x_16 = x_23;
   tint_array_wrapper const x_54 = x_16;
-  Array const tint_symbol_3 = {.values=x_54};
-  param = tint_symbol_3;
+  Array const tint_symbol_2 = {.values=x_54};
+  param = tint_symbol_2;
   x_52 = false;
   while (true) {
     int x_20_phi = 0;
@@ -65,19 +65,25 @@
   int const x_21 = x_21_phi;
   x_18 = x_21;
   if ((x_21 == 42)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl
index e7e6754..2ba993e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.hlsl
@@ -19,8 +19,8 @@
   int x_23_1[2] = x_16;
   x_23_1[0u] = x_12;
   x_16 = x_23_1;
-  const Array tint_symbol_3 = {x_16};
-  param = tint_symbol_3;
+  const Array tint_symbol_2 = {x_16};
+  param = tint_symbol_2;
   x_52 = false;
   while (true) {
     int x_20_phi = 0;
@@ -66,11 +66,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(inout Array a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl
index d77e254..9ad9d6e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
   bool x_52 = false;
   int x_17 = 0;
   int x_18 = 0;
@@ -32,8 +32,8 @@
   tint_array_wrapper const x_23 = x_23_1;
   x_16 = x_23;
   tint_array_wrapper const x_54 = x_16;
-  Array const tint_symbol_3 = {.values=x_54};
-  param = tint_symbol_3;
+  Array const tint_symbol_2 = {.values=x_54};
+  param = tint_symbol_2;
   x_52 = false;
   while (true) {
     int x_20_phi = 0;
@@ -65,19 +65,25 @@
   int const x_21 = x_21_phi;
   x_18 = x_21;
   if ((x_21 == 42)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_Array_i1_2_1_(constant buf0& x_8, thread Array* const a) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl
index 7223823..420b07f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl
index 2b232fc..2accd6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float const x_33 = x_6.x_GLF_uniform_float_values.arr[0].el;
   v = clamp(cosh(float4(1.0f, 1.0f, 1.0f, 1.0f)), float4(x_33, x_33, x_33, x_33), float4(1.0f, 1.0f, 1.0f, 1.0f));
@@ -36,15 +36,21 @@
   int const x_40 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_43 = x_8.x_GLF_uniform_int_values.arr[0].el;
   float const x_46 = v.z;
-  *(tint_symbol_4) = float4(x_38, float(x_40), float(x_43), x_46);
+  *(tint_symbol_3) = float4(x_38, float(x_40), float(x_43), x_46);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl
index 7223823..420b07f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl
index 2b232fc..2accd6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float const x_33 = x_6.x_GLF_uniform_float_values.arr[0].el;
   v = clamp(cosh(float4(1.0f, 1.0f, 1.0f, 1.0f)), float4(x_33, x_33, x_33, x_33), float4(1.0f, 1.0f, 1.0f, 1.0f));
@@ -36,15 +36,21 @@
   int const x_40 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_43 = x_8.x_GLF_uniform_int_values.arr[0].el;
   float const x_46 = v.z;
-  *(tint_symbol_4) = float4(x_38, float(x_40), float(x_43), x_46);
+  *(tint_symbol_3) = float4(x_38, float(x_40), float(x_43), x_46);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl
index 773f4d4..da96fe6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.hlsl
@@ -63,8 +63,8 @@
     const int x_89 = asint(x_6[3].x);
     const int x_91 = asint(x_6[4].x);
     const int x_93 = b;
-    const int tint_symbol_3[2] = {x_89, x_91};
-    indexable = tint_symbol_3;
+    const int tint_symbol_2[2] = {x_89, x_91};
+    indexable = tint_symbol_2;
     const int x_95 = indexable[x_93];
     a = (a + x_95);
     {
@@ -90,9 +90,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl
index 439f521..a068caa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   int a = 0;
   int b = 0;
   int i = 0;
@@ -34,7 +34,7 @@
   b = x_38;
   int const x_40 = x_6.x_GLF_uniform_int_values.arr[2].el;
   float const x_41 = float(x_40);
-  *(tint_symbol_5) = float4(x_41, x_41, x_41, x_41);
+  *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41);
   int const x_44 = x_6.x_GLF_uniform_int_values.arr[2].el;
   i = x_44;
   while (true) {
@@ -80,8 +80,8 @@
     int const x_89 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_91 = x_6.x_GLF_uniform_int_values.arr[4].el;
     int const x_93 = b;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_89, x_91}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_89, x_91}};
+    indexable = tint_symbol_2;
     int const x_95 = indexable.arr[x_93];
     int const x_96 = a;
     a = as_type<int>((as_type<uint>(x_96) + as_type<uint>(x_95)));
@@ -97,16 +97,22 @@
     int const x_110 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_113 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_116 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_5) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl
index 773f4d4..da96fe6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.hlsl
@@ -63,8 +63,8 @@
     const int x_89 = asint(x_6[3].x);
     const int x_91 = asint(x_6[4].x);
     const int x_93 = b;
-    const int tint_symbol_3[2] = {x_89, x_91};
-    indexable = tint_symbol_3;
+    const int tint_symbol_2[2] = {x_89, x_91};
+    indexable = tint_symbol_2;
     const int x_95 = indexable[x_93];
     a = (a + x_95);
     {
@@ -90,9 +90,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl
index 439f521..a068caa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   int a = 0;
   int b = 0;
   int i = 0;
@@ -34,7 +34,7 @@
   b = x_38;
   int const x_40 = x_6.x_GLF_uniform_int_values.arr[2].el;
   float const x_41 = float(x_40);
-  *(tint_symbol_5) = float4(x_41, x_41, x_41, x_41);
+  *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41);
   int const x_44 = x_6.x_GLF_uniform_int_values.arr[2].el;
   i = x_44;
   while (true) {
@@ -80,8 +80,8 @@
     int const x_89 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_91 = x_6.x_GLF_uniform_int_values.arr[4].el;
     int const x_93 = b;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_89, x_91}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_89, x_91}};
+    indexable = tint_symbol_2;
     int const x_95 = indexable.arr[x_93];
     int const x_96 = a;
     a = as_type<int>((as_type<uint>(x_96) + as_type<uint>(x_95)));
@@ -97,16 +97,22 @@
     int const x_110 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_113 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_116 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_5) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl
index f8fc44b..6b3aa78 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.hlsl
@@ -32,8 +32,8 @@
   {
     for(; (i_2 < 10); i_2 = (i_2 + 1)) {
       const int x_65 = b;
-      const int tint_symbol_2[2] = {1, 2};
-      indexable = tint_symbol_2;
+      const int tint_symbol_1[2] = {1, 2};
+      indexable = tint_symbol_1;
       const int x_67 = indexable[x_65];
       a = (a + x_67);
     }
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl
index 9a7b4b8..719e00b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5) {
+void main_1(thread float4* const tint_symbol_4) {
   int a = 0;
   int b = 0;
   int i = 0;
@@ -20,7 +20,7 @@
   tint_array_wrapper indexable = {};
   a = 0;
   b = 1;
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   while (true) {
     int const x_38 = i;
@@ -57,8 +57,8 @@
       break;
     }
     int const x_65 = b;
-    tint_array_wrapper const tint_symbol_3 = {.arr={1, 2}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper const tint_symbol_2 = {.arr={1, 2}};
+    indexable = tint_symbol_2;
     int const x_67 = indexable.arr[x_65];
     int const x_68 = a;
     a = as_type<int>((as_type<uint>(x_68) + as_type<uint>(x_67)));
@@ -69,16 +69,22 @@
   }
   int const x_72 = a;
   if ((x_72 == 28)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5) {
+  main_1(tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl
index f8fc44b..6b3aa78 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.hlsl
@@ -32,8 +32,8 @@
   {
     for(; (i_2 < 10); i_2 = (i_2 + 1)) {
       const int x_65 = b;
-      const int tint_symbol_2[2] = {1, 2};
-      indexable = tint_symbol_2;
+      const int tint_symbol_1[2] = {1, 2};
+      indexable = tint_symbol_1;
       const int x_67 = indexable[x_65];
       a = (a + x_67);
     }
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl
index 9a7b4b8..719e00b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5) {
+void main_1(thread float4* const tint_symbol_4) {
   int a = 0;
   int b = 0;
   int i = 0;
@@ -20,7 +20,7 @@
   tint_array_wrapper indexable = {};
   a = 0;
   b = 1;
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   while (true) {
     int const x_38 = i;
@@ -57,8 +57,8 @@
       break;
     }
     int const x_65 = b;
-    tint_array_wrapper const tint_symbol_3 = {.arr={1, 2}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper const tint_symbol_2 = {.arr={1, 2}};
+    indexable = tint_symbol_2;
     int const x_67 = indexable.arr[x_65];
     int const x_68 = a;
     a = as_type<int>((as_type<uint>(x_68) + as_type<uint>(x_67)));
@@ -69,16 +69,22 @@
   }
   int const x_72 = a;
   if ((x_72 == 28)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5) {
+  main_1(tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(&(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl
index ee0a08b..7e814d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.hlsl
@@ -16,8 +16,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const float x_40 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
   const float x_42 = asfloat(x_6[1].x);
-  const float tint_symbol_4[3] = {x_38, x_40, x_42};
-  A1 = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_38, x_40, x_42};
+  A1 = tint_symbol_3;
   const uint scalar_offset_1 = ((16u * uint(0))) / 4;
   const int x_45 = asint(x_9[scalar_offset_1 / 4][scalar_offset_1 % 4]);
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl
index 6b19b36..f1ca39d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 A1 = {};
   int a = 0;
   float b = 0.0f;
@@ -40,8 +40,8 @@
   float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el;
   float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42}};
-  A1 = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42}};
+  A1 = tint_symbol_2;
   int const x_45 = x_9.x_GLF_uniform_int_values.arr[0].el;
   int const x_47 = x_9.x_GLF_uniform_int_values.arr[0].el;
   int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el;
@@ -72,19 +72,25 @@
     int const x_89 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_92 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_95 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_86), float(x_89), float(x_92), float(x_95));
+    *(tint_symbol_4) = float4(float(x_86), float(x_89), float(x_92), float(x_95));
   } else {
     float const x_99 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99);
+    *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl
index ee0a08b..7e814d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.hlsl
@@ -16,8 +16,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const float x_40 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
   const float x_42 = asfloat(x_6[1].x);
-  const float tint_symbol_4[3] = {x_38, x_40, x_42};
-  A1 = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_38, x_40, x_42};
+  A1 = tint_symbol_3;
   const uint scalar_offset_1 = ((16u * uint(0))) / 4;
   const int x_45 = asint(x_9[scalar_offset_1 / 4][scalar_offset_1 % 4]);
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl
index 6b19b36..f1ca39d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 A1 = {};
   int a = 0;
   float b = 0.0f;
@@ -40,8 +40,8 @@
   float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el;
   float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42}};
-  A1 = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42}};
+  A1 = tint_symbol_2;
   int const x_45 = x_9.x_GLF_uniform_int_values.arr[0].el;
   int const x_47 = x_9.x_GLF_uniform_int_values.arr[0].el;
   int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el;
@@ -72,19 +72,25 @@
     int const x_89 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_92 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_95 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_86), float(x_89), float(x_92), float(x_95));
+    *(tint_symbol_4) = float4(float(x_86), float(x_89), float(x_92), float(x_95));
   } else {
     float const x_99 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99);
+    *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl
index a8ef20d..8960e11 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl
index 64ce0dd..6511c45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   int i = 0;
   int const x_36 = x_6.x_GLF_uniform_int_values.arr[3].el;
@@ -51,20 +51,26 @@
     int const x_80 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_83 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
+    *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
   } else {
     int const x_90 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_91 = float(x_90);
-    *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91);
+    *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl
index a8ef20d..8960e11 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl
index 64ce0dd..6511c45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   int i = 0;
   int const x_36 = x_6.x_GLF_uniform_int_values.arr[3].el;
@@ -51,20 +51,26 @@
     int const x_80 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_83 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
+    *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
   } else {
     int const x_90 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_91 = float(x_90);
-    *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91);
+    *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl
index 4152b78..e2cb540 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.hlsl
@@ -83,9 +83,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl
index 3242c11..22daaaa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl
@@ -28,13 +28,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_4) {
+float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_3) {
   float const x_90 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_92 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_94 = x_7.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_4) = float4(x_90, x_92, x_94, 1.0f);
-  float4 const x_96 = *(tint_symbol_4);
-  *(tint_symbol_4) = x_96;
+  *(tint_symbol_3) = float4(x_90, x_92, x_94, 1.0f);
+  float4 const x_96 = *(tint_symbol_3);
+  *(tint_symbol_3) = x_96;
   float const x_98 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_99 = *(b);
   if ((x_98 >= x_99)) {
@@ -45,7 +45,7 @@
   return x_106;
 }
 
-void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_4) {
   float a = 0.0f;
   float param = 0.0f;
   float param_1 = 0.0f;
@@ -53,12 +53,12 @@
   bool x_72_phi = false;
   float const x_44 = x_7.x_GLF_uniform_float_values.arr[0].el;
   param = x_44;
-  float const x_45 = func_f1_(x_7, &(param), tint_symbol_5);
+  float const x_45 = func_f1_(x_7, &(param), tint_symbol_4);
   a = x_45;
   float const x_47 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_49 = x_7.x_GLF_uniform_float_values.arr[0].el;
   param_1 = (x_47 + x_49);
-  float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_5);
+  float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_4);
   float const x_52 = a;
   a = (x_52 + x_51);
   float const x_54 = a;
@@ -66,7 +66,7 @@
   bool const x_57 = (x_54 == x_56);
   x_72_phi = x_57;
   if (x_57) {
-    float4 const x_60 = *(tint_symbol_5);
+    float4 const x_60 = *(tint_symbol_4);
     float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_66 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -80,20 +80,26 @@
     int const x_16 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_17 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_18 = x_12.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
+    *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
   } else {
     int const x_19 = x_12.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_19);
-    *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) {
+  main_1(x_7, x_12, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, x_12, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_12, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl
index 4152b78..e2cb540 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.hlsl
@@ -83,9 +83,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl
index 3242c11..22daaaa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl
@@ -28,13 +28,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_4) {
+float func_f1_(constant buf1& x_7, thread float* const b, thread float4* const tint_symbol_3) {
   float const x_90 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_92 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_94 = x_7.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_4) = float4(x_90, x_92, x_94, 1.0f);
-  float4 const x_96 = *(tint_symbol_4);
-  *(tint_symbol_4) = x_96;
+  *(tint_symbol_3) = float4(x_90, x_92, x_94, 1.0f);
+  float4 const x_96 = *(tint_symbol_3);
+  *(tint_symbol_3) = x_96;
   float const x_98 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_99 = *(b);
   if ((x_98 >= x_99)) {
@@ -45,7 +45,7 @@
   return x_106;
 }
 
-void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_4) {
   float a = 0.0f;
   float param = 0.0f;
   float param_1 = 0.0f;
@@ -53,12 +53,12 @@
   bool x_72_phi = false;
   float const x_44 = x_7.x_GLF_uniform_float_values.arr[0].el;
   param = x_44;
-  float const x_45 = func_f1_(x_7, &(param), tint_symbol_5);
+  float const x_45 = func_f1_(x_7, &(param), tint_symbol_4);
   a = x_45;
   float const x_47 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_49 = x_7.x_GLF_uniform_float_values.arr[0].el;
   param_1 = (x_47 + x_49);
-  float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_5);
+  float const x_51 = func_f1_(x_7, &(param_1), tint_symbol_4);
   float const x_52 = a;
   a = (x_52 + x_51);
   float const x_54 = a;
@@ -66,7 +66,7 @@
   bool const x_57 = (x_54 == x_56);
   x_72_phi = x_57;
   if (x_57) {
-    float4 const x_60 = *(tint_symbol_5);
+    float4 const x_60 = *(tint_symbol_4);
     float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_66 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -80,20 +80,26 @@
     int const x_16 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_17 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_18 = x_12.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
+    *(tint_symbol_4) = float4(float(x_15), float(x_16), float(x_17), float(x_18));
   } else {
     int const x_19 = x_12.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_19);
-    *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, thread float4* const tint_symbol_5) {
+  main_1(x_7, x_12, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, x_12, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_12, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl
index fdbd6e9..9170371 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl
index b989bf7..4a580c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_30 = x_6.x_GLF_uniform_float_values.arr[1].el;
   a = x_30;
@@ -29,27 +29,33 @@
     float const x_40 = a;
     a = (x_40 + x_39);
     float const x_42 = a;
-    *(tint_symbol_4) = float4(x_42, x_42, x_42, x_42);
+    *(tint_symbol_3) = float4(x_42, x_42, x_42, x_42);
     float const x_45 = x_6.x_GLF_uniform_float_values.arr[3].el;
     float const x_47 = x_6.x_GLF_uniform_float_values.arr[1].el;
     if ((x_45 > x_47)) {
-      float const x_52 = (*(tint_symbol_4)).x;
+      float const x_52 = (*(tint_symbol_3)).x;
       float const x_53 = a;
       a = (x_53 + x_52);
       float const x_56 = x_6.x_GLF_uniform_float_values.arr[2].el;
-      *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
+      *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
     }
   }
   float const x_58 = a;
-  *(tint_symbol_4) = float4(x_58, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(x_58, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl
index fdbd6e9..9170371 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl
index b989bf7..4a580c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_30 = x_6.x_GLF_uniform_float_values.arr[1].el;
   a = x_30;
@@ -29,27 +29,33 @@
     float const x_40 = a;
     a = (x_40 + x_39);
     float const x_42 = a;
-    *(tint_symbol_4) = float4(x_42, x_42, x_42, x_42);
+    *(tint_symbol_3) = float4(x_42, x_42, x_42, x_42);
     float const x_45 = x_6.x_GLF_uniform_float_values.arr[3].el;
     float const x_47 = x_6.x_GLF_uniform_float_values.arr[1].el;
     if ((x_45 > x_47)) {
-      float const x_52 = (*(tint_symbol_4)).x;
+      float const x_52 = (*(tint_symbol_3)).x;
       float const x_53 = a;
       a = (x_53 + x_52);
       float const x_56 = x_6.x_GLF_uniform_float_values.arr[2].el;
-      *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
+      *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
     }
   }
   float const x_58 = a;
-  *(tint_symbol_4) = float4(x_58, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(x_58, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl
index eacc3f8..236ecb9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl
index 2ce6493..18385d0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl
@@ -23,7 +23,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -49,20 +49,26 @@
     int const x_55 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_52), float(x_55), float(x_58), float(x_61));
+    *(tint_symbol_3) = float4(float(x_52), float(x_55), float(x_58), float(x_61));
   } else {
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_66 = float(x_65);
-    *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66);
+    *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl
index eacc3f8..236ecb9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl
index 2ce6493..18385d0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl
@@ -23,7 +23,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -49,20 +49,26 @@
     int const x_55 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_52), float(x_55), float(x_58), float(x_61));
+    *(tint_symbol_3) = float4(float(x_52), float(x_55), float(x_58), float(x_61));
   } else {
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_66 = float(x_65);
-    *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66);
+    *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl
index 7c9249e..f9cc633 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl
index 56fe5a1..4c2b271 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int i = 0;
@@ -44,18 +44,24 @@
   }
   int const x_54 = b;
   if ((x_54 == 3)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl
index 7c9249e..f9cc633 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl
index 56fe5a1..4c2b271 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int i = 0;
@@ -44,18 +44,24 @@
   }
   int const x_54 = b;
   if ((x_54 == 3)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl
index 173ce9c..73e9ec8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl
index 5eb30b6..1280adf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int a = 0;
   int b = 0;
@@ -42,7 +42,7 @@
   float const x_59 = x_6.one;
   if ((x_59 == 1.0f)) {
     while (true) {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       {
         int const x_67 = c;
         int const x_68 = a;
@@ -55,24 +55,30 @@
     }
     float const x_74 = x_6.one;
     if ((x_74 == 1.0f)) {
-      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     }
   }
   float const x_79 = v.x;
   float const x_83 = v.y;
   float const x_87 = v.z;
   float3 const x_90 = float3(select(0.0f, 1.0f, (x_79 == 1.0f)), select(1.0f, 0.0f, (x_83 == 2.0f)), select(1.0f, 0.0f, (x_87 == 3.0f)));
-  float4 const x_91 = *(tint_symbol_4);
-  *(tint_symbol_4) = float4(x_90.x, x_90.y, x_90.z, x_91.w);
-  (*(tint_symbol_4)).w = 1.0f;
+  float4 const x_91 = *(tint_symbol_3);
+  *(tint_symbol_3) = float4(x_90.x, x_90.y, x_90.z, x_91.w);
+  (*(tint_symbol_3)).w = 1.0f;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl
index 173ce9c..73e9ec8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl
index 5eb30b6..1280adf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int a = 0;
   int b = 0;
@@ -42,7 +42,7 @@
   float const x_59 = x_6.one;
   if ((x_59 == 1.0f)) {
     while (true) {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       {
         int const x_67 = c;
         int const x_68 = a;
@@ -55,24 +55,30 @@
     }
     float const x_74 = x_6.one;
     if ((x_74 == 1.0f)) {
-      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     }
   }
   float const x_79 = v.x;
   float const x_83 = v.y;
   float const x_87 = v.z;
   float3 const x_90 = float3(select(0.0f, 1.0f, (x_79 == 1.0f)), select(1.0f, 0.0f, (x_83 == 2.0f)), select(1.0f, 0.0f, (x_87 == 3.0f)));
-  float4 const x_91 = *(tint_symbol_4);
-  *(tint_symbol_4) = float4(x_90.x, x_90.y, x_90.z, x_91.w);
-  (*(tint_symbol_4)).w = 1.0f;
+  float4 const x_91 = *(tint_symbol_3);
+  *(tint_symbol_3) = float4(x_90.x, x_90.y, x_90.z, x_91.w);
+  (*(tint_symbol_3)).w = 1.0f;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl
index 0dbbaa9..e806c84 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.hlsl
@@ -95,11 +95,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float func_f1_(inout float x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl
index cf63430..6cad478 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool x_29 = false;
   float x_30 = 0.0f;
   float x_31 = 0.0f;
@@ -106,19 +106,25 @@
   }
   float const x_87 = f;
   if ((x_87 == 5.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float func_f1_(thread float* const x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl
index 0dbbaa9..e806c84 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.hlsl
@@ -95,11 +95,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float func_f1_(inout float x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl
index cf63430..6cad478 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool x_29 = false;
   float x_30 = 0.0f;
   float x_31 = 0.0f;
@@ -106,19 +106,25 @@
   }
   float const x_87 = f;
   if ((x_87 == 5.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float func_f1_(thread float* const x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl
index 031cc10..5ed2327 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int q = 0;
   int i = 0;
   int c = 0;
   q = 0;
-  float const x_55 = (*(tint_symbol_5)).x;
+  float const x_55 = (*(tint_symbol_3)).x;
   i = (int(x_55) % 3);
   c = 0;
   while (true) {
@@ -29,9 +29,9 @@
       break;
     }
     int const x_15 = c;
-    (*(tint_symbol_6)).arr[x_15] = 0.0f;
+    (*(tint_symbol_4)).arr[x_15] = 0.0f;
     int const x_16 = c;
-    (*(tint_symbol_7)).arr[x_16] = 0.0f;
+    (*(tint_symbol_5)).arr[x_16] = 0.0f;
     float const x_65 = x_11.injectionSwitch.x;
     int const x_18 = q;
     switch(as_type<int>((as_type<uint>(int(x_65)) + as_type<uint>(x_18)))) {
@@ -43,13 +43,13 @@
           }
         }
         int const x_20 = c;
-        (*(tint_symbol_6)).arr[x_20] = 1.0f;
+        (*(tint_symbol_4)).arr[x_20] = 1.0f;
         /* fallthrough */
       }
       case 61: {
-        (*(tint_symbol_7)).arr[0] = 1.0f;
+        (*(tint_symbol_5)).arr[0] = 1.0f;
         int const x_21 = c;
-        (*(tint_symbol_7)).arr[x_21] = 1.0f;
+        (*(tint_symbol_5)).arr[x_21] = 1.0f;
         break;
       }
       case 0: {
@@ -66,24 +66,30 @@
     }
   }
   int const x_24 = i;
-  float const x_79 = (*(tint_symbol_7)).arr[x_24];
+  float const x_79 = (*(tint_symbol_5)).arr[x_24];
   int const x_25 = i;
-  float const x_81 = (*(tint_symbol_6)).arr[x_25];
+  float const x_81 = (*(tint_symbol_4)).arr[x_25];
   int const x_26 = i;
-  float const x_83 = (*(tint_symbol_6)).arr[x_26];
-  *(tint_symbol_8) = float4(x_79, x_81, x_83, 1.0f);
+  float const x_83 = (*(tint_symbol_4)).arr[x_26];
+  *(tint_symbol_6) = float4(x_79, x_81, x_83, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread tint_array_wrapper tint_symbol_10 = {};
-  thread tint_array_wrapper tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_11, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_11, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread tint_array_wrapper tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl
index 031cc10..5ed2327 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int q = 0;
   int i = 0;
   int c = 0;
   q = 0;
-  float const x_55 = (*(tint_symbol_5)).x;
+  float const x_55 = (*(tint_symbol_3)).x;
   i = (int(x_55) % 3);
   c = 0;
   while (true) {
@@ -29,9 +29,9 @@
       break;
     }
     int const x_15 = c;
-    (*(tint_symbol_6)).arr[x_15] = 0.0f;
+    (*(tint_symbol_4)).arr[x_15] = 0.0f;
     int const x_16 = c;
-    (*(tint_symbol_7)).arr[x_16] = 0.0f;
+    (*(tint_symbol_5)).arr[x_16] = 0.0f;
     float const x_65 = x_11.injectionSwitch.x;
     int const x_18 = q;
     switch(as_type<int>((as_type<uint>(int(x_65)) + as_type<uint>(x_18)))) {
@@ -43,13 +43,13 @@
           }
         }
         int const x_20 = c;
-        (*(tint_symbol_6)).arr[x_20] = 1.0f;
+        (*(tint_symbol_4)).arr[x_20] = 1.0f;
         /* fallthrough */
       }
       case 61: {
-        (*(tint_symbol_7)).arr[0] = 1.0f;
+        (*(tint_symbol_5)).arr[0] = 1.0f;
         int const x_21 = c;
-        (*(tint_symbol_7)).arr[x_21] = 1.0f;
+        (*(tint_symbol_5)).arr[x_21] = 1.0f;
         break;
       }
       case 0: {
@@ -66,24 +66,30 @@
     }
   }
   int const x_24 = i;
-  float const x_79 = (*(tint_symbol_7)).arr[x_24];
+  float const x_79 = (*(tint_symbol_5)).arr[x_24];
   int const x_25 = i;
-  float const x_81 = (*(tint_symbol_6)).arr[x_25];
+  float const x_81 = (*(tint_symbol_4)).arr[x_25];
   int const x_26 = i;
-  float const x_83 = (*(tint_symbol_6)).arr[x_26];
-  *(tint_symbol_8) = float4(x_79, x_81, x_83, 1.0f);
+  float const x_83 = (*(tint_symbol_4)).arr[x_26];
+  *(tint_symbol_6) = float4(x_79, x_81, x_83, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread tint_array_wrapper tint_symbol_10 = {};
-  thread tint_array_wrapper tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_11, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_11, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread tint_array_wrapper tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl
index f469577..0287889 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl
index ae1ce51..9aed201 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl
@@ -31,10 +31,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   int r = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el;
   f = x_42;
   int const x_44 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -46,8 +46,8 @@
     } else {
       break;
     }
-    int const x_54 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
+    int const x_54 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
     float2 const x_57 = x_12.injectionSwitch;
     float const x_60 = f;
     f = (x_60 + dfdx(x_57).y);
@@ -57,13 +57,13 @@
     }
   }
   while (true) {
-    int const x_68 = *(tint_symbol_4);
+    int const x_68 = *(tint_symbol_3);
     if ((x_68 < 100)) {
     } else {
       break;
     }
-    int const x_71 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
+    int const x_71 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
     float const x_74 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_75 = f;
     f = (x_75 + x_74);
@@ -75,21 +75,27 @@
     int const x_88 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_91 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_94 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
+    *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
   } else {
     int const x_98 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_99 = float(x_98);
-    *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99);
+    *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_10, x_12, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_10, x_12, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl
index f469577..0287889 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl
index ae1ce51..9aed201 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl
@@ -31,10 +31,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   int r = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el;
   f = x_42;
   int const x_44 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -46,8 +46,8 @@
     } else {
       break;
     }
-    int const x_54 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
+    int const x_54 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
     float2 const x_57 = x_12.injectionSwitch;
     float const x_60 = f;
     f = (x_60 + dfdx(x_57).y);
@@ -57,13 +57,13 @@
     }
   }
   while (true) {
-    int const x_68 = *(tint_symbol_4);
+    int const x_68 = *(tint_symbol_3);
     if ((x_68 < 100)) {
     } else {
       break;
     }
-    int const x_71 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
+    int const x_71 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
     float const x_74 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_75 = f;
     f = (x_75 + x_74);
@@ -75,21 +75,27 @@
     int const x_88 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_91 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_94 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
+    *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
   } else {
     int const x_98 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_99 = float(x_98);
-    *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99);
+    *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_10, x_12, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_10, x_12, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl
index d60898f..d77706d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl
index 4fb97f0..f4adc34 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int i = 0;
   float a = 0.0f;
@@ -58,18 +58,24 @@
     int const x_66 = x_9.x_GLF_uniform_int_values.arr[2].el;
     float const x_68 = f;
     int const x_70 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_66), x_68, float(x_70), 1.0f);
+    *(tint_symbol_3) = float4(float(x_66), x_68, float(x_70), 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl
index d60898f..d77706d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl
index 4fb97f0..f4adc34 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int i = 0;
   float a = 0.0f;
@@ -58,18 +58,24 @@
     int const x_66 = x_9.x_GLF_uniform_int_values.arr[2].el;
     float const x_68 = f;
     int const x_70 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_66), x_68, float(x_70), 1.0f);
+    *(tint_symbol_3) = float4(float(x_66), x_68, float(x_70), 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl
index 14fc706..6003145 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl
@@ -19,9 +19,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl
index abb0900..5fdcb08 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
   float2x2 const x_33 = m;
   if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) & all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl
index c9c5e08..605374b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl
index 6ff0e42..9322446 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
   float2x2 const x_33 = m;
   if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) && all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl
index 6878f83..dcad269 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl
index a0efc1e..5b3f8d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl
@@ -44,7 +44,7 @@
   return x_71;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int const x_27 = func_(x_7);
   int const x_29 = x_7.x_GLF_uniform_int_values.arr[2].el;
   if ((x_27 == x_29)) {
@@ -52,20 +52,26 @@
     int const x_38 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
+    *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
   } else {
     int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_49 = float(x_48);
-    *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49);
+    *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl
index 6878f83..dcad269 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl
index a0efc1e..5b3f8d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl
@@ -44,7 +44,7 @@
   return x_71;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int const x_27 = func_(x_7);
   int const x_29 = x_7.x_GLF_uniform_int_values.arr[2].el;
   if ((x_27 == x_29)) {
@@ -52,20 +52,26 @@
     int const x_38 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
+    *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
   } else {
     int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_49 = float(x_48);
-    *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49);
+    *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl
index 642f1e6..0907d3e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.hlsl
@@ -7,8 +7,8 @@
   int arr[10] = (int[10])0;
   int a = 0;
   int i = 0;
-  const int tint_symbol_3[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
-  arr = tint_symbol_3;
+  const int tint_symbol_2[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+  arr = tint_symbol_2;
   a = 0;
   const int x_42 = asint(x_7[1].x);
   const int x_44 = arr[x_42];
@@ -60,9 +60,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl
index a2e952d..2b54d29 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl
@@ -21,12 +21,12 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
   tint_array_wrapper_1 arr = {};
   int a = 0;
   int i = 0;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
+  arr = tint_symbol_2;
   a = 0;
   int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_44 = arr.arr[x_42];
@@ -63,20 +63,26 @@
     int const x_91 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_94 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_97 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
+    *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
   } else {
     int const x_101 = x_7.x_GLF_uniform_int_values.arr[2].el;
     float const x_102 = float(x_101);
-    *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102);
+    *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl
index 642f1e6..0907d3e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.hlsl
@@ -7,8 +7,8 @@
   int arr[10] = (int[10])0;
   int a = 0;
   int i = 0;
-  const int tint_symbol_3[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
-  arr = tint_symbol_3;
+  const int tint_symbol_2[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+  arr = tint_symbol_2;
   a = 0;
   const int x_42 = asint(x_7[1].x);
   const int x_44 = arr[x_42];
@@ -60,9 +60,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl
index a2e952d..2b54d29 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl
@@ -21,12 +21,12 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
   tint_array_wrapper_1 arr = {};
   int a = 0;
   int i = 0;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
+  arr = tint_symbol_2;
   a = 0;
   int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_44 = arr.arr[x_42];
@@ -63,20 +63,26 @@
     int const x_91 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_94 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_97 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
+    *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
   } else {
     int const x_101 = x_7.x_GLF_uniform_int_values.arr[2].el;
     float const x_102 = float(x_101);
-    *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102);
+    *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl
index 9f1319b..6055ba4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl
index 387bc0b..6225446 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.spvasm.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = 2.0f;
   float const x_19 = f;
   if ((exp2(x_19) == 4.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl
index 9f1319b..6055ba4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl
index 387bc0b..6225446 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = 2.0f;
   float const x_19 = f;
   if ((exp2(x_19) == 4.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl
index 81e4598..af3702f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.hlsl
@@ -30,8 +30,8 @@
   const float x_55 = asfloat(x_7[scalar_offset_7 / 4][scalar_offset_7 % 4]);
   const uint scalar_offset_8 = ((16u * uint(0))) / 4;
   const float x_57 = asfloat(x_7[scalar_offset_8 / 4][scalar_offset_8 % 4]);
-  const float tint_symbol_4[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57};
+  arr = tint_symbol_3;
   const uint scalar_offset_9 = ((16u * uint(0))) / 4;
   const int x_60 = asint(x_9[scalar_offset_9 / 4][scalar_offset_9 % 4]);
   const float x_62 = arr[x_60];
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl
index 3eea4ec..01e60e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   tint_array_wrapper_2 arr = {};
   f = 2.0f;
@@ -46,8 +46,8 @@
   float const x_52 = x_7.x_GLF_uniform_float_values.arr[1].el;
   float const x_55 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_57 = x_7.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}};
+  arr = tint_symbol_2;
   int const x_60 = x_9.x_GLF_uniform_int_values.arr[0].el;
   float const x_62 = arr.arr[x_60];
   int const x_65 = x_9.x_GLF_uniform_int_values.arr[3].el;
@@ -56,20 +56,26 @@
     int const x_74 = x_9.x_GLF_uniform_int_values.arr[2].el;
     int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el;
     int const x_80 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_5) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
+    *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
   } else {
     int const x_84 = x_9.x_GLF_uniform_int_values.arr[2].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_5) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_7, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl
index 81e4598..af3702f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.hlsl
@@ -30,8 +30,8 @@
   const float x_55 = asfloat(x_7[scalar_offset_7 / 4][scalar_offset_7 % 4]);
   const uint scalar_offset_8 = ((16u * uint(0))) / 4;
   const float x_57 = asfloat(x_7[scalar_offset_8 / 4][scalar_offset_8 % 4]);
-  const float tint_symbol_4[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[10] = {x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57};
+  arr = tint_symbol_3;
   const uint scalar_offset_9 = ((16u * uint(0))) / 4;
   const int x_60 = asint(x_9[scalar_offset_9 / 4][scalar_offset_9 % 4]);
   const float x_62 = arr[x_60];
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl
index 3eea4ec..01e60e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   tint_array_wrapper_2 arr = {};
   f = 2.0f;
@@ -46,8 +46,8 @@
   float const x_52 = x_7.x_GLF_uniform_float_values.arr[1].el;
   float const x_55 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_57 = x_7.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_37, x_39, x_41, x_43, x_45, x_47, x_49, pow(x_50, x_52), x_55, x_57}};
+  arr = tint_symbol_2;
   int const x_60 = x_9.x_GLF_uniform_int_values.arr[0].el;
   float const x_62 = arr.arr[x_60];
   int const x_65 = x_9.x_GLF_uniform_int_values.arr[3].el;
@@ -56,20 +56,26 @@
     int const x_74 = x_9.x_GLF_uniform_int_values.arr[2].el;
     int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el;
     int const x_80 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_5) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
+    *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
   } else {
     int const x_84 = x_9.x_GLF_uniform_int_values.arr[2].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_5) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_7, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl
index 757f40b..0795796 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl
index 7bb1268..228de98 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl
@@ -35,21 +35,27 @@
   return x_50;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int const x_29 = func_(x_8);
   if ((x_29 == 2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl
index 757f40b..0795796 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl
index 7bb1268..228de98 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl
@@ -35,21 +35,27 @@
   return x_50;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int const x_29 = func_(x_8);
   if ((x_29 == 2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl
index 34a3e6f..1fc3eb0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl
index fab551b..df44d6d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_22 = x_5.one;
   if (((x_22 & 0) == 0)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl
index 34a3e6f..1fc3eb0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl
index fab551b..df44d6d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_22 = x_5.one;
   if (((x_22 & 0) == 0)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl
index 9c68880..47bc4f8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl
index 7b5a9e1..ed5a502 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_23 = x_5.one;
   if (((-1 | x_23) == -1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl
index 9c68880..47bc4f8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl
index 7b5a9e1..ed5a502 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_23 = x_5.one;
   if (((-1 | x_23) == -1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl
index f27c44b..561e506 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl
index 5084cf3..e9c31bd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   a = 6;
@@ -16,18 +16,24 @@
   int const x_6 = a;
   int const x_7 = b;
   if (((x_6 ^ x_7) != 3)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl
index f27c44b..561e506 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl
index 5084cf3..e9c31bd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   a = 6;
@@ -16,18 +16,24 @@
   int const x_6 = a;
   int const x_7 = b;
   if (((x_6 ^ x_7) != 3)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl
index 63f7da2..e30c46a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl
index dd7b01c..2879d83 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool a = false;
   a = false;
   bool const x_19 = a;
   if ((true & x_19)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl
index 205d238..a3e7905 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl
index c5fe7c9..e36ed72 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool a = false;
   a = false;
   bool const x_19 = a;
   if ((true && x_19)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl
index 64d9a98..e4ad79e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl
@@ -32,11 +32,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl
index 9a920a0..86f3cc7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl
@@ -4,18 +4,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   i = 2;
   while (true) {
     int const x_6 = i;
     i = as_type<int>((as_type<uint>(x_6) + as_type<uint>(1)));
     {
-      float const x_35 = (*(tint_symbol_5)).x;
+      float const x_35 = (*(tint_symbol_3)).x;
       if (((x_35 >= 0.0f) & false)) {
       } else {
         break;
@@ -24,20 +24,26 @@
   }
   int const x_8 = i;
   if ((x_8 == 3)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl
index 52e6a55..467446e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.hlsl
@@ -36,11 +36,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl
index 587b3e2..3b13be0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl
@@ -4,18 +4,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   i = 2;
   while (true) {
     int const x_6 = i;
     i = as_type<int>((as_type<uint>(x_6) + as_type<uint>(1)));
     {
-      float const x_35 = (*(tint_symbol_5)).x;
+      float const x_35 = (*(tint_symbol_3)).x;
       if (((x_35 >= 0.0f) && false)) {
       } else {
         break;
@@ -24,20 +24,26 @@
   }
   int const x_8 = i;
   if ((x_8 == 3)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl
index 62ce799..206deb6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl
@@ -21,11 +21,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl
index 6262310..b4d9101 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl
@@ -4,27 +4,33 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_22 = (*(tint_symbol_5)).x;
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_22 = (*(tint_symbol_3)).x;
   if (((x_22 < 0.0f) | true)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl
index e1f6bdd..fb14b14 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.hlsl
@@ -25,11 +25,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl
index c32c624..04c6407 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl.expected.msl
@@ -4,27 +4,33 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_22 = (*(tint_symbol_5)).x;
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_22 = (*(tint_symbol_3)).x;
   if (((x_22 < 0.0f) || true)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl
index 9fa0010..e95f485 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl
index 7272ad9..4ebb8b8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl
@@ -16,7 +16,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int minValue = 0;
   int negMinValue = 0;
   minValue = (-2147483647 - 1);
@@ -26,18 +26,24 @@
   int const x_28 = minValue;
   int const x_30 = x_7.minusOne;
   if ((x_27 == as_type<int>((as_type<uint>(x_28) * as_type<uint>(x_30))))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl
index 9fa0010..e95f485 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl
index 7272ad9..4ebb8b8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl
@@ -16,7 +16,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int minValue = 0;
   int negMinValue = 0;
   minValue = (-2147483647 - 1);
@@ -26,18 +26,24 @@
   int const x_28 = minValue;
   int const x_30 = x_7.minusOne;
   if ((x_27 == as_type<int>((as_type<uint>(x_28) * as_type<uint>(x_30))))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl
index 200bb96..f249279 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl
index cff2cd3..72dea6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.spvasm.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   i = 3;
   int const x_5 = i;
   if ((~(x_5) == -4)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl
index 200bb96..f249279 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl
index cff2cd3..72dea6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   i = 3;
   int const x_5 = i;
   if ((~(x_5) == -4)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl
index 4db9a87..a7f0fbf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl
@@ -55,9 +55,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl
index c8f07e8..619406e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   uint a = 0u;
   uint b = 0u;
   uint c = 0u;
@@ -61,18 +61,24 @@
   uint const x_99 = e;
   uint const x_102 = f;
   if (((((((x_88 == 1u) & (x_90 == 0u)) & (x_93 == 1u)) & (x_96 == 0u)) & (x_99 == 1u)) & (x_102 == 0u))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl
index 44f7ed6..e7757a5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.hlsl
@@ -75,9 +75,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl
index 5d8fa54..e0dab88 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   uint a = 0u;
   uint b = 0u;
   uint c = 0u;
@@ -61,18 +61,24 @@
   uint const x_99 = e;
   uint const x_102 = f;
   if (((((((x_88 == 1u) && (x_90 == 0u)) && (x_93 == 1u)) && (x_96 == 0u)) && (x_99 == 1u)) && (x_102 == 0u))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl
index cc5e352..d834ffb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl
index c314545..5d0c7cd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.spvasm.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   i = 5;
   int const x_5 = i;
   if (((x_5 >> as_type<uint>(1)) != 2)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl
index cc5e352..d834ffb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.hlsl
@@ -18,9 +18,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl
index c314545..5d0c7cd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl.expected.msl
@@ -8,23 +8,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   i = 5;
   int const x_5 = i;
   if (((x_5 >> as_type<uint>(1)) != 2)) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl
index 2b46425..1bb0cbc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl
index a8ec9c9..554f9d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.spvasm.expected.msl
@@ -8,28 +8,34 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   uint a = 0u;
   a = 4u;
   uint const x_5 = a;
   switch((x_5 / 2u)) {
     case 2u: {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       break;
     }
     default: {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       break;
     }
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl
index 2b46425..1bb0cbc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl
index a8ec9c9..554f9d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl.expected.msl
@@ -8,28 +8,34 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   uint a = 0u;
   a = 4u;
   uint const x_5 = a;
   switch((x_5 / 2u)) {
     case 2u: {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       break;
     }
     default: {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       break;
     }
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl
index 2553d12..e2cd955 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl
index bc7a9d0..2ec6d4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = 1.0f;
   while (true) {
@@ -29,18 +29,24 @@
   }
   float const x_40 = f;
   if ((x_40 == 10.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl
index 2553d12..e2cd955 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl
index bc7a9d0..2ec6d4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   f = 1.0f;
   while (true) {
@@ -29,18 +29,24 @@
   }
   float const x_40 = f;
   if ((x_40 == 10.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl
index 047beed..afc442c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl
index 45dc7c5..7bab12f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_24 = x_5.one;
   if ((as_type<int>((as_type<uint>(1) + as_type<uint>(as_type<int>((as_type<uint>(3) - as_type<uint>(x_24)))))) == 3)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl
index 047beed..afc442c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl
index 45dc7c5..7bab12f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_24 = x_5.one;
   if ((as_type<int>((as_type<uint>(1) + as_type<uint>(as_type<int>((as_type<uint>(3) - as_type<uint>(x_24)))))) == 3)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl
index 3e0c589..4b3b566 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl
index 4aa4b0c..8361a17 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 a = 0.0f;
   float2 b = 0.0f;
   bool x_46 = false;
@@ -31,18 +31,24 @@
   }
   bool const x_47 = x_47_phi;
   if (x_47) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl
index 3e0c589..4b3b566 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl
index 4aa4b0c..8361a17 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 a = 0.0f;
   float2 b = 0.0f;
   bool x_46 = false;
@@ -31,18 +31,24 @@
   }
   bool const x_47 = x_47_phi;
   if (x_47) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl
index d3f224d..0764c7e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl
index 8639723..0b7f9cc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_25 = x_5.three;
   if ((dot(float4(1.0f, 2.0f, x_25, 4.0f), float4(0.0f, 1.0f, 0.0f, 0.0f)) == 2.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl
index d3f224d..0764c7e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl
index 8639723..0b7f9cc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_25 = x_5.three;
   if ((dot(float4(1.0f, 2.0f, x_25, 4.0f), float4(0.0f, 1.0f, 0.0f, 0.0f)) == 2.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl
index 43f1990..e55072b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl
index 5f40f93..5b5062d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_26 = x_5.three;
   if ((dot(float2(2.0f, x_26), float2(0.0f, 2.0f)) == 6.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl
index 43f1990..e55072b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl
index 5f40f93..5b5062d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_26 = x_5.three;
   if ((dot(float2(2.0f, x_26), float2(0.0f, 2.0f)) == 6.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl
index c8380b4..0bc576c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl
index ade8de6..1e79d7e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   i = 5;
   while (true) {
@@ -24,18 +24,24 @@
   }
   int const x_10 = i;
   if ((x_10 == -1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl
index c8380b4..0bc576c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl
index ade8de6..1e79d7e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   i = 5;
   while (true) {
@@ -24,18 +24,24 @@
   }
   int const x_10 = i;
   if ((x_10 == -1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl
index f5e4574..f75ea26 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl
index 9823f42..5ff149d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_28 = x_6.one;
   f = (4.0f / (2.0f * x_28));
   float const x_31 = f;
   float const x_33 = f;
   if (((x_31 > 1.899999976f) & (x_33 < 2.099999905f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl
index d20ee0a..be8a7c6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl
index b807292..5dd96d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_28 = x_6.one;
   f = (4.0f / (2.0f * x_28));
   float const x_31 = f;
   float const x_33 = f;
   if (((x_31 > 1.899999976f) && (x_33 < 2.099999905f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl
index 02ede34..77d565c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl
index 2a1c1bb..e1fc734 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_27 = x_6.four;
   a = (2.0f / (1.0f / x_27));
   float const x_30 = a;
   float const x_32 = a;
   if (((x_30 > 7.900000095f) & (x_32 < 8.100000381f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl
index 1b0d83d..3073223 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl
index 21d1062..135239f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_27 = x_6.four;
   a = (2.0f / (1.0f / x_27));
   float const x_30 = a;
   float const x_32 = a;
   if (((x_30 > 7.900000095f) && (x_32 < 8.100000381f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl
index 1020e3b..1474170 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl
index c7f8ae3..3fc585d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_28 = x_6.one;
   f = (4.0f * (2.0f / x_28));
   float const x_31 = f;
   float const x_33 = f;
   if (((x_31 > 7.900000095f) & (x_33 < 8.100000381f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl
index 33b44f0..a85b474 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl
index 8ca949d..fad2b8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl.expected.msl
@@ -11,25 +11,31 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_28 = x_6.one;
   f = (4.0f * (2.0f / x_28));
   float const x_31 = f;
   float const x_33 = f;
   if (((x_31 > 7.900000095f) && (x_33 < 8.100000381f))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl
index e718661..042c40f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl
index 971bd11..f16cb10 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool b = false;
   int i = 0;
   float a = 0.0f;
@@ -33,18 +33,24 @@
   }
   bool const x_44 = b;
   if (x_44) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl
index e718661..042c40f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl
index 971bd11..f16cb10 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool b = false;
   int i = 0;
   float a = 0.0f;
@@ -33,18 +33,24 @@
   }
   bool const x_44 = b;
   if (x_44) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl
index a2804a2..bf8cf30 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl
index c195bec..824cb46 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool b = false;
   int i = 0;
   float a = 0.0f;
@@ -33,18 +33,24 @@
   }
   bool const x_45 = b;
   if (x_45) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl
index a2804a2..bf8cf30 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl
index c195bec..824cb46 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool b = false;
   int i = 0;
   float a = 0.0f;
@@ -33,18 +33,24 @@
   }
   bool const x_45 = b;
   if (x_45) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl
index b852869..8572db8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl
index e516896..0adf33a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   int const x_26 = x_6.five;
   i = x_26;
@@ -28,18 +28,24 @@
   }
   int const x_38 = i;
   if ((x_38 == -1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl
index b852869..8572db8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl
index e516896..0adf33a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   int const x_26 = x_6.five;
   i = x_26;
@@ -28,18 +28,24 @@
   }
   int const x_38 = i;
   if ((x_38 == -1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl
index 7a3d498..52b9055 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl
index 02ce404..ab61a04 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float3 v = 0.0f;
   float d = 0.0f;
   float const x_36 = x_6.one;
@@ -21,18 +21,24 @@
   float const x_41 = d;
   if ((x_41 < 0.100000001f)) {
     float const x_47 = v.x;
-    *(tint_symbol_4) = float4(x_47, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(x_47, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl
index 7a3d498..52b9055 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl
index 02ce404..ab61a04 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float3 v = 0.0f;
   float d = 0.0f;
   float const x_36 = x_6.one;
@@ -21,18 +21,24 @@
   float const x_41 = d;
   if ((x_41 < 0.100000001f)) {
     float const x_47 = v.x;
-    *(tint_symbol_4) = float4(x_47, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(x_47, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl
index 400828d..9bf1a3b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl
index 5d3b770..f2c6210 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl
@@ -16,21 +16,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_6 = x_5.four;
   if ((tint_unary_minus((x_6 / 2)) == -2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl
index 400828d..9bf1a3b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl
index 5d3b770..f2c6210 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl
@@ -16,21 +16,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_6 = x_5.four;
   if ((tint_unary_minus((x_6 / 2)) == -2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl
index abdc55d..154e2f7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl
index d7a23cd..218bda2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl
@@ -16,24 +16,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int x = 0;
   int const x_26 = x_6.one;
   x = tint_unary_minus(as_type<int>((as_type<uint>(5) - as_type<uint>(x_26))));
   int const x_29 = x;
   if ((x_29 == -4)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl
index abdc55d..154e2f7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl
index d7a23cd..218bda2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl
@@ -16,24 +16,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int x = 0;
   int const x_26 = x_6.one;
   x = tint_unary_minus(as_type<int>((as_type<uint>(5) - as_type<uint>(x_26))));
   int const x_29 = x;
   if ((x_29 == -4)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl
index 6aca1c8..a4ba052 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl
index 945cd53..2f95632 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float2 const x_27 = x_5.injectionSwitch;
   if (all((mix(x_27, float2(1.0f, 1.0f), float2(0.0f, 0.0f)) == float2(0.0f, 1.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl
index 6aca1c8..a4ba052 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl
index 945cd53..2f95632 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float2 const x_27 = x_5.injectionSwitch;
   if (all((mix(x_27, float2(1.0f, 1.0f), float2(0.0f, 0.0f)) == float2(0.0f, 1.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl
index 563318c..d43ef40 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl
index 2d5c01d..7aa0bda 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float2 const x_29 = x_5.injectionSwitch;
   if ((select(x_29, float2(1.0f, 1.0f), bool2(false, false)).x == 0.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl
index 563318c..d43ef40 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl
index 2d5c01d..7aa0bda 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float2 const x_29 = x_5.injectionSwitch;
   if ((select(x_29, float2(1.0f, 1.0f), bool2(false, false)).x == 0.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl
index f11d3d7..5e90d3a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl
index 11c6999..19f1818 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   v = float4(2.0f, 3.0f, 4.0f, 5.0f);
   float const x_40 = x_6.threeandfour.y;
@@ -20,18 +20,24 @@
   v = float4(x_42.x, x_42.y, x_43.z, x_43.w);
   float4 const x_45 = v;
   if (all((x_45 == float4(1.0f, 6.0f, 4.0f, 5.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl
index f11d3d7..5e90d3a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl
index 11c6999..19f1818 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   v = float4(2.0f, 3.0f, 4.0f, 5.0f);
   float const x_40 = x_6.threeandfour.y;
@@ -20,18 +20,24 @@
   v = float4(x_42.x, x_42.y, x_43.z, x_43.w);
   float4 const x_45 = v;
   if (all((x_45 == float4(1.0f, 6.0f, 4.0f, 5.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl
index 274014d..cd08b9b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.hlsl
@@ -21,9 +21,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl
index df1620d..a2ec26a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float4 const x_23 = v;
   v = float4(float2(1.0f, 1.0f).x, float2(1.0f, 1.0f).y, x_23.z, x_23.w);
@@ -16,18 +16,24 @@
   v = float4(x_25.x, x_25.y, float2(2.0f, 2.0f).x, float2(2.0f, 2.0f).y);
   float4 const x_27 = v;
   if (all((x_27 == float4(1.0f, 1.0f, 2.0f, 2.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl
index 274014d..cd08b9b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.hlsl
@@ -21,9 +21,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl
index df1620d..a2ec26a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float4 const x_23 = v;
   v = float4(float2(1.0f, 1.0f).x, float2(1.0f, 1.0f).y, x_23.z, x_23.w);
@@ -16,18 +16,24 @@
   v = float4(x_25.x, x_25.y, float2(2.0f, 2.0f).x, float2(2.0f, 2.0f).y);
   float4 const x_27 = v;
   if (all((x_27 == float4(1.0f, 1.0f, 2.0f, 2.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl
index 037715d..b144af7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl
index bea0ac6..c35cbbf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 v = 0.0f;
   float d = 0.0f;
   float2 const x_37 = x_6.zeroOne;
@@ -22,18 +22,24 @@
   if ((x_41 < 0.100000001f)) {
     float const x_47 = v.x;
     float const x_50 = v.y;
-    *(tint_symbol_4) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f);
+    *(tint_symbol_3) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl
index 037715d..b144af7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.hlsl
@@ -26,9 +26,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl
index bea0ac6..c35cbbf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 v = 0.0f;
   float d = 0.0f;
   float2 const x_37 = x_6.zeroOne;
@@ -22,18 +22,24 @@
   if ((x_41 < 0.100000001f)) {
     float const x_47 = v.x;
     float const x_50 = v.y;
-    *(tint_symbol_4) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f);
+    *(tint_symbol_3) = float4((x_47 - 1.0f), (x_50 - 5.0f), 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl
index 2d00ef0..d963e3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.hlsl
@@ -19,8 +19,8 @@
     const int x_43 = asint(x_6[1].x);
     const int x_44 = i;
     const int x_46 = asint(x_6[3].x);
-    const int tint_symbol_3[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y};
-    a = tint_symbol_3;
+    const int tint_symbol_2[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y};
+    a = tint_symbol_2;
     {
       i = (i + 1);
     }
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl
index 917b1d9..ac80a8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   int i = 0;
   tint_array_wrapper_1 a = {};
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -36,8 +36,8 @@
     int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_44 = i;
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}};
-    a = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}};
+    a = tint_symbol_2;
     {
       int const x_52 = i;
       i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
@@ -49,15 +49,21 @@
   int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_68 = a.arr[x_66];
-  *(tint_symbol_5) = float4(float(x_57), float(x_60), float(x_63), float(x_68));
+  *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_68));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl
index 2d00ef0..d963e3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.hlsl
@@ -19,8 +19,8 @@
     const int x_43 = asint(x_6[1].x);
     const int x_44 = i;
     const int x_46 = asint(x_6[3].x);
-    const int tint_symbol_3[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y};
-    a = tint_symbol_3;
+    const int tint_symbol_2[2] = {x_43, (int2(x_44, x_44) % int2(3, x_46)).y};
+    a = tint_symbol_2;
     {
       i = (i + 1);
     }
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl
index 917b1d9..ac80a8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   int i = 0;
   tint_array_wrapper_1 a = {};
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -36,8 +36,8 @@
     int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_44 = i;
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}};
-    a = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_43, ((int2(x_44, x_44) % int2(3, x_46))).y}};
+    a = tint_symbol_2;
     {
       int const x_52 = i;
       i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
@@ -49,15 +49,21 @@
   int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_68 = a.arr[x_66];
-  *(tint_symbol_5) = float4(float(x_57), float(x_60), float(x_63), float(x_68));
+  *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_68));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl
index 15bbbf8..9ee21a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.hlsl
@@ -13,8 +13,8 @@
   const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
   const float x_38 = asfloat(x_6[1].x);
   const float x_40 = asfloat(x_6[2].x);
-  const float tint_symbol_4[3] = {x_36, x_38, x_40};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_36, x_38, x_40};
+  arr = tint_symbol_3;
   i = 1;
   while (true) {
     const int x_46 = i;
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl
index 122ec2d..6e2c18c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl
@@ -31,14 +31,14 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 arr = {};
   int i = 0;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_38 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_36, x_38, x_40}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_36, x_38, x_40}};
+  arr = tint_symbol_2;
   i = 1;
   while (true) {
     int const x_46 = i;
@@ -64,20 +64,26 @@
     int const x_76 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_79 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_5) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
+    *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
   } else {
     int const x_86 = x_9.x_GLF_uniform_int_values.arr[0].el;
     float const x_87 = float(x_86);
-    *(tint_symbol_5) = float4(x_87, x_87, x_87, x_87);
+    *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl
index 15bbbf8..9ee21a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.hlsl
@@ -13,8 +13,8 @@
   const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
   const float x_38 = asfloat(x_6[1].x);
   const float x_40 = asfloat(x_6[2].x);
-  const float tint_symbol_4[3] = {x_36, x_38, x_40};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_36, x_38, x_40};
+  arr = tint_symbol_3;
   i = 1;
   while (true) {
     const int x_46 = i;
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl
index 122ec2d..6e2c18c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl
@@ -31,14 +31,14 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 arr = {};
   int i = 0;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_38 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_40 = x_6.x_GLF_uniform_float_values.arr[2].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_36, x_38, x_40}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_36, x_38, x_40}};
+  arr = tint_symbol_2;
   i = 1;
   while (true) {
     int const x_46 = i;
@@ -64,20 +64,26 @@
     int const x_76 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_79 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_5) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
+    *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
   } else {
     int const x_86 = x_9.x_GLF_uniform_int_values.arr[0].el;
     float const x_87 = float(x_86);
-    *(tint_symbol_5) = float4(x_87, x_87, x_87, x_87);
+    *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl
index 40b4b79..5c9b0a9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.hlsl
@@ -56,9 +56,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl
index d08d1ee..c737d36 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -56,20 +56,26 @@
     int const x_56 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
+    *(tint_symbol_3) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
   } else {
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_67 = float(x_66);
-    *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl
index 40b4b79..5c9b0a9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.hlsl
@@ -56,9 +56,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl
index d08d1ee..c737d36 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -56,20 +56,26 @@
     int const x_56 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
+    *(tint_symbol_3) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
   } else {
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_67 = float(x_66);
-    *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl
index 8f9bef0..6c9405f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.hlsl
@@ -40,11 +40,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl
index 0fb34b5..d866d07 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.spvasm.expected.msl
@@ -24,38 +24,44 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f0 = 0.0f;
   float f1 = 0.0f;
   f0 = NAN;
   float const x_35 = f0;
   f1 = fract(x_35);
-  float const x_38 = (*(tint_symbol_5)).x;
+  float const x_38 = (*(tint_symbol_3)).x;
   float const x_40 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_38 > x_40)) {
     int const x_46 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_49 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
+    *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
   } else {
     float const x_58 = f1;
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl
index 9cd37ec..d1f4736 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl
@@ -40,11 +40,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl
index 33990e1..94a4148 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl
@@ -24,38 +24,44 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f0 = 0.0f;
   float f1 = 0.0f;
   f0 = INFINITY;
   float const x_35 = f0;
   f1 = fract(x_35);
-  float const x_38 = (*(tint_symbol_5)).x;
+  float const x_38 = (*(tint_symbol_3)).x;
   float const x_40 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_38 > x_40)) {
     int const x_46 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_49 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
+    *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
   } else {
     float const x_58 = f1;
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl
index e520d49..c012937 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.hlsl
@@ -52,9 +52,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl
index 18c63cf..e721dc3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   float2 b = 0.0f;
   float a = 0.0f;
@@ -34,7 +34,7 @@
   float const x_39 = a;
   float const x_40 = a;
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_4) = float4(x_38, x_39, x_40, x_42);
+  *(tint_symbol_3) = float4(x_38, x_39, x_40, x_42);
   float const x_45 = b.x;
   bool const x_46 = (x_45 < 1.0f);
   x_52_phi = x_46;
@@ -49,19 +49,25 @@
     float const x_59 = b.x;
     float const x_61 = b.y;
     float const x_63 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_57, x_59, x_61, x_63);
+    *(tint_symbol_3) = float4(x_57, x_59, x_61, x_63);
   } else {
     float const x_66 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66);
+    *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl
index e520d49..c012937 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.hlsl
@@ -52,9 +52,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl
index 18c63cf..e721dc3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   float2 b = 0.0f;
   float a = 0.0f;
@@ -34,7 +34,7 @@
   float const x_39 = a;
   float const x_40 = a;
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_4) = float4(x_38, x_39, x_40, x_42);
+  *(tint_symbol_3) = float4(x_38, x_39, x_40, x_42);
   float const x_45 = b.x;
   bool const x_46 = (x_45 < 1.0f);
   x_52_phi = x_46;
@@ -49,19 +49,25 @@
     float const x_59 = b.x;
     float const x_61 = b.y;
     float const x_63 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_57, x_59, x_61, x_63);
+    *(tint_symbol_3) = float4(x_57, x_59, x_61, x_63);
   } else {
     float const x_66 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_66, x_66, x_66, x_66);
+    *(tint_symbol_3) = float4(x_66, x_66, x_66, x_66);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl
index 0bc8372..16724bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.hlsl
@@ -41,11 +41,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl
index 98f7829..a05be67 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.spvasm.expected.msl
@@ -14,13 +14,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
-  float const x_28 = (*(tint_symbol_5)).x;
+  float const x_28 = (*(tint_symbol_3)).x;
   a = int(x_28);
   int const x_30 = a;
   if ((~(x_30) < 0)) {
@@ -34,22 +34,28 @@
     int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_51 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+    *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   } else {
     int const x_58 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_59 = float(x_58);
-    *(tint_symbol_6) = float4(x_59, x_59, x_59, x_59);
+    *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl
index 0bc8372..16724bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.hlsl
@@ -41,11 +41,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl
index 98f7829..a05be67 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl.expected.msl
@@ -14,13 +14,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
-  float const x_28 = (*(tint_symbol_5)).x;
+  float const x_28 = (*(tint_symbol_3)).x;
   a = int(x_28);
   int const x_30 = a;
   if ((~(x_30) < 0)) {
@@ -34,22 +34,28 @@
     int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_51 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+    *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   } else {
     int const x_58 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_59 = float(x_58);
-    *(tint_symbol_6) = float4(x_59, x_59, x_59, x_59);
+    *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl
index ac797e7..65126f5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl
@@ -27,24 +27,24 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper_2 data = {};
   int b = 0;
   int y = 0;
   int i = 0;
   float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}};
-  data = tint_symbol_4;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}};
+  data = tint_symbol_2;
   int const x_49 = x_10.x_GLF_uniform_int_values.arr[1].el;
   b = x_49;
-  float const x_51 = (*(tint_symbol_6)).y;
+  float const x_51 = (*(tint_symbol_4)).y;
   int const x_54 = x_10.x_GLF_uniform_int_values.arr[1].el;
-  float const x_56 = (*(tint_symbol_6)).y;
+  float const x_56 = (*(tint_symbol_4)).y;
   int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
   y = clamp(int(x_51), (x_54 | int(x_56)), x_60);
   int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -93,17 +93,23 @@
   }
   int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
   float4 const x_120 = data.arr[x_118];
-  *(tint_symbol_7) = float4(x_120.x, x_120.y, x_120.z, x_120.w);
+  *(tint_symbol_5) = float4(x_120.x, x_120.y, x_120.z, x_120.w);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl
index ac797e7..65126f5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl
@@ -27,24 +27,24 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper_2 data = {};
   int b = 0;
   int y = 0;
   int i = 0;
   float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el;
   float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}};
-  data = tint_symbol_4;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}};
+  data = tint_symbol_2;
   int const x_49 = x_10.x_GLF_uniform_int_values.arr[1].el;
   b = x_49;
-  float const x_51 = (*(tint_symbol_6)).y;
+  float const x_51 = (*(tint_symbol_4)).y;
   int const x_54 = x_10.x_GLF_uniform_int_values.arr[1].el;
-  float const x_56 = (*(tint_symbol_6)).y;
+  float const x_56 = (*(tint_symbol_4)).y;
   int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
   y = clamp(int(x_51), (x_54 | int(x_56)), x_60);
   int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -93,17 +93,23 @@
   }
   int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
   float4 const x_120 = data.arr[x_118];
-  *(tint_symbol_7) = float4(x_120.x, x_120.y, x_120.z, x_120.w);
+  *(tint_symbol_5) = float4(x_120.x, x_120.y, x_120.z, x_120.w);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl
index 8837bf0..5e99870 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.hlsl
@@ -65,11 +65,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl
index a4060c7..7ff331c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl
@@ -24,19 +24,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int2 icoord = 0;
   float x_40 = 0.0f;
   int2 icoord_1 = 0;
-  float const x_42 = (*(tint_symbol_5)).x;
+  float const x_42 = (*(tint_symbol_3)).x;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_47 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if (((x_42 * x_44) > x_47)) {
-    float4 const x_52 = *(tint_symbol_5);
+    float4 const x_52 = *(tint_symbol_3);
     float const x_55 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_60 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -55,9 +55,9 @@
     }
     float const x_83 = x_40;
     int const x_85 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(x_65, x_67, x_83, float(x_85));
+    *(tint_symbol_4) = float4(x_65, x_67, x_83, float(x_85));
   } else {
-    float4 const x_88 = *(tint_symbol_5);
+    float4 const x_88 = *(tint_symbol_3);
     float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_94 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_96 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -66,18 +66,24 @@
     float const x_103 = x_6.x_GLF_uniform_float_values.arr[3].el;
     int const x_105 = icoord_1.x;
     float const x_108 = x_6.x_GLF_uniform_float_values.arr[3].el;
-    *(tint_symbol_6) = float4(x_101, x_103, float(x_105), x_108);
+    *(tint_symbol_4) = float4(x_101, x_103, float(x_105), x_108);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl
index 8837bf0..5e99870 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.hlsl
@@ -65,11 +65,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl
index a4060c7..7ff331c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl
@@ -24,19 +24,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int2 icoord = 0;
   float x_40 = 0.0f;
   int2 icoord_1 = 0;
-  float const x_42 = (*(tint_symbol_5)).x;
+  float const x_42 = (*(tint_symbol_3)).x;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_47 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if (((x_42 * x_44) > x_47)) {
-    float4 const x_52 = *(tint_symbol_5);
+    float4 const x_52 = *(tint_symbol_3);
     float const x_55 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_60 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -55,9 +55,9 @@
     }
     float const x_83 = x_40;
     int const x_85 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(x_65, x_67, x_83, float(x_85));
+    *(tint_symbol_4) = float4(x_65, x_67, x_83, float(x_85));
   } else {
-    float4 const x_88 = *(tint_symbol_5);
+    float4 const x_88 = *(tint_symbol_3);
     float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_94 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_96 = x_6.x_GLF_uniform_float_values.arr[2].el;
@@ -66,18 +66,24 @@
     float const x_103 = x_6.x_GLF_uniform_float_values.arr[3].el;
     int const x_105 = icoord_1.x;
     float const x_108 = x_6.x_GLF_uniform_float_values.arr[3].el;
-    *(tint_symbol_6) = float4(x_101, x_103, float(x_105), x_108);
+    *(tint_symbol_4) = float4(x_101, x_103, float(x_105), x_108);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl
index 44df57f..9fffe99 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.hlsl
@@ -81,11 +81,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl
index bb3bd84..b524bab 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl
@@ -24,23 +24,23 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_5) {
+float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_3) {
   while (true) {
     if (true) {
     } else {
       break;
     }
     while (true) {
-      float const x_77 = (*(tint_symbol_5)).y;
+      float const x_77 = (*(tint_symbol_3)).y;
       float const x_79 = x_8.x_GLF_uniform_float_values.arr[2].el;
       if ((x_77 < x_79)) {
         while (true) {
           {
-            float const x_88 = (*(tint_symbol_5)).x;
+            float const x_88 = (*(tint_symbol_3)).x;
             float const x_90 = x_8.x_GLF_uniform_float_values.arr[2].el;
             if ((x_88 < x_90)) {
             } else {
@@ -56,7 +56,7 @@
         return x_99;
       }
       {
-        float const x_101 = (*(tint_symbol_5)).y;
+        float const x_101 = (*(tint_symbol_3)).y;
         float const x_103 = x_8.x_GLF_uniform_float_values.arr[2].el;
         if ((x_101 < x_103)) {
         } else {
@@ -69,33 +69,39 @@
   return x_106;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float param = 0.0f;
-  float const x_41 = (*(tint_symbol_6)).x;
+  float const x_41 = (*(tint_symbol_4)).x;
   param = x_41;
-  float const x_42 = func_f1_(x_8, &(param), tint_symbol_6);
+  float const x_42 = func_f1_(x_8, &(param), tint_symbol_4);
   float const x_44 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_42 == x_44)) {
     int const x_50 = x_11.x_GLF_uniform_int_values.arr[0].el;
     int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_59 = x_11.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_7) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
+    *(tint_symbol_5) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
   } else {
     int const x_63 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_64 = float(x_63);
-    *(tint_symbol_7) = float4(x_64, x_64, x_64, x_64);
+    *(tint_symbol_5) = float4(x_64, x_64, x_64, x_64);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl
index 44df57f..9fffe99 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.hlsl
@@ -81,11 +81,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl
index bb3bd84..b524bab 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl
@@ -24,23 +24,23 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_5) {
+float func_f1_(constant buf1& x_8, thread float* const x, thread float4* const tint_symbol_3) {
   while (true) {
     if (true) {
     } else {
       break;
     }
     while (true) {
-      float const x_77 = (*(tint_symbol_5)).y;
+      float const x_77 = (*(tint_symbol_3)).y;
       float const x_79 = x_8.x_GLF_uniform_float_values.arr[2].el;
       if ((x_77 < x_79)) {
         while (true) {
           {
-            float const x_88 = (*(tint_symbol_5)).x;
+            float const x_88 = (*(tint_symbol_3)).x;
             float const x_90 = x_8.x_GLF_uniform_float_values.arr[2].el;
             if ((x_88 < x_90)) {
             } else {
@@ -56,7 +56,7 @@
         return x_99;
       }
       {
-        float const x_101 = (*(tint_symbol_5)).y;
+        float const x_101 = (*(tint_symbol_3)).y;
         float const x_103 = x_8.x_GLF_uniform_float_values.arr[2].el;
         if ((x_101 < x_103)) {
         } else {
@@ -69,33 +69,39 @@
   return x_106;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf1& x_8, constant buf0& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float param = 0.0f;
-  float const x_41 = (*(tint_symbol_6)).x;
+  float const x_41 = (*(tint_symbol_4)).x;
   param = x_41;
-  float const x_42 = func_f1_(x_8, &(param), tint_symbol_6);
+  float const x_42 = func_f1_(x_8, &(param), tint_symbol_4);
   float const x_44 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_42 == x_44)) {
     int const x_50 = x_11.x_GLF_uniform_int_values.arr[0].el;
     int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_59 = x_11.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_7) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
+    *(tint_symbol_5) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
   } else {
     int const x_63 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_64 = float(x_63);
-    *(tint_symbol_7) = float4(x_64, x_64, x_64, x_64);
+    *(tint_symbol_5) = float4(x_64, x_64, x_64, x_64);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl
index ca64df3..6f574e3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.hlsl
@@ -59,11 +59,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl
index d8dcfb9..2aade82 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl
@@ -27,7 +27,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -50,9 +50,9 @@
   return true;
 }
 
-void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 param = 0.0f;
-  float4 const x_42 = *(tint_symbol_5);
+  float4 const x_42 = *(tint_symbol_3);
   param = float2(x_42.x, x_42.y);
   bool const x_44 = func_vf2_(x_8, x_10, &(param));
   if (x_44) {
@@ -62,17 +62,23 @@
   int const x_51 = x_13.x_GLF_uniform_int_values.arr[1].el;
   int const x_54 = x_13.x_GLF_uniform_int_values.arr[1].el;
   int const x_57 = x_13.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_6) = float4(float(x_48), float(x_51), float(x_54), float(x_57));
+  *(tint_symbol_4) = float4(float(x_48), float(x_51), float(x_54), float(x_57));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, x_13, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, x_13, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl
index ca64df3..6f574e3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.hlsl
@@ -59,11 +59,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl
index d8dcfb9..2aade82 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl
@@ -27,7 +27,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -50,9 +50,9 @@
   return true;
 }
 
-void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 param = 0.0f;
-  float4 const x_42 = *(tint_symbol_5);
+  float4 const x_42 = *(tint_symbol_3);
   param = float2(x_42.x, x_42.y);
   bool const x_44 = func_vf2_(x_8, x_10, &(param));
   if (x_44) {
@@ -62,17 +62,23 @@
   int const x_51 = x_13.x_GLF_uniform_int_values.arr[1].el;
   int const x_54 = x_13.x_GLF_uniform_int_values.arr[1].el;
   int const x_57 = x_13.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_6) = float4(float(x_48), float(x_51), float(x_54), float(x_57));
+  *(tint_symbol_4) = float4(float(x_48), float(x_51), float(x_54), float(x_57));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf2& x_10, constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, x_13, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, x_13, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl
index f3abef7..6fc292f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl
index e0f4d2a..d2b35f9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl
@@ -18,23 +18,23 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
-  *(tint_symbol_4) = 0;
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_35 = x_6.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_5) = float4(float(x_26), float(x_29), float(x_32), float(x_35));
+  *(tint_symbol_4) = float4(float(x_26), float(x_29), float(x_32), float(x_35));
   while (true) {
     bool x_54 = false;
     bool x_55_phi = false;
-    int const x_42 = *(tint_symbol_4);
+    int const x_42 = *(tint_symbol_3);
     if ((x_42 < 100)) {
     } else {
       break;
     }
-    int const x_45 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
+    int const x_45 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
     x_55_phi = true;
     if (!(true)) {
       int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -48,26 +48,32 @@
     }
   }
   while (true) {
-    int const x_63 = *(tint_symbol_4);
+    int const x_63 = *(tint_symbol_3);
     if ((x_63 < 100)) {
     } else {
       break;
     }
-    int const x_66 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
+    int const x_66 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_70 = float(x_69);
-    *(tint_symbol_5) = float4(x_70, x_70, x_70, x_70);
+    *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl
index f3abef7..6fc292f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl
index e0f4d2a..d2b35f9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl
@@ -18,23 +18,23 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
-  *(tint_symbol_4) = 0;
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_35 = x_6.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_5) = float4(float(x_26), float(x_29), float(x_32), float(x_35));
+  *(tint_symbol_4) = float4(float(x_26), float(x_29), float(x_32), float(x_35));
   while (true) {
     bool x_54 = false;
     bool x_55_phi = false;
-    int const x_42 = *(tint_symbol_4);
+    int const x_42 = *(tint_symbol_3);
     if ((x_42 < 100)) {
     } else {
       break;
     }
-    int const x_45 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
+    int const x_45 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
     x_55_phi = true;
     if (!(true)) {
       int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -48,26 +48,32 @@
     }
   }
   while (true) {
-    int const x_63 = *(tint_symbol_4);
+    int const x_63 = *(tint_symbol_3);
     if ((x_63 < 100)) {
     } else {
       break;
     }
-    int const x_66 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
+    int const x_66 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_70 = float(x_69);
-    *(tint_symbol_5) = float4(x_70, x_70, x_70, x_70);
+    *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl
index 1765c5c..198f3b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.hlsl
@@ -106,9 +106,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl
index 5c952b7..e311cce 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl
@@ -31,14 +31,14 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4x4 m = float4x4(0.0f);
   float4 v = 0.0f;
   float f = 0.0f;
   int a = 0;
   int b = 0;
   float zero = 0.0f;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_62 = x_7.x_GLF_uniform_float_values.arr[1].el;
   float const x_64 = x_7.x_GLF_uniform_float_values.arr[2].el;
   float const x_66 = x_7.x_GLF_uniform_float_values.arr[3].el;
@@ -66,13 +66,13 @@
   int const x_110 = x_12.x_GLF_uniform_int_values.arr[0].el;
   a = x_110;
   while (true) {
-    int const x_115 = *(tint_symbol_4);
+    int const x_115 = *(tint_symbol_3);
     if ((x_115 < 10)) {
     } else {
       break;
     }
-    int const x_118 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
+    int const x_118 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
     int const x_120 = a;
     int const x_121 = clamp(x_120, 0, 3);
     float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -81,13 +81,13 @@
     int const x_129 = x_12.x_GLF_uniform_int_values.arr[2].el;
     b = x_129;
     while (true) {
-      int const x_134 = *(tint_symbol_4);
+      int const x_134 = *(tint_symbol_3);
       if ((x_134 < 10)) {
       } else {
         break;
       }
-      int const x_137 = *(tint_symbol_4);
-      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
+      int const x_137 = *(tint_symbol_3);
+      *(tint_symbol_3) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
       int const x_139 = b;
       float const x_142 = v[clamp(x_139, 0, 3)];
       int const x_143 = b;
@@ -130,16 +130,22 @@
   float const x_185 = zero;
   int const x_187 = x_12.x_GLF_uniform_int_values.arr[0].el;
   float const x_189 = f;
-  *(tint_symbol_5) = float4(x_184, x_185, float(x_187), x_189);
+  *(tint_symbol_4) = float4(x_184, x_185, float(x_187), x_189);
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_12, x_15, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_12, x_15, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl
index 1765c5c..198f3b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.hlsl
@@ -106,9 +106,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl
index 5c952b7..e311cce 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl
@@ -31,14 +31,14 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4x4 m = float4x4(0.0f);
   float4 v = 0.0f;
   float f = 0.0f;
   int a = 0;
   int b = 0;
   float zero = 0.0f;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_62 = x_7.x_GLF_uniform_float_values.arr[1].el;
   float const x_64 = x_7.x_GLF_uniform_float_values.arr[2].el;
   float const x_66 = x_7.x_GLF_uniform_float_values.arr[3].el;
@@ -66,13 +66,13 @@
   int const x_110 = x_12.x_GLF_uniform_int_values.arr[0].el;
   a = x_110;
   while (true) {
-    int const x_115 = *(tint_symbol_4);
+    int const x_115 = *(tint_symbol_3);
     if ((x_115 < 10)) {
     } else {
       break;
     }
-    int const x_118 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
+    int const x_118 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
     int const x_120 = a;
     int const x_121 = clamp(x_120, 0, 3);
     float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -81,13 +81,13 @@
     int const x_129 = x_12.x_GLF_uniform_int_values.arr[2].el;
     b = x_129;
     while (true) {
-      int const x_134 = *(tint_symbol_4);
+      int const x_134 = *(tint_symbol_3);
       if ((x_134 < 10)) {
       } else {
         break;
       }
-      int const x_137 = *(tint_symbol_4);
-      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
+      int const x_137 = *(tint_symbol_3);
+      *(tint_symbol_3) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
       int const x_139 = b;
       float const x_142 = v[clamp(x_139, 0, 3)];
       int const x_143 = b;
@@ -130,16 +130,22 @@
   float const x_185 = zero;
   int const x_187 = x_12.x_GLF_uniform_int_values.arr[0].el;
   float const x_189 = f;
-  *(tint_symbol_5) = float4(x_184, x_185, float(x_187), x_189);
+  *(tint_symbol_4) = float4(x_184, x_185, float(x_187), x_189);
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_12, x_15, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_12, x_15, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl
index 3187dfa..02e93be 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl
@@ -61,9 +61,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl
index 3a59796..1b0dd05 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl
@@ -18,15 +18,15 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int func_(constant buf0& x_7, thread int* const tint_symbol_4) {
+int func_(constant buf0& x_7, thread int* const tint_symbol_3) {
   while (true) {
-    int const x_72 = *(tint_symbol_4);
+    int const x_72 = *(tint_symbol_3);
     if ((x_72 < 100)) {
     } else {
       break;
     }
-    int const x_75 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
+    int const x_75 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
     int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el;
     return x_78;
   }
@@ -34,24 +34,24 @@
   return x_80;
 }
 
-void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int a = 0;
-  *(tint_symbol_5) = 0;
+  *(tint_symbol_4) = 0;
   while (true) {
-    int const x_35 = *(tint_symbol_5);
-    *(tint_symbol_5) = as_type<int>((as_type<uint>(x_35) + as_type<uint>(1)));
+    int const x_35 = *(tint_symbol_4);
+    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_35) + as_type<uint>(1)));
     if (false) {
       return;
     }
     {
-      int const x_39 = *(tint_symbol_5);
+      int const x_39 = *(tint_symbol_4);
       if ((true & (x_39 < 100))) {
       } else {
         break;
       }
     }
   }
-  int const x_42 = func_(x_7, tint_symbol_5);
+  int const x_42 = func_(x_7, tint_symbol_4);
   a = x_42;
   int const x_43 = a;
   int const x_45 = x_7.x_GLF_uniform_int_values.arr[2].el;
@@ -60,21 +60,27 @@
     int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_57 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_60 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
+    *(tint_symbol_5) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
   } else {
     int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_65 = float(x_64);
-    *(tint_symbol_6) = float4(x_65, x_65, x_65, x_65);
+    *(tint_symbol_5) = float4(x_65, x_65, x_65, x_65);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
-  thread int tint_symbol_7 = 0;
-  thread float4 tint_symbol_8 = 0.0f;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_8 = 0;
+  thread float4 tint_symbol_9 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl
index d19bc36..6400032 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl
index 7db4d7c..20d17ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl
@@ -18,15 +18,15 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int func_(constant buf0& x_7, thread int* const tint_symbol_4) {
+int func_(constant buf0& x_7, thread int* const tint_symbol_3) {
   while (true) {
-    int const x_72 = *(tint_symbol_4);
+    int const x_72 = *(tint_symbol_3);
     if ((x_72 < 100)) {
     } else {
       break;
     }
-    int const x_75 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
+    int const x_75 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
     int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el;
     return x_78;
   }
@@ -34,24 +34,24 @@
   return x_80;
 }
 
-void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int a = 0;
-  *(tint_symbol_5) = 0;
+  *(tint_symbol_4) = 0;
   while (true) {
-    int const x_35 = *(tint_symbol_5);
-    *(tint_symbol_5) = as_type<int>((as_type<uint>(x_35) + as_type<uint>(1)));
+    int const x_35 = *(tint_symbol_4);
+    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_35) + as_type<uint>(1)));
     if (false) {
       return;
     }
     {
-      int const x_39 = *(tint_symbol_5);
+      int const x_39 = *(tint_symbol_4);
       if ((true && (x_39 < 100))) {
       } else {
         break;
       }
     }
   }
-  int const x_42 = func_(x_7, tint_symbol_5);
+  int const x_42 = func_(x_7, tint_symbol_4);
   a = x_42;
   int const x_43 = a;
   int const x_45 = x_7.x_GLF_uniform_int_values.arr[2].el;
@@ -60,21 +60,27 @@
     int const x_54 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_57 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_60 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
+    *(tint_symbol_5) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
   } else {
     int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_65 = float(x_64);
-    *(tint_symbol_6) = float4(x_65, x_65, x_65, x_65);
+    *(tint_symbol_5) = float4(x_65, x_65, x_65, x_65);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
-  thread int tint_symbol_7 = 0;
-  thread float4 tint_symbol_8 = 0.0f;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_8 = 0;
+  thread float4 tint_symbol_9 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl
index 6d2b86d..40a6b45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.hlsl
@@ -67,9 +67,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl
index 56d2e87..657e844 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_23 = 0;
   int x_27 = 0;
   int x_37 = 0;
@@ -67,19 +67,25 @@
   if ((x_45 == x_32)) {
     float const x_50 = float(x_27);
     float const x_51 = float(x_32);
-    *(tint_symbol_4) = float4(x_50, x_51, x_51, x_50);
+    *(tint_symbol_3) = float4(x_50, x_51, x_51, x_50);
   } else {
     float const x_53 = float(x_32);
-    *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+    *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl
index 6d2b86d..40a6b45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.hlsl
@@ -67,9 +67,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl
index 56d2e87..657e844 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_23 = 0;
   int x_27 = 0;
   int x_37 = 0;
@@ -67,19 +67,25 @@
   if ((x_45 == x_32)) {
     float const x_50 = float(x_27);
     float const x_51 = float(x_32);
-    *(tint_symbol_4) = float4(x_50, x_51, x_51, x_50);
+    *(tint_symbol_3) = float4(x_50, x_51, x_51, x_50);
   } else {
     float const x_53 = float(x_32);
-    *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+    *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl
index b176ae5..cb25c1f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl
index ef3b65b..29a482d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl
@@ -18,43 +18,49 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
-  *(tint_symbol_4) = 0;
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = 0;
   while (true) {
-    int const x_30 = *(tint_symbol_4);
+    int const x_30 = *(tint_symbol_3);
     if ((x_30 < 100)) {
     } else {
       break;
     }
-    int const x_33 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
-    int const x_35 = *(tint_symbol_4);
-    int const x_36 = *(tint_symbol_4);
+    int const x_33 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
+    int const x_35 = *(tint_symbol_3);
+    int const x_36 = *(tint_symbol_3);
     if ((as_type<int>((as_type<uint>(x_35) * as_type<uint>(x_36))) > 10)) {
       break;
     }
   }
-  int const x_41 = *(tint_symbol_4);
+  int const x_41 = *(tint_symbol_3);
   if ((x_41 == 4)) {
     int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
+    *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
   } else {
     int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_61 = float(x_60);
-    *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61);
+    *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl
index b176ae5..cb25c1f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl
index ef3b65b..29a482d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl
@@ -18,43 +18,49 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
-  *(tint_symbol_4) = 0;
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = 0;
   while (true) {
-    int const x_30 = *(tint_symbol_4);
+    int const x_30 = *(tint_symbol_3);
     if ((x_30 < 100)) {
     } else {
       break;
     }
-    int const x_33 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
-    int const x_35 = *(tint_symbol_4);
-    int const x_36 = *(tint_symbol_4);
+    int const x_33 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
+    int const x_35 = *(tint_symbol_3);
+    int const x_36 = *(tint_symbol_3);
     if ((as_type<int>((as_type<uint>(x_35) * as_type<uint>(x_36))) > 10)) {
       break;
     }
   }
-  int const x_41 = *(tint_symbol_4);
+  int const x_41 = *(tint_symbol_3);
   if ((x_41 == 4)) {
     int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
+    *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
   } else {
     int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_61 = float(x_60);
-    *(tint_symbol_5) = float4(x_61, x_61, x_61, x_61);
+    *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl
index edc0a80..bab5e31 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl
index 5db673b..440886f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_25 = x_6.zero;
   a = x_25;
@@ -25,18 +25,24 @@
   }
   int const x_35 = a;
   if ((x_35 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl
index edc0a80..bab5e31 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl
index 5db673b..440886f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_25 = x_6.zero;
   a = x_25;
@@ -25,18 +25,24 @@
   }
   int const x_35 = a;
   if ((x_35 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl
index 7837732..6470de0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.hlsl
@@ -49,11 +49,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl
index 2a9fb15..921a389 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.spvasm.expected.msl
@@ -24,14 +24,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float const x_31 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31);
-  float const x_34 = (*(tint_symbol_6)).y;
+  *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31);
+  float const x_34 = (*(tint_symbol_4)).y;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_34 >= x_36)) {
     int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el;
@@ -41,7 +41,7 @@
         int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el;
         float const x_46 = float(x_45);
         float const x_47 = float(x_41);
-        *(tint_symbol_5) = float4(x_46, x_47, x_47, x_46);
+        *(tint_symbol_3) = float4(x_46, x_47, x_47, x_46);
         break;
       }
       default: {
@@ -52,18 +52,24 @@
   int const x_50 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_52 = x_8.x_GLF_uniform_int_values.arr[0].el;
   if ((x_50 == x_52)) {
-    *(tint_symbol_5) = float4(x_36, x_36, x_36, x_36);
+    *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_8, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_8, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl
index 7837732..6470de0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.hlsl
@@ -49,11 +49,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl
index 2a9fb15..921a389 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl.expected.msl
@@ -24,14 +24,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float const x_31 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31);
-  float const x_34 = (*(tint_symbol_6)).y;
+  *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31);
+  float const x_34 = (*(tint_symbol_4)).y;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_34 >= x_36)) {
     int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el;
@@ -41,7 +41,7 @@
         int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el;
         float const x_46 = float(x_45);
         float const x_47 = float(x_41);
-        *(tint_symbol_5) = float4(x_46, x_47, x_47, x_46);
+        *(tint_symbol_3) = float4(x_46, x_47, x_47, x_46);
         break;
       }
       default: {
@@ -52,18 +52,24 @@
   int const x_50 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_52 = x_8.x_GLF_uniform_int_values.arr[0].el;
   if ((x_50 == x_52)) {
-    *(tint_symbol_5) = float4(x_36, x_36, x_36, x_36);
+    *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_8, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_8, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl
index 1ee50e8..18391f6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl
index 20c03a2..5bbab88 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int c = 0;
@@ -67,20 +67,26 @@
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
+    *(tint_symbol_3) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
   } else {
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl
index 1ee50e8..18391f6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl
index 20c03a2..5bbab88 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int c = 0;
@@ -67,20 +67,26 @@
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
+    *(tint_symbol_3) = float4(float(x_71), float(x_74), float(x_77), float(x_80));
   } else {
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl
index 5317e21..98a05e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.hlsl
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl
index 5989dc4..48dc9ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = 1;
   while (true) {
@@ -45,20 +45,26 @@
     int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53));
+    *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53));
   } else {
     int const x_57 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl
index 5317e21..98a05e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.hlsl
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl
index 5989dc4..48dc9ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = 1;
   while (true) {
@@ -45,20 +45,26 @@
     int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53));
+    *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53));
   } else {
     int const x_57 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl
index 3ac8a37..bcaa7b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl
index 82604e9..c35cc8c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -42,18 +42,24 @@
   }
   int const x_44 = a;
   if ((x_44 == 2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl
index 3ac8a37..bcaa7b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl
index 82604e9..c35cc8c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -42,18 +42,24 @@
   }
   int const x_44 = a;
   if ((x_44 == 2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl
index 9e41aaa..33c8f79 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.hlsl
@@ -17,8 +17,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
   const float x_38 = asfloat(x_6[2].x);
-  const float tint_symbol_4[3] = {x_34, x_36, x_38};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_34, x_36, x_38};
+  arr = tint_symbol_3;
   a = 0;
   while (true) {
     const int x_44 = a;
@@ -79,9 +79,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl
index 7f0eda5..c5dd937 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 arr = {};
   int a = 0;
   bool x_69 = false;
@@ -41,8 +41,8 @@
   float const x_34 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_34, x_36, x_38}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_34, x_36, x_38}};
+  arr = tint_symbol_2;
   a = 0;
   while (true) {
     int const x_44 = a;
@@ -84,19 +84,25 @@
     float const x_89 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_93 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_5) = float4(x_87, x_89, x_91, x_93);
+    *(tint_symbol_4) = float4(x_87, x_89, x_91, x_93);
   } else {
     float const x_96 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_5) = float4(x_96, x_96, x_96, x_96);
+    *(tint_symbol_4) = float4(x_96, x_96, x_96, x_96);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl
index 9e41aaa..33c8f79 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.hlsl
@@ -17,8 +17,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const float x_36 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
   const float x_38 = asfloat(x_6[2].x);
-  const float tint_symbol_4[3] = {x_34, x_36, x_38};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[3] = {x_34, x_36, x_38};
+  arr = tint_symbol_3;
   a = 0;
   while (true) {
     const int x_44 = a;
@@ -79,9 +79,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl
index 7f0eda5..c5dd937 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 arr = {};
   int a = 0;
   bool x_69 = false;
@@ -41,8 +41,8 @@
   float const x_34 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_36 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_38 = x_6.x_GLF_uniform_float_values.arr[2].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_34, x_36, x_38}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_34, x_36, x_38}};
+  arr = tint_symbol_2;
   a = 0;
   while (true) {
     int const x_44 = a;
@@ -84,19 +84,25 @@
     float const x_89 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_91 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_93 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_5) = float4(x_87, x_89, x_91, x_93);
+    *(tint_symbol_4) = float4(x_87, x_89, x_91, x_93);
   } else {
     float const x_96 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_5) = float4(x_96, x_96, x_96, x_96);
+    *(tint_symbol_4) = float4(x_96, x_96, x_96, x_96);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl
index 8d0ce84..f581244 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl
index 9c31fce..f0d8a33 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   float f0 = 0.0f;
   float f1 = 0.0f;
   int i = 0;
@@ -72,20 +72,26 @@
     int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_10.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
+    *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
   } else {
     int const x_82 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_83 = float(x_82);
-    *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83);
+    *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl
index 8d0ce84..f581244 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl
index 9c31fce..f0d8a33 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   float f0 = 0.0f;
   float f1 = 0.0f;
   int i = 0;
@@ -72,20 +72,26 @@
     int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_10.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
+    *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
   } else {
     int const x_82 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_83 = float(x_82);
-    *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83);
+    *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl
index e89c902..a51dc8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.hlsl
@@ -71,9 +71,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl
index 6c3580d..2d05e09 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func_(constant buf0& x_7, thread int* const tint_symbol_4) {
+void func_(constant buf0& x_7, thread int* const tint_symbol_3) {
   int x_66_phi = 0;
   int const x_62 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el;
@@ -32,8 +32,8 @@
       break;
     }
     {
-      int const x_73 = *(tint_symbol_4);
-      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
+      int const x_73 = *(tint_symbol_3);
+      *(tint_symbol_3) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
       x_67 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
       x_66_phi = x_67;
     }
@@ -44,53 +44,59 @@
   return;
 }
 
-void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  *(tint_symbol_5) = 0;
+void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = 0;
   while (true) {
-    int const x_28 = *(tint_symbol_5);
+    int const x_28 = *(tint_symbol_4);
     if ((x_28 < 10)) {
     } else {
       break;
     }
     {
-      int const x_32 = *(tint_symbol_5);
-      *(tint_symbol_5) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
-      func_(x_7, tint_symbol_5);
+      int const x_32 = *(tint_symbol_4);
+      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
+      func_(x_7, tint_symbol_4);
     }
   }
   while (true) {
-    int const x_36 = *(tint_symbol_5);
+    int const x_36 = *(tint_symbol_4);
     if ((x_36 < 10)) {
     } else {
       break;
     }
     {
-      int const x_40 = *(tint_symbol_5);
-      *(tint_symbol_5) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
+      int const x_40 = *(tint_symbol_4);
+      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
     }
   }
-  int const x_42 = *(tint_symbol_5);
+  int const x_42 = *(tint_symbol_4);
   int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el;
   if ((x_42 == x_44)) {
     int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_51 = float(x_50);
     int const x_53 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_54 = float(x_53);
-    *(tint_symbol_6) = float4(x_51, x_54, x_54, x_51);
+    *(tint_symbol_5) = float4(x_51, x_54, x_54, x_51);
   } else {
     int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_5) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
-  thread int tint_symbol_7 = 0;
-  thread float4 tint_symbol_8 = 0.0f;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_8 = 0;
+  thread float4 tint_symbol_9 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl
index e89c902..a51dc8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.hlsl
@@ -71,9 +71,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl
index 6c3580d..2d05e09 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func_(constant buf0& x_7, thread int* const tint_symbol_4) {
+void func_(constant buf0& x_7, thread int* const tint_symbol_3) {
   int x_66_phi = 0;
   int const x_62 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el;
@@ -32,8 +32,8 @@
       break;
     }
     {
-      int const x_73 = *(tint_symbol_4);
-      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
+      int const x_73 = *(tint_symbol_3);
+      *(tint_symbol_3) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
       x_67 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
       x_66_phi = x_67;
     }
@@ -44,53 +44,59 @@
   return;
 }
 
-void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  *(tint_symbol_5) = 0;
+void main_1(constant buf0& x_7, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = 0;
   while (true) {
-    int const x_28 = *(tint_symbol_5);
+    int const x_28 = *(tint_symbol_4);
     if ((x_28 < 10)) {
     } else {
       break;
     }
     {
-      int const x_32 = *(tint_symbol_5);
-      *(tint_symbol_5) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
-      func_(x_7, tint_symbol_5);
+      int const x_32 = *(tint_symbol_4);
+      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
+      func_(x_7, tint_symbol_4);
     }
   }
   while (true) {
-    int const x_36 = *(tint_symbol_5);
+    int const x_36 = *(tint_symbol_4);
     if ((x_36 < 10)) {
     } else {
       break;
     }
     {
-      int const x_40 = *(tint_symbol_5);
-      *(tint_symbol_5) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
+      int const x_40 = *(tint_symbol_4);
+      *(tint_symbol_4) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
     }
   }
-  int const x_42 = *(tint_symbol_5);
+  int const x_42 = *(tint_symbol_4);
   int const x_44 = x_7.x_GLF_uniform_int_values.arr[2].el;
   if ((x_42 == x_44)) {
     int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_51 = float(x_50);
     int const x_53 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_54 = float(x_53);
-    *(tint_symbol_6) = float4(x_51, x_54, x_54, x_51);
+    *(tint_symbol_5) = float4(x_51, x_54, x_54, x_51);
   } else {
     int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_5) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread int* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
-  thread int tint_symbol_7 = 0;
-  thread float4 tint_symbol_8 = 0.0f;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_8 = 0;
+  thread float4 tint_symbol_9 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl
index a84f052..724836b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl
index 141d1a7..9358cfe 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper a = {};
   int b = 0;
   int c = 0;
@@ -27,7 +27,7 @@
   c = x_40;
   int const x_41 = c;
   if ((x_41 > 1)) {
-    *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 1.0f, 1.0f, 0.0f);
     int const x_45 = b;
     b = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
   }
@@ -39,18 +39,24 @@
   a.arr[x_50_save] = as_type<int>((as_type<uint>(x_51) + as_type<uint>(1)));
   int const x_54 = a.arr[2];
   if ((x_54 == 4)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl
index a84f052..724836b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl
index 141d1a7..9358cfe 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper a = {};
   int b = 0;
   int c = 0;
@@ -27,7 +27,7 @@
   c = x_40;
   int const x_41 = c;
   if ((x_41 > 1)) {
-    *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 1.0f, 1.0f, 0.0f);
     int const x_45 = b;
     b = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
   }
@@ -39,18 +39,24 @@
   a.arr[x_50_save] = as_type<int>((as_type<uint>(x_51) + as_type<uint>(1)));
   int const x_54 = a.arr[2];
   if ((x_54 == 4)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl
index 7e2ef37..ae9dea0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.hlsl
@@ -21,8 +21,8 @@
     }
     const int x_50 = i;
     const int x_52 = asint(x_6[4].x);
-    const int tint_symbol_3[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
-    indexable = tint_symbol_3;
+    const int tint_symbol_2[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+    indexable = tint_symbol_2;
     const int x_55 = indexable[(x_50 % x_52)];
     a = (a + x_55);
     {
@@ -52,9 +52,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl
index 3f78d7f..09f1285 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   int a = 0;
   int i = 0;
   tint_array_wrapper_1 indexable = {};
@@ -38,8 +38,8 @@
     }
     int const x_50 = i;
     int const x_52 = x_6.x_GLF_uniform_int_values.arr[4].el;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}};
+    indexable = tint_symbol_2;
     int const x_55 = indexable.arr[(x_50 % x_52)];
     int const x_56 = a;
     a = as_type<int>((as_type<uint>(x_56) + as_type<uint>(x_55)));
@@ -55,20 +55,26 @@
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_5) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
+    *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
   } else {
     int const x_81 = x_6.x_GLF_uniform_int_values.arr[3].el;
     float const x_82 = float(x_81);
-    *(tint_symbol_5) = float4(x_82, x_82, x_82, x_82);
+    *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl
index 7e2ef37..ae9dea0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.hlsl
@@ -21,8 +21,8 @@
     }
     const int x_50 = i;
     const int x_52 = asint(x_6[4].x);
-    const int tint_symbol_3[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
-    indexable = tint_symbol_3;
+    const int tint_symbol_2[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+    indexable = tint_symbol_2;
     const int x_55 = indexable[(x_50 % x_52)];
     a = (a + x_55);
     {
@@ -52,9 +52,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl
index 3f78d7f..09f1285 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   int a = 0;
   int i = 0;
   tint_array_wrapper_1 indexable = {};
@@ -38,8 +38,8 @@
     }
     int const x_50 = i;
     int const x_52 = x_6.x_GLF_uniform_int_values.arr[4].el;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={1, 2, 3, 4, 5, 6, 7, 8, 9}};
+    indexable = tint_symbol_2;
     int const x_55 = indexable.arr[(x_50 % x_52)];
     int const x_56 = a;
     a = as_type<int>((as_type<uint>(x_56) + as_type<uint>(x_55)));
@@ -55,20 +55,26 @@
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_5) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
+    *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
   } else {
     int const x_81 = x_6.x_GLF_uniform_int_values.arr[3].el;
     float const x_82 = float(x_81);
-    *(tint_symbol_5) = float4(x_82, x_82, x_82, x_82);
+    *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl
index 525515f..23abc3a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl
@@ -84,9 +84,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl
index 083b8d5..513a3b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int c = 0;
@@ -86,20 +86,26 @@
     int const x_92 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_95 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_98 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
+    *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
   } else {
     int const x_102 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_103 = float(x_102);
-    *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103);
+    *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl
index 1693e5c..bd85b49 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.hlsl
@@ -88,9 +88,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl
index e80a8e0..0b75bf9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int b = 0;
   int c = 0;
@@ -86,20 +86,26 @@
     int const x_92 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_95 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_98 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
+    *(tint_symbol_3) = float4(float(x_89), float(x_92), float(x_95), float(x_98));
   } else {
     int const x_102 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_103 = float(x_102);
-    *(tint_symbol_4) = float4(x_103, x_103, x_103, x_103);
+    *(tint_symbol_3) = float4(x_103, x_103, x_103, x_103);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl
index 384a32d..ee2987f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   float3x3 m = float3x3(0.0f);
   int a = 0;
   tint_array_wrapper_2 arr = {};
@@ -47,8 +47,8 @@
   m[x_53][x_54] = x_56;
   float3 const x_59 = m[1];
   float3 const x_61 = m[1];
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_59, x_61}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_59, x_61}};
+  arr = tint_symbol_2;
   float const x_64 = x_9.x_GLF_uniform_float_values.arr[1].el;
   v = float3(x_64, x_64, x_64);
   int const x_66 = a;
@@ -64,20 +64,26 @@
     int const x_91 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_94 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_97 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
+    *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
   } else {
     int const x_101 = x_6.x_GLF_uniform_int_values.arr[3].el;
     float const x_102 = float(x_101);
-    *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102);
+    *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl
index 384a32d..ee2987f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   float3x3 m = float3x3(0.0f);
   int a = 0;
   tint_array_wrapper_2 arr = {};
@@ -47,8 +47,8 @@
   m[x_53][x_54] = x_56;
   float3 const x_59 = m[1];
   float3 const x_61 = m[1];
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_59, x_61}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_59, x_61}};
+  arr = tint_symbol_2;
   float const x_64 = x_9.x_GLF_uniform_float_values.arr[1].el;
   v = float3(x_64, x_64, x_64);
   int const x_66 = a;
@@ -64,20 +64,26 @@
     int const x_91 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_94 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_97 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
+    *(tint_symbol_4) = float4(float(x_88), float(x_91), float(x_94), float(x_97));
   } else {
     int const x_101 = x_6.x_GLF_uniform_int_values.arr[3].el;
     float const x_102 = float(x_101);
-    *(tint_symbol_5) = float4(x_102, x_102, x_102, x_102);
+    *(tint_symbol_4) = float4(x_102, x_102, x_102, x_102);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl
index 00f2b25..09d684e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   int a = 0;
   float4 v = 0.0f;
   float3x4 m = float3x4(0.0f);
@@ -58,20 +58,26 @@
     int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_101 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_104 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_95), float(x_98), float(x_101), float(x_104));
+    *(tint_symbol_3) = float4(float(x_95), float(x_98), float(x_101), float(x_104));
   } else {
     int const x_108 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_109 = float(x_108);
-    *(tint_symbol_4) = float4(x_109, x_109, x_109, x_109);
+    *(tint_symbol_3) = float4(x_109, x_109, x_109, x_109);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl
index 00f2b25..09d684e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   int a = 0;
   float4 v = 0.0f;
   float3x4 m = float3x4(0.0f);
@@ -58,20 +58,26 @@
     int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_101 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_104 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_95), float(x_98), float(x_101), float(x_104));
+    *(tint_symbol_3) = float4(float(x_95), float(x_98), float(x_101), float(x_104));
   } else {
     int const x_108 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_109 = float(x_108);
-    *(tint_symbol_4) = float4(x_109, x_109, x_109, x_109);
+    *(tint_symbol_3) = float4(x_109, x_109, x_109, x_109);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl
index 9f97945..4f97f3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.hlsl
@@ -34,11 +34,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl
index ab5b07e..13d527f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.spvasm.expected.msl
@@ -4,14 +4,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float4 func_(thread float4* const tint_symbol_5) {
+float4 func_(thread float4* const tint_symbol_3) {
   float x = 0.0f;
   x = 1.0f;
-  float const x_30 = (*(tint_symbol_5)).x;
+  float const x_30 = (*(tint_symbol_3)).x;
   if ((x_30 < 0.0f)) {
     x = 0.5f;
   }
@@ -19,11 +19,11 @@
   return float4(x_34, 0.0f, 0.0f, 1.0f);
 }
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   while (true) {
-    float4 const x_26 = func_(tint_symbol_7);
-    *(tint_symbol_6) = x_26;
+    float4 const x_26 = func_(tint_symbol_5);
+    *(tint_symbol_4) = x_26;
     if (false) {
     } else {
       break;
@@ -32,13 +32,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_7, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl
index 9f97945..4f97f3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.hlsl
@@ -34,11 +34,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl
index ab5b07e..13d527f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl.expected.msl
@@ -4,14 +4,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float4 func_(thread float4* const tint_symbol_5) {
+float4 func_(thread float4* const tint_symbol_3) {
   float x = 0.0f;
   x = 1.0f;
-  float const x_30 = (*(tint_symbol_5)).x;
+  float const x_30 = (*(tint_symbol_3)).x;
   if ((x_30 < 0.0f)) {
     x = 0.5f;
   }
@@ -19,11 +19,11 @@
   return float4(x_34, 0.0f, 0.0f, 1.0f);
 }
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   while (true) {
-    float4 const x_26 = func_(tint_symbol_7);
-    *(tint_symbol_6) = x_26;
+    float4 const x_26 = func_(tint_symbol_5);
+    *(tint_symbol_4) = x_26;
     if (false) {
     } else {
       break;
@@ -32,13 +32,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_7, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl
index e3f6afa..dc586b3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl
index 241c4bb..b982212 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.spvasm.expected.msl
@@ -58,10 +58,10 @@
   return x_51;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   while (true) {
     float4 const x_30 = returnRed_(x_6);
-    *(tint_symbol_4) = x_30;
+    *(tint_symbol_3) = x_30;
     if (false) {
     } else {
       break;
@@ -70,11 +70,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl
index e3f6afa..dc586b3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl
index 241c4bb..b982212 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl.expected.msl
@@ -58,10 +58,10 @@
   return x_51;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   while (true) {
     float4 const x_30 = returnRed_(x_6);
-    *(tint_symbol_4) = x_30;
+    *(tint_symbol_3) = x_30;
     if (false) {
     } else {
       break;
@@ -70,11 +70,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl
index 4dcae3d..a2053a3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl
index 5db1f98..117d43e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl
@@ -34,21 +34,27 @@
   return 1.0f;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   if (false) {
     float const x_28 = func_();
-    *(tint_symbol_4) = float4(x_28, x_28, x_28, x_28);
+    *(tint_symbol_3) = float4(x_28, x_28, x_28, x_28);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl
index 4dcae3d..a2053a3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl
index 5db1f98..117d43e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl
@@ -34,21 +34,27 @@
   return 1.0f;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   if (false) {
     float const x_28 = func_();
-    *(tint_symbol_4) = float4(x_28, x_28, x_28, x_28);
+    *(tint_symbol_3) = float4(x_28, x_28, x_28, x_28);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl
index e579458..530e5b8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.hlsl
@@ -35,11 +35,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl
index 019020d..d992865 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.spvasm.expected.msl
@@ -4,16 +4,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_(thread float4* const tint_symbol_5) {
+float func_(thread float4* const tint_symbol_3) {
   float x = 0.0f;
   x = 2.0f;
-  float const x_35 = (*(tint_symbol_5)).x;
+  float const x_35 = (*(tint_symbol_3)).x;
   if ((x_35 == 12.0f)) {
-    float const x_40 = (*(tint_symbol_5)).y;
+    float const x_40 = (*(tint_symbol_3)).y;
     if ((x_40 == 13.0f)) {
       float const x_44 = x;
       x = (x_44 + 1.0f);
@@ -24,23 +24,29 @@
   return 1.0f;
 }
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   if (false) {
-    float const x_31 = func_(tint_symbol_6);
-    *(tint_symbol_7) = float4(x_31, x_31, x_31, x_31);
+    float const x_31 = func_(tint_symbol_4);
+    *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31);
   } else {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl
index e579458..530e5b8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.hlsl
@@ -35,11 +35,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl
index 019020d..d992865 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl.expected.msl
@@ -4,16 +4,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_(thread float4* const tint_symbol_5) {
+float func_(thread float4* const tint_symbol_3) {
   float x = 0.0f;
   x = 2.0f;
-  float const x_35 = (*(tint_symbol_5)).x;
+  float const x_35 = (*(tint_symbol_3)).x;
   if ((x_35 == 12.0f)) {
-    float const x_40 = (*(tint_symbol_5)).y;
+    float const x_40 = (*(tint_symbol_3)).y;
     if ((x_40 == 13.0f)) {
       float const x_44 = x;
       x = (x_44 + 1.0f);
@@ -24,23 +24,29 @@
   return 1.0f;
 }
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   if (false) {
-    float const x_31 = func_(tint_symbol_6);
-    *(tint_symbol_7) = float4(x_31, x_31, x_31, x_31);
+    float const x_31 = func_(tint_symbol_4);
+    *(tint_symbol_5) = float4(x_31, x_31, x_31, x_31);
   } else {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl
index 489e5a1..dd5b54a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.hlsl
@@ -73,11 +73,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl
index c8fdc80..46227d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   tint_array_wrapper_2 arr = {};
   int a = 0;
@@ -53,7 +53,7 @@
     }
   }
   a = -1;
-  float const x_57 = (*(tint_symbol_5)).y;
+  float const x_57 = (*(tint_symbol_3)).y;
   float const x_59 = x_11.x_GLF_uniform_float_values.arr[0].el;
   if (!((x_57 < x_59))) {
     int const x_64 = a;
@@ -75,22 +75,28 @@
     int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_90 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_92 = a;
-    *(tint_symbol_6) = float4(float(x_84), float(x_87), float(x_90), float(x_92));
+    *(tint_symbol_4) = float4(float(x_84), float(x_87), float(x_90), float(x_92));
   } else {
     int const x_96 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_97 = float(x_96);
-    *(tint_symbol_6) = float4(x_97, x_97, x_97, x_97);
+    *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl
index 489e5a1..dd5b54a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.hlsl
@@ -73,11 +73,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl
index c8fdc80..46227d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   tint_array_wrapper_2 arr = {};
   int a = 0;
@@ -53,7 +53,7 @@
     }
   }
   a = -1;
-  float const x_57 = (*(tint_symbol_5)).y;
+  float const x_57 = (*(tint_symbol_3)).y;
   float const x_59 = x_11.x_GLF_uniform_float_values.arr[0].el;
   if (!((x_57 < x_59))) {
     int const x_64 = a;
@@ -75,22 +75,28 @@
     int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_90 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_92 = a;
-    *(tint_symbol_6) = float4(float(x_84), float(x_87), float(x_90), float(x_92));
+    *(tint_symbol_4) = float4(float(x_84), float(x_87), float(x_90), float(x_92));
   } else {
     int const x_96 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_97 = float(x_96);
-    *(tint_symbol_6) = float4(x_97, x_97, x_97, x_97);
+    *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl
index 18402b4..a3d6d58 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl
index 4d2e299..ff67ea0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl
@@ -33,7 +33,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   float b = 0.0f;
@@ -65,19 +65,25 @@
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_72 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_63), float(x_66), float(x_69), float(x_72));
+    *(tint_symbol_3) = float4(float(x_63), float(x_66), float(x_69), float(x_72));
   } else {
     float const x_75 = b;
-    *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75);
+    *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl
index 18402b4..a3d6d58 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl
index 4d2e299..ff67ea0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl
@@ -33,7 +33,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   float b = 0.0f;
@@ -65,19 +65,25 @@
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_72 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_63), float(x_66), float(x_69), float(x_72));
+    *(tint_symbol_3) = float4(float(x_63), float(x_66), float(x_69), float(x_72));
   } else {
     float const x_75 = b;
-    *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75);
+    *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl
index ae1cfdf..4122d2b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.hlsl
@@ -72,9 +72,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl
index 6c318fa..05b50ed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl
@@ -63,7 +63,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float param = 0.0f;
   param = 0.699999988f;
   int const x_34 = func_f1_(x_8, &(param));
@@ -73,20 +73,26 @@
     int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+    *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
   } else {
     int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el;
     float const x_56 = float(x_55);
-    *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
+    *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl
index ae1cfdf..4122d2b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.hlsl
@@ -72,9 +72,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl
index 6c318fa..05b50ed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl
@@ -63,7 +63,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float param = 0.0f;
   param = 0.699999988f;
   int const x_34 = func_f1_(x_8, &(param));
@@ -73,20 +73,26 @@
     int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el;
     int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+    *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
   } else {
     int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el;
     float const x_56 = float(x_55);
-    *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
+    *(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl
index 8a664a3..ca2b4ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.hlsl
@@ -75,11 +75,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl
index 523aec7..2627080 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5) {
+int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_2 A = {};
   int a = 0;
@@ -53,7 +53,7 @@
     }
   }
   a = -1;
-  float const x_73 = (*(tint_symbol_5)).y;
+  float const x_73 = (*(tint_symbol_3)).y;
   float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el;
   if ((x_73 >= x_75)) {
     int const x_79 = a;
@@ -78,25 +78,31 @@
   return 0;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i_1 = 0;
-  int const x_42 = f1_(x_8, x_12, tint_symbol_6);
+  int const x_42 = f1_(x_8, x_12, tint_symbol_4);
   i_1 = x_42;
   int const x_44 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_46 = i_1;
   int const x_48 = i_1;
   int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_7) = float4(float(x_44), float(x_46), float(x_48), float(x_51));
+  *(tint_symbol_5) = float4(float(x_44), float(x_46), float(x_48), float(x_51));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, x_12, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, x_12, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl
index 8a664a3..ca2b4ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.hlsl
@@ -75,11 +75,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl
index 523aec7..2627080 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5) {
+int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_2 A = {};
   int a = 0;
@@ -53,7 +53,7 @@
     }
   }
   a = -1;
-  float const x_73 = (*(tint_symbol_5)).y;
+  float const x_73 = (*(tint_symbol_3)).y;
   float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el;
   if ((x_73 >= x_75)) {
     int const x_79 = a;
@@ -78,25 +78,31 @@
   return 0;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i_1 = 0;
-  int const x_42 = f1_(x_8, x_12, tint_symbol_6);
+  int const x_42 = f1_(x_8, x_12, tint_symbol_4);
   i_1 = x_42;
   int const x_44 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_46 = i_1;
   int const x_48 = i_1;
   int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_7) = float4(float(x_44), float(x_46), float(x_48), float(x_51));
+  *(tint_symbol_5) = float4(float(x_44), float(x_46), float(x_48), float(x_51));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, x_12, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, x_12, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl
index 67cbab7..9ce823c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.hlsl
@@ -101,9 +101,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl
index d135092..0134af1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float4 ref = 0.0f;
@@ -91,20 +91,26 @@
     int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_121 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_124 = x_10.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
+    *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
   } else {
     int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_130 = v1[x_128];
-    *(tint_symbol_4) = float4(x_130, x_130, x_130, x_130);
+    *(tint_symbol_3) = float4(x_130, x_130, x_130, x_130);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl
index 67cbab7..9ce823c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.hlsl
@@ -101,9 +101,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl
index d135092..0134af1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float4 ref = 0.0f;
@@ -91,20 +91,26 @@
     int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_121 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_124 = x_10.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
+    *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
   } else {
     int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_130 = v1[x_128];
-    *(tint_symbol_4) = float4(x_130, x_130, x_130, x_130);
+    *(tint_symbol_3) = float4(x_130, x_130, x_130, x_130);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl
index 01a9ed0..1990256 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.hlsl
@@ -74,9 +74,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl
index 3db287a..253011e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int count0 = 0;
   int count1 = 0;
   int i = 0;
@@ -65,27 +65,33 @@
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_70 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
+    *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
   } else {
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_75 = float(x_74);
-    *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75);
+    *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75);
   }
   int const x_77 = count0;
   int const x_79 = x_6.x_GLF_uniform_int_values.arr[1].el;
   if ((x_77 != x_79)) {
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl
index 01a9ed0..1990256 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.hlsl
@@ -74,9 +74,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl
index 3db287a..253011e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int count0 = 0;
   int count1 = 0;
   int i = 0;
@@ -65,27 +65,33 @@
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_70 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
+    *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
   } else {
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_75 = float(x_74);
-    *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75);
+    *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75);
   }
   int const x_77 = count0;
   int const x_79 = x_6.x_GLF_uniform_int_values.arr[1].el;
   if ((x_77 != x_79)) {
     int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl
index 596a485..6dae70a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl
index 4de038f..36c85d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 data = {};
   float a = 0.0f;
   int const x_33 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -50,19 +50,25 @@
     float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_60 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_62 = x_8.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62);
+    *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62);
   } else {
     float const x_65 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65);
+    *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl
index 596a485..6dae70a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl
index 4de038f..36c85d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 data = {};
   float a = 0.0f;
   int const x_33 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -50,19 +50,25 @@
     float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_60 = x_8.x_GLF_uniform_float_values.arr[0].el;
     float const x_62 = x_8.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62);
+    *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62);
   } else {
     float const x_65 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_65, x_65, x_65, x_65);
+    *(tint_symbol_3) = float4(x_65, x_65, x_65, x_65);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl
index 9971bf0..83f8e35 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl
index 7211d61..3a7031c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.spvasm.expected.msl
@@ -18,26 +18,32 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_7 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_8 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_9 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_7), float(x_8), float(x_9), float(x_10));
-  float4 const x_36 = *(tint_symbol_4);
+  *(tint_symbol_3) = float4(float(x_7), float(x_8), float(x_9), float(x_10));
+  float4 const x_36 = *(tint_symbol_3);
   if (isnan((-(x_36)).x)) {
     int const x_11 = x_5.x_GLF_uniform_int_values.arr[0].el;
     float const x_43 = float(x_11);
-    *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43);
+    *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl
index 9971bf0..83f8e35 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl
index 7211d61..3a7031c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl.expected.msl
@@ -18,26 +18,32 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_7 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_8 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_9 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_7), float(x_8), float(x_9), float(x_10));
-  float4 const x_36 = *(tint_symbol_4);
+  *(tint_symbol_3) = float4(float(x_7), float(x_8), float(x_9), float(x_10));
+  float4 const x_36 = *(tint_symbol_3);
   if (isnan((-(x_36)).x)) {
     int const x_11 = x_5.x_GLF_uniform_int_values.arr[0].el;
     float const x_43 = float(x_11);
-    *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43);
+    *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl
index 410562b..606fbdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.hlsl
@@ -38,9 +38,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl
index 5eeaa35..4545d49 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) {
   float const x_29 = x_5.x_GLF_uniform_float_values.arr[0].el;
   float const x_32 = x_5.x_GLF_uniform_float_values.arr[0].el;
   if ((ldexp(x_29, 10000) == x_32)) {
@@ -36,22 +36,28 @@
     int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_47 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
+    *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
   } else {
     int const x_51 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_54 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_60 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
+    *(tint_symbol_3) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl
index 410562b..606fbdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.hlsl
@@ -38,9 +38,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl
index 5eeaa35..4545d49 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) {
   float const x_29 = x_5.x_GLF_uniform_float_values.arr[0].el;
   float const x_32 = x_5.x_GLF_uniform_float_values.arr[0].el;
   if ((ldexp(x_29, 10000) == x_32)) {
@@ -36,22 +36,28 @@
     int const x_41 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_47 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
+    *(tint_symbol_3) = float4(float(x_38), float(x_41), float(x_44), float(x_47));
   } else {
     int const x_51 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_54 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_60 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
+    *(tint_symbol_3) = float4(float(x_51), float(x_54), float(x_57), float(x_60));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl
index 408d89c..7f503be 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.hlsl
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl
index 25b2762..1713d3c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl
@@ -24,15 +24,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_5) {
+float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_3) {
   int b = 0;
   float c = 0.0f;
   b = 8;
-  float const x_71 = (*(tint_symbol_5)).y;
+  float const x_71 = (*(tint_symbol_3)).y;
   float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el;
   if ((x_71 >= x_73)) {
     int const x_77 = b;
@@ -52,12 +52,12 @@
   return x_92;
 }
 
-void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float a_1 = 0.0f;
   float param = 0.0f;
   float const x_43 = x_9.x_GLF_uniform_float_values.arr[1].el;
   param = x_43;
-  float const x_44 = f1_f1_(x_9, &(param), tint_symbol_6);
+  float const x_44 = f1_f1_(x_9, &(param), tint_symbol_4);
   a_1 = x_44;
   float const x_45 = a_1;
   float const x_47 = x_9.x_GLF_uniform_float_values.arr[2].el;
@@ -66,22 +66,28 @@
     int const x_56 = x_14.x_GLF_uniform_int_values.arr[0].el;
     int const x_59 = x_14.x_GLF_uniform_int_values.arr[0].el;
     int const x_62 = x_14.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_7) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
+    *(tint_symbol_5) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
   } else {
     int const x_66 = x_14.x_GLF_uniform_int_values.arr[0].el;
     float const x_67 = float(x_66);
-    *(tint_symbol_7) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_5) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_9, x_14, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_9, x_14, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_14, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl
index 408d89c..7f503be 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.hlsl
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl
index 25b2762..1713d3c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl
@@ -24,15 +24,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_5) {
+float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_3) {
   int b = 0;
   float c = 0.0f;
   b = 8;
-  float const x_71 = (*(tint_symbol_5)).y;
+  float const x_71 = (*(tint_symbol_3)).y;
   float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el;
   if ((x_71 >= x_73)) {
     int const x_77 = b;
@@ -52,12 +52,12 @@
   return x_92;
 }
 
-void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float a_1 = 0.0f;
   float param = 0.0f;
   float const x_43 = x_9.x_GLF_uniform_float_values.arr[1].el;
   param = x_43;
-  float const x_44 = f1_f1_(x_9, &(param), tint_symbol_6);
+  float const x_44 = f1_f1_(x_9, &(param), tint_symbol_4);
   a_1 = x_44;
   float const x_45 = a_1;
   float const x_47 = x_9.x_GLF_uniform_float_values.arr[2].el;
@@ -66,22 +66,28 @@
     int const x_56 = x_14.x_GLF_uniform_int_values.arr[0].el;
     int const x_59 = x_14.x_GLF_uniform_int_values.arr[0].el;
     int const x_62 = x_14.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_7) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
+    *(tint_symbol_5) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
   } else {
     int const x_66 = x_14.x_GLF_uniform_int_values.arr[0].el;
     float const x_67 = float(x_66);
-    *(tint_symbol_7) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_5) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_14, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_9, x_14, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_9, x_14, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_14, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl
index 1aa4c95..cb30bc3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.hlsl
@@ -47,11 +47,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl
index 4dbabec..c2eb764 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.spvasm.expected.msl
@@ -24,14 +24,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
   float b = 0.0f;
-  float const x_39 = (*(tint_symbol_5)).y;
+  float const x_39 = (*(tint_symbol_3)).y;
   float const x_41 = x_7.x_GLF_uniform_float_values.arr[0].el;
   a = select(2, 0, (x_39 >= x_41));
   float const x_45 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -46,22 +46,28 @@
     int const x_64 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_67 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_70 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
+    *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
   } else {
     int const x_74 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_75 = float(x_74);
-    *(tint_symbol_6) = float4(x_75, x_75, x_75, x_75);
+    *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl
index 1aa4c95..cb30bc3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.hlsl
@@ -47,11 +47,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl
index 4dbabec..c2eb764 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl.expected.msl
@@ -24,14 +24,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
   float b = 0.0f;
-  float const x_39 = (*(tint_symbol_5)).y;
+  float const x_39 = (*(tint_symbol_3)).y;
   float const x_41 = x_7.x_GLF_uniform_float_values.arr[0].el;
   a = select(2, 0, (x_39 >= x_41));
   float const x_45 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -46,22 +46,28 @@
     int const x_64 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_67 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_70 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
+    *(tint_symbol_4) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
   } else {
     int const x_74 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_75 = float(x_74);
-    *(tint_symbol_6) = float4(x_75, x_75, x_75, x_75);
+    *(tint_symbol_4) = float4(x_75, x_75, x_75, x_75);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl
index 32708a3..32d03f4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl
index fe0cdc7..8b81c22 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el;
   i = x_32;
@@ -43,10 +43,10 @@
       int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
       int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
       int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
-      *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53));
+      *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53));
     } else {
       float const x_57 = x_8.x_GLF_uniform_float_values.arr[0].el;
-      *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
+      *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57);
     }
     int const x_59 = i;
     i = as_type<int>((as_type<uint>(x_59) - as_type<uint>(1)));
@@ -54,11 +54,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl
index 32708a3..32d03f4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl
index fe0cdc7..8b81c22 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el;
   i = x_32;
@@ -43,10 +43,10 @@
       int const x_47 = x_6.x_GLF_uniform_int_values.arr[0].el;
       int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
       int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
-      *(tint_symbol_4) = float4(1.0f, float(x_47), float(x_50), float(x_53));
+      *(tint_symbol_3) = float4(1.0f, float(x_47), float(x_50), float(x_53));
     } else {
       float const x_57 = x_8.x_GLF_uniform_float_values.arr[0].el;
-      *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
+      *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57);
     }
     int const x_59 = i;
     i = as_type<int>((as_type<uint>(x_59) - as_type<uint>(1)));
@@ -54,11 +54,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl
index b9e87ec..94e3fa1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.hlsl
@@ -68,11 +68,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl
index a3e74a5..6001d57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.spvasm.expected.msl
@@ -24,7 +24,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -33,7 +33,7 @@
   return dfdx(x_100);
 }
 
-void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 v2 = 0.0f;
   float a_1 = 0.0f;
   float x_40 = 0.0f;
@@ -42,8 +42,8 @@
   int const x_45 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_48 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_51 = x_8.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_5) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
-  float const x_55 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+  float const x_55 = (*(tint_symbol_4)).x;
   float const x_57 = x_10.x_GLF_uniform_float_values.arr[1].el;
   if ((x_55 < x_57)) {
     float const x_62 = v2.x;
@@ -67,19 +67,25 @@
       float const x_90 = a_1;
       float3 const x_92 = mix(float3(x_85, x_85, x_85), float3(x_88, x_88, x_88), float3(x_90, x_90, x_90));
       float const x_94 = x_10.x_GLF_uniform_float_values.arr[1].el;
-      *(tint_symbol_5) = float4(x_92.x, x_92.y, x_92.z, x_94);
+      *(tint_symbol_3) = float4(x_92.x, x_92.y, x_92.z, x_94);
     }
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl
index b9e87ec..94e3fa1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.hlsl
@@ -68,11 +68,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl
index a3e74a5..6001d57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl.expected.msl
@@ -24,7 +24,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -33,7 +33,7 @@
   return dfdx(x_100);
 }
 
-void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 v2 = 0.0f;
   float a_1 = 0.0f;
   float x_40 = 0.0f;
@@ -42,8 +42,8 @@
   int const x_45 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_48 = x_8.x_GLF_uniform_int_values.arr[1].el;
   int const x_51 = x_8.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_5) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
-  float const x_55 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+  float const x_55 = (*(tint_symbol_4)).x;
   float const x_57 = x_10.x_GLF_uniform_float_values.arr[1].el;
   if ((x_55 < x_57)) {
     float const x_62 = v2.x;
@@ -67,19 +67,25 @@
       float const x_90 = a_1;
       float3 const x_92 = mix(float3(x_85, x_85, x_85), float3(x_88, x_88, x_88), float3(x_90, x_90, x_90));
       float const x_94 = x_10.x_GLF_uniform_float_values.arr[1].el;
-      *(tint_symbol_5) = float4(x_92.x, x_92.y, x_92.z, x_94);
+      *(tint_symbol_3) = float4(x_92.x, x_92.y, x_92.z, x_94);
     }
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl
index c1507ae..03bab36 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.hlsl
@@ -88,9 +88,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl
index 77c6b6d..cd57211 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float E = 0.0f;
@@ -88,19 +88,25 @@
     int const x_118 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_121 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_124 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
+    *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
   } else {
     float const x_128 = x_6.x_GLF_uniform_float_values.arr[5].el;
-    *(tint_symbol_4) = float4(x_128, x_128, x_128, x_128);
+    *(tint_symbol_3) = float4(x_128, x_128, x_128, x_128);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl
index c1507ae..03bab36 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.hlsl
@@ -88,9 +88,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl
index 77c6b6d..cd57211 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float E = 0.0f;
@@ -88,19 +88,25 @@
     int const x_118 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_121 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_124 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
+    *(tint_symbol_3) = float4(float(x_115), float(x_118), float(x_121), float(x_124));
   } else {
     float const x_128 = x_6.x_GLF_uniform_float_values.arr[5].el;
-    *(tint_symbol_4) = float4(x_128, x_128, x_128, x_128);
+    *(tint_symbol_3) = float4(x_128, x_128, x_128, x_128);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl
index 0b64549..44a81c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.hlsl
@@ -58,11 +58,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl
index 2bc64d6..bf79c4e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl
@@ -24,16 +24,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int const x_34 = x_6.x_GLF_uniform_int_values.arr[2].el;
   float const x_35 = float(x_34);
-  *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35);
-  float const x_38 = (*(tint_symbol_6)).y;
+  *(tint_symbol_3) = float4(x_35, x_35, x_35, x_35);
+  float const x_38 = (*(tint_symbol_4)).y;
   float const x_40 = x_9.x_GLF_uniform_float_values.arr[0].el;
   i = as_type<int>((as_type<uint>(1) << as_type<uint>(select(1, 2, (x_38 >= x_40)))));
   while (true) {
@@ -58,7 +58,7 @@
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_70 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
+    *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
     {
       int const x_73 = i;
       i = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
@@ -67,13 +67,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_9, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl
index 0b64549..44a81c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.hlsl
@@ -58,11 +58,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl
index 2bc64d6..bf79c4e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl
@@ -24,16 +24,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int const x_34 = x_6.x_GLF_uniform_int_values.arr[2].el;
   float const x_35 = float(x_34);
-  *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35);
-  float const x_38 = (*(tint_symbol_6)).y;
+  *(tint_symbol_3) = float4(x_35, x_35, x_35, x_35);
+  float const x_38 = (*(tint_symbol_4)).y;
   float const x_40 = x_9.x_GLF_uniform_float_values.arr[0].el;
   i = as_type<int>((as_type<uint>(1) << as_type<uint>(select(1, 2, (x_38 >= x_40)))));
   while (true) {
@@ -58,7 +58,7 @@
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_70 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
+    *(tint_symbol_3) = float4(float(x_61), float(x_64), float(x_67), float(x_70));
     {
       int const x_73 = i;
       i = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
@@ -67,13 +67,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_9, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl
index ff9156f..2529a97 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.hlsl
@@ -86,9 +86,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl
index 166f249..a5bd868 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 A = {};
   int i = 0;
   int a = 0;
@@ -87,20 +87,26 @@
     int const x_133 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_136 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_139 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_130), float(x_133), float(x_136), float(x_139));
+    *(tint_symbol_3) = float4(float(x_130), float(x_133), float(x_136), float(x_139));
   } else {
     int const x_143 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_144 = float(x_143);
-    *(tint_symbol_4) = float4(x_144, x_144, x_144, x_144);
+    *(tint_symbol_3) = float4(x_144, x_144, x_144, x_144);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl
index ff9156f..2529a97 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.hlsl
@@ -86,9 +86,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl
index 166f249..a5bd868 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 A = {};
   int i = 0;
   int a = 0;
@@ -87,20 +87,26 @@
     int const x_133 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_136 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_139 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_130), float(x_133), float(x_136), float(x_139));
+    *(tint_symbol_3) = float4(float(x_130), float(x_133), float(x_136), float(x_139));
   } else {
     int const x_143 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_144 = float(x_143);
-    *(tint_symbol_4) = float4(x_144, x_144, x_144, x_144);
+    *(tint_symbol_3) = float4(x_144, x_144, x_144, x_144);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl
index 4388213..da81e9c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.hlsl
@@ -90,9 +90,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl
index e8a5aea..566a8ab 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float E = 0.0f;
@@ -86,20 +86,26 @@
     int const x_110 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_113 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_116 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_122 = v1[x_120];
-    *(tint_symbol_4) = float4(x_122, x_122, x_122, x_122);
+    *(tint_symbol_3) = float4(x_122, x_122, x_122, x_122);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl
index 4388213..da81e9c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.hlsl
@@ -90,9 +90,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl
index e8a5aea..566a8ab 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float E = 0.0f;
@@ -86,20 +86,26 @@
     int const x_110 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_113 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_116 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_122 = v1[x_120];
-    *(tint_symbol_4) = float4(x_122, x_122, x_122, x_122);
+    *(tint_symbol_3) = float4(x_122, x_122, x_122, x_122);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl
index 3019c2b..66f07af 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.hlsl
@@ -91,9 +91,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl
index f9c669b..171f582 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float E = 0.0f;
@@ -88,20 +88,26 @@
     int const x_110 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_113 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_116 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_121 = float(x_120);
-    *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121);
+    *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl
index 3019c2b..66f07af 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.hlsl
@@ -91,9 +91,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl
index f9c669b..171f582 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 v1 = 0.0f;
   float E = 0.0f;
@@ -88,20 +88,26 @@
     int const x_110 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_113 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_116 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_121 = float(x_120);
-    *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121);
+    *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl
index 35a88d4..ab5204d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl
index ec0f90f..baa0074 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float4 color = 0.0f;
   float const x_29 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_31 = x_6.x_GLF_uniform_float_values.arr[0].el;
@@ -48,15 +48,21 @@
     }
   }
   float4 const x_48 = color;
-  *(tint_symbol_4) = x_48;
+  *(tint_symbol_3) = x_48;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl
index 35a88d4..ab5204d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl
index ec0f90f..baa0074 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float4 color = 0.0f;
   float const x_29 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_31 = x_6.x_GLF_uniform_float_values.arr[0].el;
@@ -48,15 +48,21 @@
     }
   }
   float4 const x_48 = color;
-  *(tint_symbol_4) = x_48;
+  *(tint_symbol_3) = x_48;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl
index 0df7ca0..f5f6825 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.hlsl
@@ -67,9 +67,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl
index 63a0e83..d3884b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int i = 0;
   float b = 0.0f;
@@ -78,20 +78,26 @@
     int const x_76 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_79 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_82 = x_9.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
+    *(tint_symbol_3) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
   } else {
     int const x_86 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_87 = float(x_86);
-    *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87);
+    *(tint_symbol_3) = float4(x_87, x_87, x_87, x_87);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl
index 0df7ca0..f5f6825 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.hlsl
@@ -67,9 +67,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl
index 63a0e83..d3884b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int i = 0;
   float b = 0.0f;
@@ -78,20 +78,26 @@
     int const x_76 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_79 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_82 = x_9.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
+    *(tint_symbol_3) = float4(float(x_73), float(x_76), float(x_79), float(x_82));
   } else {
     int const x_86 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_87 = float(x_86);
-    *(tint_symbol_4) = float4(x_87, x_87, x_87, x_87);
+    *(tint_symbol_3) = float4(x_87, x_87, x_87, x_87);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl
index 1f0d86f..706a957 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl
index 066a9d8..6662e67 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.spvasm.expected.msl
@@ -18,26 +18,32 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_23 = x_5.x_GLF_uniform_float_values.arr[1].el;
   if ((rsqrt(x_23) < -1.0f)) {
     float const x_30 = x_5.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
+    *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30);
   } else {
     float const x_33 = x_5.x_GLF_uniform_float_values.arr[1].el;
     float const x_35 = x_5.x_GLF_uniform_float_values.arr[0].el;
     float const x_37 = x_5.x_GLF_uniform_float_values.arr[0].el;
     float const x_39 = x_5.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_33, x_35, x_37, x_39);
+    *(tint_symbol_3) = float4(x_33, x_35, x_37, x_39);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl
index 1f0d86f..706a957 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl
index 066a9d8..6662e67 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl.expected.msl
@@ -18,26 +18,32 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_23 = x_5.x_GLF_uniform_float_values.arr[1].el;
   if ((rsqrt(x_23) < -1.0f)) {
     float const x_30 = x_5.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
+    *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30);
   } else {
     float const x_33 = x_5.x_GLF_uniform_float_values.arr[1].el;
     float const x_35 = x_5.x_GLF_uniform_float_values.arr[0].el;
     float const x_37 = x_5.x_GLF_uniform_float_values.arr[0].el;
     float const x_39 = x_5.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_33, x_35, x_37, x_39);
+    *(tint_symbol_3) = float4(x_33, x_35, x_37, x_39);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl
index 04d7fae..377667e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl
index 1219c9f..e364fa0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -29,20 +29,26 @@
     int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_43 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
+    *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
   } else {
     int const x_49 = a;
     float const x_50 = float(x_49);
-    *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50);
+    *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl
index 04d7fae..377667e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl
index 1219c9f..e364fa0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -29,20 +29,26 @@
     int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_43 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
+    *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
   } else {
     int const x_49 = a;
     float const x_50 = float(x_49);
-    *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50);
+    *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl
index f1391e1..b808035 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.hlsl
@@ -38,9 +38,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl
index a588885..19b0bfa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -41,19 +41,25 @@
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_55 = a;
-    *(tint_symbol_4) = float4(x_48, float(x_50), float(x_53), x_55);
+    *(tint_symbol_3) = float4(x_48, float(x_50), float(x_53), x_55);
   } else {
     float const x_57 = a;
-    *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
+    *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl
index f1391e1..b808035 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.hlsl
@@ -38,9 +38,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl
index a588885..19b0bfa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -41,19 +41,25 @@
     int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_53 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_55 = a;
-    *(tint_symbol_4) = float4(x_48, float(x_50), float(x_53), x_55);
+    *(tint_symbol_3) = float4(x_48, float(x_50), float(x_53), x_55);
   } else {
     float const x_57 = a;
-    *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
+    *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl
index d5ea2b6..16a804b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.hlsl
@@ -164,9 +164,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl
index 5aae4c1..e7f0fdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl
@@ -47,7 +47,7 @@
   return x_24;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_1 ref = {};
   int i_1 = 0;
   tint_array_wrapper_1 a_1 = {};
@@ -162,7 +162,7 @@
     if ((x_85 != x_87)) {
       int const x_88 = x_8.x_GLF_uniform_int_values.arr[0].el;
       float const x_205 = float(x_88);
-      *(tint_symbol_4) = float4(x_205, x_205, x_205, x_205);
+      *(tint_symbol_3) = float4(x_205, x_205, x_205, x_205);
       return;
     }
     {
@@ -174,15 +174,21 @@
   int const x_92 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_93 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_94 = x_8.x_GLF_uniform_int_values.arr[11].el;
-  *(tint_symbol_4) = float4(float(x_91), float(x_92), float(x_93), float(x_94));
+  *(tint_symbol_3) = float4(float(x_91), float(x_92), float(x_93), float(x_94));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl
index d5ea2b6..16a804b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.hlsl
@@ -164,9 +164,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl
index 5aae4c1..e7f0fdd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl
@@ -47,7 +47,7 @@
   return x_24;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_1 ref = {};
   int i_1 = 0;
   tint_array_wrapper_1 a_1 = {};
@@ -162,7 +162,7 @@
     if ((x_85 != x_87)) {
       int const x_88 = x_8.x_GLF_uniform_int_values.arr[0].el;
       float const x_205 = float(x_88);
-      *(tint_symbol_4) = float4(x_205, x_205, x_205, x_205);
+      *(tint_symbol_3) = float4(x_205, x_205, x_205, x_205);
       return;
     }
     {
@@ -174,15 +174,21 @@
   int const x_92 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_93 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_94 = x_8.x_GLF_uniform_int_values.arr[11].el;
-  *(tint_symbol_4) = float4(float(x_91), float(x_92), float(x_93), float(x_94));
+  *(tint_symbol_3) = float4(float(x_91), float(x_92), float(x_93), float(x_94));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl
index ccce3d4..1a7f4c4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl
index ac1f176..73ce3e5 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.spvasm.expected.msl
@@ -28,29 +28,35 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+  *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
   float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
   a = (x_45 - (NAN * floor((x_45 / NAN))));
   float const x_47 = a;
   float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_47 != x_49)) {
     float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    (*(tint_symbol_4)).y = x_54;
+    (*(tint_symbol_3)).y = x_54;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl
index 1372d60..801f890 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl
index 642bdda..9f81578 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl
@@ -28,29 +28,35 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+  *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
   float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
   a = fmod(x_45, INFINITY);
   float const x_47 = a;
   float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_47 != x_49)) {
     float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    (*(tint_symbol_4)).y = x_54;
+    (*(tint_symbol_3)).y = x_54;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl
index f0a0bf5..9bd866b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl
index 752e43d..74ad660 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.spvasm.expected.msl
@@ -28,29 +28,35 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+  *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
   float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
   a = (NAN - (x_45 * floor((NAN / x_45))));
   float const x_47 = a;
   float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_47 != x_49)) {
     float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    (*(tint_symbol_4)).y = x_54;
+    (*(tint_symbol_3)).y = x_54;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl
index 2ee05e3..3d164f7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl
index b4fda60..fcac993 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl
@@ -28,29 +28,35 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+  *(tint_symbol_3) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
   float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
   a = fmod(-INFINITY, x_45);
   float const x_47 = a;
   float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el;
   if ((x_47 != x_49)) {
     float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    (*(tint_symbol_4)).y = x_54;
+    (*(tint_symbol_3)).y = x_54;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl
index 633dded..ce8790c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl
index b7aac08..4ba5a96 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.spvasm.expected.msl
@@ -28,27 +28,33 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) {
   float const x_31 = x_5.x_GLF_uniform_float_values.arr[0].el;
   if ((sqrt(x_31) < -1.0f)) {
     int const x_10 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_38 = float(x_10);
-    *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38);
+    *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38);
   } else {
     int const x_11 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_41 = float(x_11);
     int const x_12 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_43 = float(x_12);
-    *(tint_symbol_4) = float4(x_41, x_43, x_43, x_41);
+    *(tint_symbol_3) = float4(x_41, x_43, x_43, x_41);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl
index 633dded..ce8790c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl
index b7aac08..4ba5a96 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl.expected.msl
@@ -28,27 +28,33 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_3) {
   float const x_31 = x_5.x_GLF_uniform_float_values.arr[0].el;
   if ((sqrt(x_31) < -1.0f)) {
     int const x_10 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_38 = float(x_10);
-    *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38);
+    *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38);
   } else {
     int const x_11 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_41 = float(x_11);
     int const x_12 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_43 = float(x_12);
-    *(tint_symbol_4) = float4(x_41, x_43, x_43, x_41);
+    *(tint_symbol_3) = float4(x_41, x_43, x_43, x_41);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl
index d405088..707aead 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.hlsl
@@ -138,9 +138,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl
index 0314455..38011e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl
@@ -38,7 +38,7 @@
   return;
 }
 
-void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 arr = {};
   int i_1 = 0;
@@ -143,20 +143,26 @@
     int const x_151 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_154 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_157 = x_10.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_148), float(x_151), float(x_154), float(x_157));
+    *(tint_symbol_3) = float4(float(x_148), float(x_151), float(x_154), float(x_157));
   } else {
     int const x_161 = x_10.x_GLF_uniform_int_values.arr[2].el;
     float const x_162 = float(x_161);
-    *(tint_symbol_4) = float4(x_162, x_162, x_162, x_162);
+    *(tint_symbol_3) = float4(x_162, x_162, x_162, x_162);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_10, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl
index d405088..707aead 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.hlsl
@@ -138,9 +138,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl
index 0314455..38011e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl
@@ -38,7 +38,7 @@
   return;
 }
 
-void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 arr = {};
   int i_1 = 0;
@@ -143,20 +143,26 @@
     int const x_151 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_154 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_157 = x_10.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_148), float(x_151), float(x_154), float(x_157));
+    *(tint_symbol_3) = float4(float(x_148), float(x_151), float(x_154), float(x_157));
   } else {
     int const x_161 = x_10.x_GLF_uniform_int_values.arr[2].el;
     float const x_162 = float(x_161);
-    *(tint_symbol_4) = float4(x_162, x_162, x_162, x_162);
+    *(tint_symbol_3) = float4(x_162, x_162, x_162, x_162);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_10, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl
index c4609c1..5f34521 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl
index e93e2b5..55192e7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl
@@ -28,11 +28,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el;
   float const x_30 = float(x_29);
-  *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
+  *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30);
   int const x_33 = x_5.x_GLF_uniform_int_values.arr[0].el;
   i = x_33;
   while (true) {
@@ -49,8 +49,8 @@
       int const x_53 = i;
       int const x_55 = i;
       float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el;
-      float4 const x_60 = *(tint_symbol_4);
-      *(tint_symbol_4) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58));
+      float4 const x_60 = *(tint_symbol_3);
+      *(tint_symbol_3) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58));
     }
     {
       int const x_62 = i;
@@ -60,11 +60,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl
index c4609c1..5f34521 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl
index e93e2b5..55192e7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl
@@ -28,11 +28,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el;
   float const x_30 = float(x_29);
-  *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
+  *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30);
   int const x_33 = x_5.x_GLF_uniform_int_values.arr[0].el;
   i = x_33;
   while (true) {
@@ -49,8 +49,8 @@
       int const x_53 = i;
       int const x_55 = i;
       float const x_58 = x_8.x_GLF_uniform_float_values.arr[0].el;
-      float4 const x_60 = *(tint_symbol_4);
-      *(tint_symbol_4) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58));
+      float4 const x_60 = *(tint_symbol_3);
+      *(tint_symbol_3) = (x_60 + float4(x_52, float(x_53), float(x_55), x_58));
     }
     {
       int const x_62 = i;
@@ -60,11 +60,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl
index 092451a..2d59334 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl
index d74fee4..ee8a0d1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el;
   a = x_28;
@@ -30,20 +30,26 @@
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_43), float(x_46), float(x_49), float(x_52));
+    *(tint_symbol_3) = float4(float(x_43), float(x_46), float(x_49), float(x_52));
   } else {
     int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_57 = float(x_56);
-    *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
+    *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl
index 092451a..2d59334 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl
index d74fee4..ee8a0d1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el;
   a = x_28;
@@ -30,20 +30,26 @@
     int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_43), float(x_46), float(x_49), float(x_52));
+    *(tint_symbol_3) = float4(float(x_43), float(x_46), float(x_49), float(x_52));
   } else {
     int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_57 = float(x_56);
-    *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
+    *(tint_symbol_3) = float4(x_57, x_57, x_57, x_57);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl
index 42545af..8801f2f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.hlsl
@@ -42,11 +42,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl
index 0ecda7c..b787f8f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl
@@ -14,14 +14,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
   int i = 0;
-  float const x_32 = (*(tint_symbol_5)).x;
+  float const x_32 = (*(tint_symbol_3)).x;
   int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el;
   a = select(-1, 0, (int(x_32) < x_35));
   i = 0;
@@ -44,22 +44,28 @@
     int const x_58 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     int const x_68 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_69 = float(x_68);
-    *(tint_symbol_6) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl
index 42545af..8801f2f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.hlsl
@@ -42,11 +42,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl
index 0ecda7c..b787f8f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl
@@ -14,14 +14,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
   int i = 0;
-  float const x_32 = (*(tint_symbol_5)).x;
+  float const x_32 = (*(tint_symbol_3)).x;
   int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el;
   a = select(-1, 0, (int(x_32) < x_35));
   i = 0;
@@ -44,22 +44,28 @@
     int const x_58 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     int const x_68 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_69 = float(x_68);
-    *(tint_symbol_6) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl
index 374a386..8ede670 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl
index 573e4e9..781dfbb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int count = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -50,20 +50,26 @@
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
+    *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
   } else {
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_72 = float(x_71);
-    *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72);
+    *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl
index 374a386..8ede670 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl
index 573e4e9..781dfbb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int count = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -50,20 +50,26 @@
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
+    *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
   } else {
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_72 = float(x_71);
-    *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72);
+    *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl
index bbf845a..c2aee32 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.hlsl
@@ -70,9 +70,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl
index 4c40186..0451a90 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl
@@ -45,7 +45,7 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int j = 0;
   tint_array_wrapper data = {};
   int j_1 = 0;
@@ -91,18 +91,24 @@
   }
   bool const x_81 = x_81_phi;
   if (x_81) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl
index bbf845a..c2aee32 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.hlsl
@@ -70,9 +70,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl
index 4c40186..0451a90 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl
@@ -45,7 +45,7 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int j = 0;
   tint_array_wrapper data = {};
   int j_1 = 0;
@@ -91,18 +91,24 @@
   }
   bool const x_81 = x_81_phi;
   if (x_81) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl
index 1ce3a68..36755d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl
index 4b271a5..9da2ee9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el;
   v1 = float2(x_35, x_35);
@@ -40,20 +40,26 @@
     float const x_53 = float(x_38);
     int const x_55 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_56 = float(x_55);
-    *(tint_symbol_4) = float4(x_53, x_56, x_56, x_53);
+    *(tint_symbol_3) = float4(x_53, x_56, x_56, x_53);
   } else {
     int const x_59 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_60 = float(x_59);
-    *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+    *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl
index 1ce3a68..36755d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl
index 4b271a5..9da2ee9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   float const x_35 = x_6.x_GLF_uniform_float_values.arr[0].el;
   v1 = float2(x_35, x_35);
@@ -40,20 +40,26 @@
     float const x_53 = float(x_38);
     int const x_55 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_56 = float(x_55);
-    *(tint_symbol_4) = float4(x_53, x_56, x_56, x_53);
+    *(tint_symbol_3) = float4(x_53, x_56, x_56, x_53);
   } else {
     int const x_59 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_60 = float(x_59);
-    *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+    *(tint_symbol_3) = float4(x_60, x_60, x_60, x_60);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl
index 3169db6..f6be289 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.hlsl
@@ -17,8 +17,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_32 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
   const int x_34 = idx;
-  const tint_padded_array_element tint_symbol_3[2] = {{x_30}, {x_32}};
-  indexable = tint_symbol_3;
+  const tint_padded_array_element tint_symbol_2[2] = {{x_30}, {x_32}};
+  indexable = tint_symbol_2;
   const int x_36 = indexable[x_34].el;
   a = x_36;
   const int x_37 = a;
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl
index 380f548..a81c921 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, thread float4* const tint_symbol_4) {
   int idx = 0;
   int a = 0;
   tint_array_wrapper indexable = {};
@@ -27,8 +27,8 @@
   int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_34 = idx;
-  tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_30}, {.el=x_32}}};
-  indexable = tint_symbol_3;
+  tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_30}, {.el=x_32}}};
+  indexable = tint_symbol_2;
   int const x_36 = indexable.arr[x_34].el;
   a = x_36;
   int const x_37 = a;
@@ -38,20 +38,26 @@
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+    *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   } else {
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_59 = float(x_58);
-    *(tint_symbol_5) = float4(x_59, x_59, x_59, x_59);
+    *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl
index 3169db6..f6be289 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.hlsl
@@ -17,8 +17,8 @@
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_32 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
   const int x_34 = idx;
-  const tint_padded_array_element tint_symbol_3[2] = {{x_30}, {x_32}};
-  indexable = tint_symbol_3;
+  const tint_padded_array_element tint_symbol_2[2] = {{x_30}, {x_32}};
+  indexable = tint_symbol_2;
   const int x_36 = indexable[x_34].el;
   a = x_36;
   const int x_37 = a;
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl
index 380f548..a81c921 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, thread float4* const tint_symbol_4) {
   int idx = 0;
   int a = 0;
   tint_array_wrapper indexable = {};
@@ -27,8 +27,8 @@
   int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_34 = idx;
-  tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_30}, {.el=x_32}}};
-  indexable = tint_symbol_3;
+  tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_30}, {.el=x_32}}};
+  indexable = tint_symbol_2;
   int const x_36 = indexable.arr[x_34].el;
   a = x_36;
   int const x_37 = a;
@@ -38,20 +38,26 @@
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+    *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   } else {
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_59 = float(x_58);
-    *(tint_symbol_5) = float4(x_59, x_59, x_59, x_59);
+    *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl
index 9531ab8..9b58178 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl
index ae80624..a75fb20 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl
@@ -18,11 +18,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_32_phi = 0;
   int const x_24 = x_5.x_GLF_uniform_int_values.arr[1].el;
   float const x_25 = float(x_24);
-  *(tint_symbol_4) = float4(x_25, x_25, x_25, x_25);
+  *(tint_symbol_3) = float4(x_25, x_25, x_25, x_25);
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_30 = (as_type<int>((as_type<uint>(x_28) << as_type<uint>(x_28))) >> as_type<uint>(1));
   x_32_phi = x_24;
@@ -37,7 +37,7 @@
     int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el;
     if ((x_33 == as_type<int>(x_39))) {
       float const x_43 = float(x_28);
-      *(tint_symbol_4) = float4(x_43, x_25, x_25, x_43);
+      *(tint_symbol_3) = float4(x_43, x_25, x_25, x_43);
       break;
     }
     {
@@ -47,11 +47,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl
index 9531ab8..9b58178 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl
index ae80624..a75fb20 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl
@@ -18,11 +18,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_32_phi = 0;
   int const x_24 = x_5.x_GLF_uniform_int_values.arr[1].el;
   float const x_25 = float(x_24);
-  *(tint_symbol_4) = float4(x_25, x_25, x_25, x_25);
+  *(tint_symbol_3) = float4(x_25, x_25, x_25, x_25);
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_30 = (as_type<int>((as_type<uint>(x_28) << as_type<uint>(x_28))) >> as_type<uint>(1));
   x_32_phi = x_24;
@@ -37,7 +37,7 @@
     int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el;
     if ((x_33 == as_type<int>(x_39))) {
       float const x_43 = float(x_28);
-      *(tint_symbol_4) = float4(x_43, x_25, x_25, x_43);
+      *(tint_symbol_3) = float4(x_43, x_25, x_25, x_43);
       break;
     }
     {
@@ -47,11 +47,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl
index 2cde1cb..3df8b25 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl
index ddde176..9126868 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl
@@ -45,7 +45,7 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int j = 0;
   tint_array_wrapper data = {};
   int j_1 = 0;
@@ -80,15 +80,21 @@
     }
   }
   float3 const x_69 = data.arr[0];
-  *(tint_symbol_4) = float4(x_69.x, x_69.y, x_69.z, 1.0f);
+  *(tint_symbol_3) = float4(x_69.x, x_69.y, x_69.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl
index 2cde1cb..3df8b25 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl
index ddde176..9126868 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl
@@ -45,7 +45,7 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int j = 0;
   tint_array_wrapper data = {};
   int j_1 = 0;
@@ -80,15 +80,21 @@
     }
   }
   float3 const x_69 = data.arr[0];
-  *(tint_symbol_4) = float4(x_69.x, x_69.y, x_69.z, 1.0f);
+  *(tint_symbol_3) = float4(x_69.x, x_69.y, x_69.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl
index 98286fb..d3f2cf5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.hlsl
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl
index ab1a1a4..adb9724 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int i = 0;
   bool x_66 = false;
@@ -69,20 +69,26 @@
     int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_9.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+    *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
   } else {
     int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_85);
-    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl
index 98286fb..d3f2cf5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.hlsl
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl
index ab1a1a4..adb9724 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int i = 0;
   bool x_66 = false;
@@ -69,20 +69,26 @@
     int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_9.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+    *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
   } else {
     int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_85);
-    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl
index fc76837..7437ab3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl
index 4836c63..6af8723 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -38,18 +38,24 @@
   }
   int const x_49 = a;
   if ((x_49 == 5)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl
index fc76837..7437ab3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl
index 4836c63..6af8723 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -38,18 +38,24 @@
   }
   int const x_49 = a;
   if ((x_49 == 5)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl
index 58eeb4f..ee7e98d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.hlsl
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl
index e902978..ef14022 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl
@@ -28,10 +28,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   int i = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_36 = x_7.x_GLF_uniform_float_values.arr[1].el;
   f = x_36;
   int const x_38 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -64,21 +64,27 @@
     int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+    *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
   } else {
     int const x_85 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_85);
-    *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl
index 58eeb4f..ee7e98d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.hlsl
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl
index e902978..ef14022 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl
@@ -28,10 +28,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   int i = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_36 = x_7.x_GLF_uniform_float_values.arr[1].el;
   f = x_36;
   int const x_38 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -64,21 +64,27 @@
     int const x_75 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+    *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
   } else {
     int const x_85 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_85);
-    *(tint_symbol_5) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl
index 32a0a50..143f2cd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl
@@ -13,8 +13,8 @@
   const int x_33 = asint(x_6[3].x);
   const int x_35 = asint(x_6[5].x);
   const int x_37 = asint(x_6[2].x);
-  const int tint_symbol_3[3] = {x_33, x_35, x_37};
-  arr = tint_symbol_3;
+  const int tint_symbol_2[3] = {x_33, x_35, x_37};
+  arr = tint_symbol_2;
   index = 1;
   while (true) {
     bool x_51 = false;
@@ -80,9 +80,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl
index 03f75a7..4a50161 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   tint_array_wrapper_1 arr = {};
   int index = 0;
   bool x_76 = false;
@@ -31,8 +31,8 @@
   int const x_33 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_35 = x_6.x_GLF_uniform_int_values.arr[5].el;
   int const x_37 = x_6.x_GLF_uniform_int_values.arr[2].el;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_33, x_35, x_37}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_33, x_35, x_37}};
+  arr = tint_symbol_2;
   index = 1;
   while (true) {
     bool x_51 = false;
@@ -83,20 +83,26 @@
     int const x_95 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_101 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_92), float(x_95), float(x_98), float(x_101));
+    *(tint_symbol_4) = float4(float(x_92), float(x_95), float(x_98), float(x_101));
   } else {
     int const x_105 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_106 = float(x_105);
-    *(tint_symbol_5) = float4(x_106, x_106, x_106, x_106);
+    *(tint_symbol_4) = float4(x_106, x_106, x_106, x_106);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl
index b3077db..5b410ac 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.hlsl
@@ -13,8 +13,8 @@
   const int x_33 = asint(x_6[3].x);
   const int x_35 = asint(x_6[5].x);
   const int x_37 = asint(x_6[2].x);
-  const int tint_symbol_3[3] = {x_33, x_35, x_37};
-  arr = tint_symbol_3;
+  const int tint_symbol_2[3] = {x_33, x_35, x_37};
+  arr = tint_symbol_2;
   index = 1;
   while (true) {
     bool x_51 = false;
@@ -84,9 +84,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl
index f10a979..e73edfa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
   tint_array_wrapper_1 arr = {};
   int index = 0;
   bool x_76 = false;
@@ -31,8 +31,8 @@
   int const x_33 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_35 = x_6.x_GLF_uniform_int_values.arr[5].el;
   int const x_37 = x_6.x_GLF_uniform_int_values.arr[2].el;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_33, x_35, x_37}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_33, x_35, x_37}};
+  arr = tint_symbol_2;
   index = 1;
   while (true) {
     bool x_51 = false;
@@ -83,20 +83,26 @@
     int const x_95 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_98 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_101 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_92), float(x_95), float(x_98), float(x_101));
+    *(tint_symbol_4) = float4(float(x_92), float(x_95), float(x_98), float(x_101));
   } else {
     int const x_105 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_106 = float(x_105);
-    *(tint_symbol_5) = float4(x_106, x_106, x_106, x_106);
+    *(tint_symbol_4) = float4(x_106, x_106, x_106, x_106);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl
index 9c06087..de3dd10 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.hlsl
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl
index 10f8c70..8a69fc9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   float c = 0.0f;
@@ -72,20 +72,26 @@
     int const x_80 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_83 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_86 = x_11.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
+    *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
   } else {
     int const x_90 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_91 = float(x_90);
-    *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91);
+    *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl
index 9c06087..de3dd10 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.hlsl
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl
index 10f8c70..8a69fc9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   float c = 0.0f;
@@ -72,20 +72,26 @@
     int const x_80 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_83 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_86 = x_11.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
+    *(tint_symbol_3) = float4(float(x_77), float(x_80), float(x_83), float(x_86));
   } else {
     int const x_90 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_91 = float(x_90);
-    *(tint_symbol_4) = float4(x_91, x_91, x_91, x_91);
+    *(tint_symbol_3) = float4(x_91, x_91, x_91, x_91);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
index 1c8b0d4..999c01a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x3 m23 = float2x3(0.0f);
   int i = 0;
   float const x_46 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -48,13 +48,13 @@
     float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_66 = m23[x_60][x_62];
     m23[x_60][x_62] = (x_66 + x_64);
-    float const x_70 = (*(tint_symbol_5)).y;
+    float const x_70 = (*(tint_symbol_3)).y;
     float const x_72 = x_7.x_GLF_uniform_float_values.arr[0].el;
     if ((x_70 < x_72)) {
     }
     x_81_phi = true;
     if (true) {
-      float const x_79 = (*(tint_symbol_5)).x;
+      float const x_79 = (*(tint_symbol_3)).x;
       x_80 = (x_79 < 0.0f);
       x_81_phi = x_80;
     }
@@ -80,22 +80,28 @@
     int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_131 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
+    *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
   } else {
     int const x_135 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_136 = float(x_135);
-    *(tint_symbol_6) = float4(x_136, x_136, x_136, x_136);
+    *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl
index a488355..0a7145b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x3 m23 = float2x3(0.0f);
   int i = 0;
   float const x_46 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -48,13 +48,13 @@
     float const x_64 = x_7.x_GLF_uniform_float_values.arr[0].el;
     float const x_66 = m23[x_60][x_62];
     m23[x_60][x_62] = (x_66 + x_64);
-    float const x_70 = (*(tint_symbol_5)).y;
+    float const x_70 = (*(tint_symbol_3)).y;
     float const x_72 = x_7.x_GLF_uniform_float_values.arr[0].el;
     if ((x_70 < x_72)) {
     }
     x_81_phi = true;
     if (true) {
-      float const x_79 = (*(tint_symbol_5)).x;
+      float const x_79 = (*(tint_symbol_3)).x;
       x_80 = (x_79 < 0.0f);
       x_81_phi = x_80;
     }
@@ -80,22 +80,28 @@
     int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_131 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
+    *(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
   } else {
     int const x_135 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_136 = float(x_135);
-    *(tint_symbol_6) = float4(x_136, x_136, x_136, x_136);
+    *(tint_symbol_4) = float4(x_136, x_136, x_136, x_136);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl
index df16623..b3f557f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[3].el;
@@ -52,20 +52,26 @@
     int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
+    *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
   } else {
     int const x_70 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_71 = float(x_70);
-    *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71);
+    *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl
index df16623..b3f557f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[3].el;
@@ -52,20 +52,26 @@
     int const x_60 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
+    *(tint_symbol_3) = float4(float(x_57), float(x_60), float(x_63), float(x_66));
   } else {
     int const x_70 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_71 = float(x_70);
-    *(tint_symbol_4) = float4(x_71, x_71, x_71, x_71);
+    *(tint_symbol_3) = float4(x_71, x_71, x_71, x_71);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl
index b595c46..f962523 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl
index 78ca106..a3c7978 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl
@@ -23,7 +23,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[2].el;
   a = x_25;
@@ -43,20 +43,26 @@
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+    *(tint_symbol_3) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   } else {
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_59 = float(x_58);
-    *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59);
+    *(tint_symbol_3) = float4(x_59, x_59, x_59, x_59);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl
index b595c46..f962523 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl
index 78ca106..a3c7978 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl
@@ -23,7 +23,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[2].el;
   a = x_25;
@@ -43,20 +43,26 @@
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+    *(tint_symbol_3) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   } else {
     int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_59 = float(x_58);
-    *(tint_symbol_4) = float4(x_59, x_59, x_59, x_59);
+    *(tint_symbol_3) = float4(x_59, x_59, x_59, x_59);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl
index 31c1ef2..3986674 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl
index ca01da7..76563fc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.spvasm.expected.msl
@@ -18,13 +18,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el;
   a = x_26;
   int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_29 = float(x_28);
-  *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29);
+  *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29);
   while (true) {
     int const x_36 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_37 = a;
@@ -36,17 +36,23 @@
     int const x_45 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+    *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
     break;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl
index 31c1ef2..3986674 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl
index ca01da7..76563fc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl.expected.msl
@@ -18,13 +18,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el;
   a = x_26;
   int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_29 = float(x_28);
-  *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29);
+  *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29);
   while (true) {
     int const x_36 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_37 = a;
@@ -36,17 +36,23 @@
     int const x_45 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
+    *(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
     break;
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl
index d153ad0..3455e1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.hlsl
@@ -98,9 +98,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl
index 87ab4e7..210ab97 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl
@@ -18,15 +18,15 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
-  *(tint_symbol_4) = 0;
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[0].el;
   switch(x_27) {
     case 0: {
       if (true) {
         int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el;
         float const x_35 = float(x_34);
-        *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35);
+        *(tint_symbol_4) = float4(x_35, x_35, x_35, x_35);
         return;
       }
       /* fallthrough */
@@ -37,14 +37,14 @@
         int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el;
         int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
         int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el;
-        *(tint_symbol_5) = float4(float(x_40), float(x_43), float(x_46), float(x_49));
+        *(tint_symbol_4) = float4(float(x_40), float(x_43), float(x_46), float(x_49));
         if (false) {
           int const x_55 = x_6.x_GLF_uniform_int_values.arr[0].el;
           float const x_56 = float(x_55);
-          *(tint_symbol_5) = float4(x_56, x_56, x_56, x_56);
+          *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
           while (true) {
-            int const x_62 = *(tint_symbol_4);
-            *(tint_symbol_4) = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
+            int const x_62 = *(tint_symbol_3);
+            *(tint_symbol_3) = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
             if (false) {
               return;
             }
@@ -52,7 +52,7 @@
               return;
             }
             {
-              int const x_68 = *(tint_symbol_4);
+              int const x_68 = *(tint_symbol_3);
               if ((x_68 < 100)) {
               } else {
                 break;
@@ -70,12 +70,18 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl
index d153ad0..3455e1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.hlsl
@@ -98,9 +98,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl
index 87ab4e7..210ab97 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl
@@ -18,15 +18,15 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
-  *(tint_symbol_4) = 0;
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[0].el;
   switch(x_27) {
     case 0: {
       if (true) {
         int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el;
         float const x_35 = float(x_34);
-        *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35);
+        *(tint_symbol_4) = float4(x_35, x_35, x_35, x_35);
         return;
       }
       /* fallthrough */
@@ -37,14 +37,14 @@
         int const x_43 = x_6.x_GLF_uniform_int_values.arr[1].el;
         int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
         int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el;
-        *(tint_symbol_5) = float4(float(x_40), float(x_43), float(x_46), float(x_49));
+        *(tint_symbol_4) = float4(float(x_40), float(x_43), float(x_46), float(x_49));
         if (false) {
           int const x_55 = x_6.x_GLF_uniform_int_values.arr[0].el;
           float const x_56 = float(x_55);
-          *(tint_symbol_5) = float4(x_56, x_56, x_56, x_56);
+          *(tint_symbol_4) = float4(x_56, x_56, x_56, x_56);
           while (true) {
-            int const x_62 = *(tint_symbol_4);
-            *(tint_symbol_4) = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
+            int const x_62 = *(tint_symbol_3);
+            *(tint_symbol_3) = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
             if (false) {
               return;
             }
@@ -52,7 +52,7 @@
               return;
             }
             {
-              int const x_68 = *(tint_symbol_4);
+              int const x_68 = *(tint_symbol_3);
               if ((x_68 < 100)) {
               } else {
                 break;
@@ -70,12 +70,18 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl
index 073d5f2..3188e95 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.hlsl
@@ -20,8 +20,8 @@
   const float x_44 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
   const uint scalar_offset_4 = ((16u * uint(0))) / 4;
   const float x_46 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
-  const float tint_symbol_4[5] = {x_38, x_40, x_42, x_44, x_46};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[5] = {x_38, x_40, x_42, x_44, x_46};
+  arr = tint_symbol_3;
   const int x_49 = asint(x_9[1].x);
   i = x_49;
   j = 0;
@@ -80,9 +80,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl
index a8ea0d5..cd368d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 arr = {};
   int i = 0;
   int j = 0;
@@ -40,8 +40,8 @@
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_46 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42, x_44, x_46}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42, x_44, x_46}};
+  arr = tint_symbol_2;
   int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el;
   i = x_49;
   j = 0;
@@ -70,7 +70,7 @@
   float const x_75 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_77 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_79 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_5) = float4(x_73, x_75, x_77, x_79);
+  *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79);
   int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el;
   i = x_82;
   while (true) {
@@ -84,7 +84,7 @@
     float const x_94 = arr.arr[x_92];
     if (!((x_94 == 2.0f))) {
       float const x_99 = x_6.x_GLF_uniform_float_values.arr[1].el;
-      *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99);
+      *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
     }
     {
       int const x_101 = i;
@@ -94,11 +94,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl
index 073d5f2..3188e95 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.hlsl
@@ -20,8 +20,8 @@
   const float x_44 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
   const uint scalar_offset_4 = ((16u * uint(0))) / 4;
   const float x_46 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
-  const float tint_symbol_4[5] = {x_38, x_40, x_42, x_44, x_46};
-  arr = tint_symbol_4;
+  const float tint_symbol_3[5] = {x_38, x_40, x_42, x_44, x_46};
+  arr = tint_symbol_3;
   const int x_49 = asint(x_9[1].x);
   i = x_49;
   j = 0;
@@ -80,9 +80,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl
index a8ea0d5..cd368d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
   tint_array_wrapper_2 arr = {};
   int i = 0;
   int j = 0;
@@ -40,8 +40,8 @@
   float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_46 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_38, x_40, x_42, x_44, x_46}};
-  arr = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42, x_44, x_46}};
+  arr = tint_symbol_2;
   int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el;
   i = x_49;
   j = 0;
@@ -70,7 +70,7 @@
   float const x_75 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_77 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_79 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_5) = float4(x_73, x_75, x_77, x_79);
+  *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79);
   int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el;
   i = x_82;
   while (true) {
@@ -84,7 +84,7 @@
     float const x_94 = arr.arr[x_92];
     if (!((x_94 == 2.0f))) {
       float const x_99 = x_6.x_GLF_uniform_float_values.arr[1].el;
-      *(tint_symbol_5) = float4(x_99, x_99, x_99, x_99);
+      *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
     }
     {
       int const x_101 = i;
@@ -94,11 +94,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_9, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl
index e91ca1c..97bb65a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.hlsl
@@ -26,8 +26,8 @@
   const int x_64 = asint(x_6[4].x);
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
   const int x_66 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
-  const int tint_symbol_6[5] = {x_58, x_60, x_62, x_64, x_66};
-  data = tint_symbol_6;
+  const int tint_symbol_5[5] = {x_58, x_60, x_62, x_64, x_66};
+  data = tint_symbol_5;
   const int x_69 = asint(x_6[5].x);
   a = x_69;
   while (true) {
@@ -113,11 +113,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl
index cd059fc..1246289 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper_2 data = {};
   int a = 0;
   int i = 0;
@@ -41,14 +41,14 @@
   int const x_48 = x_6.x_GLF_uniform_int_values.arr[5].el;
   int const x_51 = x_6.x_GLF_uniform_int_values.arr[5].el;
   int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+  *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_60 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_62 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_64 = x_6.x_GLF_uniform_int_values.arr[4].el;
   int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_58, x_60, x_62, x_64, x_66}};
-  data = tint_symbol_4;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_58, x_60, x_62, x_64, x_66}};
+  data = tint_symbol_2;
   int const x_69 = x_6.x_GLF_uniform_int_values.arr[5].el;
   a = x_69;
   while (true) {
@@ -83,7 +83,7 @@
         if ((x_102 < x_105)) {
           int const x_110 = x_6.x_GLF_uniform_int_values.arr[5].el;
           float const x_111 = float(x_110);
-          *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111);
+          *(tint_symbol_4) = float4(x_111, x_111, x_111, x_111);
         }
         {
           int const x_113 = j;
@@ -101,7 +101,7 @@
     }
   }
   while (true) {
-    float const x_124 = (*(tint_symbol_7)).x;
+    float const x_124 = (*(tint_symbol_5)).x;
     float const x_126 = x_12.x_GLF_uniform_float_values.arr[0].el;
     if ((x_124 < x_126)) {
     } else {
@@ -118,7 +118,7 @@
       }
       int const x_141 = x_6.x_GLF_uniform_int_values.arr[5].el;
       float const x_142 = float(x_141);
-      *(tint_symbol_6) = float4(x_142, x_142, x_142, x_142);
+      *(tint_symbol_4) = float4(x_142, x_142, x_142, x_142);
       {
         int const x_144 = i_1;
         i_1 = as_type<int>((as_type<uint>(x_144) + as_type<uint>(1)));
@@ -128,13 +128,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, x_12, tint_symbol_7, tint_symbol_6);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, x_12, &(tint_symbol_9), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl
index e91ca1c..97bb65a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.hlsl
@@ -26,8 +26,8 @@
   const int x_64 = asint(x_6[4].x);
   const uint scalar_offset_2 = ((16u * uint(0))) / 4;
   const int x_66 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
-  const int tint_symbol_6[5] = {x_58, x_60, x_62, x_64, x_66};
-  data = tint_symbol_6;
+  const int tint_symbol_5[5] = {x_58, x_60, x_62, x_64, x_66};
+  data = tint_symbol_5;
   const int x_69 = asint(x_6[5].x);
   a = x_69;
   while (true) {
@@ -113,11 +113,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl
index cd059fc..1246289 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper_2 data = {};
   int a = 0;
   int i = 0;
@@ -41,14 +41,14 @@
   int const x_48 = x_6.x_GLF_uniform_int_values.arr[5].el;
   int const x_51 = x_6.x_GLF_uniform_int_values.arr[5].el;
   int const x_54 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_6) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
+  *(tint_symbol_4) = float4(float(x_45), float(x_48), float(x_51), float(x_54));
   int const x_58 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_60 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_62 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_64 = x_6.x_GLF_uniform_int_values.arr[4].el;
   int const x_66 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  tint_array_wrapper_2 const tint_symbol_4 = {.arr={x_58, x_60, x_62, x_64, x_66}};
-  data = tint_symbol_4;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_58, x_60, x_62, x_64, x_66}};
+  data = tint_symbol_2;
   int const x_69 = x_6.x_GLF_uniform_int_values.arr[5].el;
   a = x_69;
   while (true) {
@@ -83,7 +83,7 @@
         if ((x_102 < x_105)) {
           int const x_110 = x_6.x_GLF_uniform_int_values.arr[5].el;
           float const x_111 = float(x_110);
-          *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111);
+          *(tint_symbol_4) = float4(x_111, x_111, x_111, x_111);
         }
         {
           int const x_113 = j;
@@ -101,7 +101,7 @@
     }
   }
   while (true) {
-    float const x_124 = (*(tint_symbol_7)).x;
+    float const x_124 = (*(tint_symbol_5)).x;
     float const x_126 = x_12.x_GLF_uniform_float_values.arr[0].el;
     if ((x_124 < x_126)) {
     } else {
@@ -118,7 +118,7 @@
       }
       int const x_141 = x_6.x_GLF_uniform_int_values.arr[5].el;
       float const x_142 = float(x_141);
-      *(tint_symbol_6) = float4(x_142, x_142, x_142, x_142);
+      *(tint_symbol_4) = float4(x_142, x_142, x_142, x_142);
       {
         int const x_144 = i_1;
         i_1 = as_type<int>((as_type<uint>(x_144) + as_type<uint>(1)));
@@ -128,13 +128,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, x_12, tint_symbol_7, tint_symbol_6);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, x_12, &(tint_symbol_9), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl
index 790ef73..1cc7fe8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.hlsl
@@ -82,11 +82,16 @@
   float4 x_GLF_v1_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_v1};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_v1};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl
index 9ddedab..f4af9d1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl
@@ -24,16 +24,16 @@
 struct main_out {
   float4 x_GLF_v1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_v1_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 uv = 0.0f;
   float4 v1 = 0.0f;
   float a = 0.0f;
   int i = 0;
-  float4 const x_49 = *(tint_symbol_5);
+  float4 const x_49 = *(tint_symbol_3);
   uv = float2(x_49.x, x_49.y);
   float const x_52 = x_8.x_GLF_uniform_float_values.arr[0].el;
   v1 = float4(x_52, x_52, x_52, x_52);
@@ -80,22 +80,28 @@
   float const x_106 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_104 == x_106)) {
     float4 const x_111 = v1;
-    *(tint_symbol_6) = x_111;
+    *(tint_symbol_4) = x_111;
   } else {
     int const x_20 = x_12.x_GLF_uniform_int_values.arr[1].el;
     float const x_113 = float(x_20);
-    *(tint_symbol_6) = float4(x_113, x_113, x_113, x_113);
+    *(tint_symbol_4) = float4(x_113, x_113, x_113, x_113);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_12, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_12, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl
index 790ef73..1cc7fe8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.hlsl
@@ -82,11 +82,16 @@
   float4 x_GLF_v1_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_v1};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_v1};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl
index 9ddedab..f4af9d1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl
@@ -24,16 +24,16 @@
 struct main_out {
   float4 x_GLF_v1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_v1_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 uv = 0.0f;
   float4 v1 = 0.0f;
   float a = 0.0f;
   int i = 0;
-  float4 const x_49 = *(tint_symbol_5);
+  float4 const x_49 = *(tint_symbol_3);
   uv = float2(x_49.x, x_49.y);
   float const x_52 = x_8.x_GLF_uniform_float_values.arr[0].el;
   v1 = float4(x_52, x_52, x_52, x_52);
@@ -80,22 +80,28 @@
   float const x_106 = x_8.x_GLF_uniform_float_values.arr[1].el;
   if ((x_104 == x_106)) {
     float4 const x_111 = v1;
-    *(tint_symbol_6) = x_111;
+    *(tint_symbol_4) = x_111;
   } else {
     int const x_20 = x_12.x_GLF_uniform_int_values.arr[1].el;
     float const x_113 = float(x_20);
-    *(tint_symbol_6) = float4(x_113, x_113, x_113, x_113);
+    *(tint_symbol_4) = float4(x_113, x_113, x_113, x_113);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_12, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_12, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl
index 13e0966..3a47377 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl
index 3afddf2..431dffd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -36,18 +36,24 @@
   }
   int const x_50 = a;
   if ((x_50 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl
index 13e0966..3a47377 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl
index 3afddf2..431dffd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -36,18 +36,24 @@
   }
   int const x_50 = a;
   if ((x_50 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl
index f6e2d87..e86627e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.hlsl
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl
index 6c07995..270bbce 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl
@@ -14,22 +14,22 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_5) = float4(float(x_31), float(x_34), float(x_37), float(x_40));
-  float const x_44 = (*(tint_symbol_6)).y;
+  *(tint_symbol_3) = float4(float(x_31), float(x_34), float(x_37), float(x_40));
+  float const x_44 = (*(tint_symbol_4)).y;
   if ((x_44 < 0.0f)) {
     int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_50 = float(x_49);
-    *(tint_symbol_5) = float4(x_50, x_50, x_50, x_50);
+    *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
   }
   int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
   i = x_53;
@@ -40,23 +40,23 @@
     } else {
       break;
     }
-    float const x_64 = (*(tint_symbol_6)).x;
+    float const x_64 = (*(tint_symbol_4)).x;
     if ((x_64 > 0.0f)) {
-      float const x_69 = (*(tint_symbol_6)).y;
+      float const x_69 = (*(tint_symbol_4)).y;
       if ((x_69 < 0.0f)) {
         int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el;
         float const x_75 = float(x_74);
-        *(tint_symbol_5) = float4(x_75, x_75, x_75, x_75);
+        *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75);
         break;
       }
     }
-    float const x_78 = (*(tint_symbol_6)).x;
+    float const x_78 = (*(tint_symbol_4)).x;
     if ((x_78 > 0.0f)) {
-      float const x_83 = (*(tint_symbol_6)).y;
+      float const x_83 = (*(tint_symbol_4)).y;
       if ((x_83 < 0.0f)) {
         int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el;
         float const x_89 = float(x_88);
-        *(tint_symbol_5) = float4(x_89, x_89, x_89, x_89);
+        *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89);
       }
     }
     {
@@ -67,13 +67,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl
index f6e2d87..e86627e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.hlsl
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl
index 6c07995..270bbce 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl
@@ -14,22 +14,22 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int const x_31 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el;
   int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_5) = float4(float(x_31), float(x_34), float(x_37), float(x_40));
-  float const x_44 = (*(tint_symbol_6)).y;
+  *(tint_symbol_3) = float4(float(x_31), float(x_34), float(x_37), float(x_40));
+  float const x_44 = (*(tint_symbol_4)).y;
   if ((x_44 < 0.0f)) {
     int const x_49 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_50 = float(x_49);
-    *(tint_symbol_5) = float4(x_50, x_50, x_50, x_50);
+    *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
   }
   int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
   i = x_53;
@@ -40,23 +40,23 @@
     } else {
       break;
     }
-    float const x_64 = (*(tint_symbol_6)).x;
+    float const x_64 = (*(tint_symbol_4)).x;
     if ((x_64 > 0.0f)) {
-      float const x_69 = (*(tint_symbol_6)).y;
+      float const x_69 = (*(tint_symbol_4)).y;
       if ((x_69 < 0.0f)) {
         int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el;
         float const x_75 = float(x_74);
-        *(tint_symbol_5) = float4(x_75, x_75, x_75, x_75);
+        *(tint_symbol_3) = float4(x_75, x_75, x_75, x_75);
         break;
       }
     }
-    float const x_78 = (*(tint_symbol_6)).x;
+    float const x_78 = (*(tint_symbol_4)).x;
     if ((x_78 > 0.0f)) {
-      float const x_83 = (*(tint_symbol_6)).y;
+      float const x_83 = (*(tint_symbol_4)).y;
       if ((x_83 < 0.0f)) {
         int const x_88 = x_6.x_GLF_uniform_int_values.arr[1].el;
         float const x_89 = float(x_88);
-        *(tint_symbol_5) = float4(x_89, x_89, x_89, x_89);
+        *(tint_symbol_3) = float4(x_89, x_89, x_89, x_89);
       }
     }
     {
@@ -67,13 +67,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl
index cf463e7..7a53104 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.hlsl
@@ -25,8 +25,8 @@
     const int x_89 = asint(x_8[3].x);
     const int x_91 = asint(x_8[3].x);
     const int x_93 = a;
-    const int tint_symbol_3[4] = {x_85, x_87, x_89, x_91};
-    indexable = tint_symbol_3;
+    const int tint_symbol_2[4] = {x_85, x_87, x_89, x_91};
+    indexable = tint_symbol_2;
     const int x_95 = indexable[x_93];
     const int x_96 = x;
     if ((x_95 > x_96)) {
@@ -91,9 +91,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl
index 19ebc96..9902d16 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl
@@ -41,8 +41,8 @@
     int const x_89 = x_8.x_GLF_uniform_int_values.arr[3].el;
     int const x_91 = x_8.x_GLF_uniform_int_values.arr[3].el;
     int const x_93 = a;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_85, x_87, x_89, x_91}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_85, x_87, x_89, x_91}};
+    indexable = tint_symbol_2;
     int const x_95 = indexable.arr[x_93];
     int const x_96 = *(x);
     if ((x_95 > x_96)) {
@@ -68,7 +68,7 @@
   return x_115;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
   int a_1 = 0;
   int param = 0;
   int param_1 = 0;
@@ -88,20 +88,26 @@
     int const x_57 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_60 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_63 = x_8.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_5) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
+    *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
   } else {
     int const x_67 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_68 = float(x_67);
-    *(tint_symbol_5) = float4(x_68, x_68, x_68, x_68);
+    *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl
index cf463e7..7a53104 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.hlsl
@@ -25,8 +25,8 @@
     const int x_89 = asint(x_8[3].x);
     const int x_91 = asint(x_8[3].x);
     const int x_93 = a;
-    const int tint_symbol_3[4] = {x_85, x_87, x_89, x_91};
-    indexable = tint_symbol_3;
+    const int tint_symbol_2[4] = {x_85, x_87, x_89, x_91};
+    indexable = tint_symbol_2;
     const int x_95 = indexable[x_93];
     const int x_96 = x;
     if ((x_95 > x_96)) {
@@ -91,9 +91,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl
index 19ebc96..9902d16 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl
@@ -41,8 +41,8 @@
     int const x_89 = x_8.x_GLF_uniform_int_values.arr[3].el;
     int const x_91 = x_8.x_GLF_uniform_int_values.arr[3].el;
     int const x_93 = a;
-    tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_85, x_87, x_89, x_91}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_85, x_87, x_89, x_91}};
+    indexable = tint_symbol_2;
     int const x_95 = indexable.arr[x_93];
     int const x_96 = *(x);
     if ((x_95 > x_96)) {
@@ -68,7 +68,7 @@
   return x_115;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
   int a_1 = 0;
   int param = 0;
   int param_1 = 0;
@@ -88,20 +88,26 @@
     int const x_57 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_60 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_63 = x_8.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_5) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
+    *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
   } else {
     int const x_67 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_68 = float(x_67);
-    *(tint_symbol_5) = float4(x_68, x_68, x_68, x_68);
+    *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl
index 9d26f7b..43e11b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl
@@ -37,9 +37,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl
index 295a024..2b1c62c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el;
   float const x_30 = float(x_29);
@@ -32,20 +32,26 @@
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
+    *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
   } else {
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_70 = float(x_69);
-    *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70);
+    *(tint_symbol_3) = float4(x_70, x_70, x_70, x_70);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl
index 7362602..ea6ee9a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl
index 4cfd1b7..11f6276 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el;
   float const x_30 = float(x_29);
@@ -32,20 +32,26 @@
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
+    *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
   } else {
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_70 = float(x_69);
-    *(tint_symbol_4) = float4(x_70, x_70, x_70, x_70);
+    *(tint_symbol_3) = float4(x_70, x_70, x_70, x_70);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl
index da225ef..3078d86 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl
index ee86a7c..7c47c29 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2x2 m0 = float2x2(0.0f);
   float2x2 m1 = float2x2(0.0f);
   float2 v = 0.0f;
@@ -38,19 +38,25 @@
     float const x_60 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_62 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_64 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_58, x_60, x_62, x_64);
+    *(tint_symbol_3) = float4(x_58, x_60, x_62, x_64);
   } else {
     float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl
index da225ef..3078d86 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl
index ee86a7c..7c47c29 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2x2 m0 = float2x2(0.0f);
   float2x2 m1 = float2x2(0.0f);
   float2 v = 0.0f;
@@ -38,19 +38,25 @@
     float const x_60 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_62 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_64 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_58, x_60, x_62, x_64);
+    *(tint_symbol_3) = float4(x_58, x_60, x_62, x_64);
   } else {
     float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el;
-    *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl
index 60ded1e..3c12051 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl
index dba1366..b0d9eb3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.spvasm.expected.msl
@@ -11,23 +11,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_23 = x_5.one;
   int const x_25 = x_5.one;
   int const x_27 = x_5.one;
   if ((max(x_23, clamp(x_25, x_27, 1)) == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl
index 60ded1e..3c12051 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl
index dba1366..b0d9eb3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl.expected.msl
@@ -11,23 +11,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_23 = x_5.one;
   int const x_25 = x_5.one;
   int const x_27 = x_5.one;
   if ((max(x_23, clamp(x_25, x_27, 1)) == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl
index 3ad7117..430302e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl
index f106f7a..9cfc85c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.spvasm.expected.msl
@@ -14,35 +14,41 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
-  float const x_30 = (*(tint_symbol_5)).x;
+  float const x_30 = (*(tint_symbol_3)).x;
   a = max(1, min(1, int(x_30)));
   int const x_34 = a;
   if ((x_34 < 2)) {
     int const x_40 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_43 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_46 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(1.0f, float(x_40), float(x_43), float(x_46));
+    *(tint_symbol_4) = float4(1.0f, float(x_40), float(x_43), float(x_46));
   } else {
     int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_51 = float(x_50);
-    *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51);
+    *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl
index 3ad7117..430302e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl
index f106f7a..9cfc85c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl.expected.msl
@@ -14,35 +14,41 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
-  float const x_30 = (*(tint_symbol_5)).x;
+  float const x_30 = (*(tint_symbol_3)).x;
   a = max(1, min(1, int(x_30)));
   int const x_34 = a;
   if ((x_34 < 2)) {
     int const x_40 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_43 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_46 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(1.0f, float(x_40), float(x_43), float(x_46));
+    *(tint_symbol_4) = float4(1.0f, float(x_40), float(x_43), float(x_46));
   } else {
     int const x_50 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_51 = float(x_50);
-    *(tint_symbol_6) = float4(x_51, x_51, x_51, x_51);
+    *(tint_symbol_4) = float4(x_51, x_51, x_51, x_51);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl
index 9efb42d..0014608 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.hlsl
@@ -70,11 +70,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_S_i1_i1_i11_i1_(inout S s, inout int x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl
index b986b1e..238c405 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl
@@ -19,7 +19,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) {
   int x_43 = 0;
   bool x_44 = false;
   tint_array_wrapper arr = {};
@@ -31,7 +31,7 @@
     arr.arr[x_50].a = 2;
     int const x_53 = arr.arr[1].a;
     if ((x_53 < 1)) {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       x_44 = true;
       break;
     } else {
@@ -78,9 +78,9 @@
       x_43 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_89.a) + as_type<uint>(x_91.b)))) + as_type<uint>(x_94.c)));
       int const x_97 = x_43;
       if ((x_97 == 12)) {
-        *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       } else {
-        *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+        *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       }
     }
     x_44 = true;
@@ -89,12 +89,18 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl
index 9efb42d..0014608 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.hlsl
@@ -70,11 +70,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_S_i1_i1_i11_i1_(inout S s, inout int x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl
index b986b1e..238c405 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl
@@ -19,7 +19,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) {
   int x_43 = 0;
   bool x_44 = false;
   tint_array_wrapper arr = {};
@@ -31,7 +31,7 @@
     arr.arr[x_50].a = 2;
     int const x_53 = arr.arr[1].a;
     if ((x_53 < 1)) {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       x_44 = true;
       break;
     } else {
@@ -78,9 +78,9 @@
       x_43 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_89.a) + as_type<uint>(x_91.b)))) + as_type<uint>(x_94.c)));
       int const x_97 = x_43;
       if ((x_97 == 12)) {
-        *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       } else {
-        *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+        *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       }
     }
     x_44 = true;
@@ -89,12 +89,18 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl
index 52a5683..109823c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.hlsl
@@ -34,9 +34,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl
index 84a3cf6..bdcbf97 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return 5.0f;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float2 param = 0.0f;
   param = float2(1.0f, 1.0f);
@@ -29,18 +29,24 @@
   f = x_34;
   float const x_35 = f;
   if ((x_35 == 5.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl
index 52a5683..109823c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.hlsl
@@ -34,9 +34,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl
index 84a3cf6..bdcbf97 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   return 5.0f;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float2 param = 0.0f;
   param = float2(1.0f, 1.0f);
@@ -29,18 +29,24 @@
   f = x_34;
   float const x_35 = f;
   if ((x_35 == 5.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl
index be4003a..454f25d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl
index 8114c84..213388a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.spvasm.expected.msl
@@ -43,21 +43,27 @@
   return x_48;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float const x_27 = func_(x_7);
   if ((x_27 == 1.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl
index be4003a..454f25d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl
index 8114c84..213388a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl.expected.msl
@@ -43,21 +43,27 @@
   return x_48;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float const x_27 = func_(x_7);
   if ((x_27 == 1.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl
index 3c49b30..07db7a7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.hlsl
@@ -38,11 +38,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl
index bae0285..97da9e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.spvasm.expected.msl
@@ -24,35 +24,41 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   f = fmin(as_type<float>(-1), 1.0f);
-  float const x_38 = (*(tint_symbol_5)).x;
+  float const x_38 = (*(tint_symbol_3)).x;
   float const x_40 = x_7.x_GLF_uniform_float_values.arr[0].el;
   if ((x_38 > x_40)) {
     int const x_46 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
+    *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
   } else {
     float const x_58 = f;
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl
index 3c49b30..07db7a7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.hlsl
@@ -38,11 +38,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl
index bae0285..97da9e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl.expected.msl
@@ -24,35 +24,41 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   f = fmin(as_type<float>(-1), 1.0f);
-  float const x_38 = (*(tint_symbol_5)).x;
+  float const x_38 = (*(tint_symbol_3)).x;
   float const x_40 = x_7.x_GLF_uniform_float_values.arr[0].el;
   if ((x_38 > x_40)) {
     int const x_46 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_49 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_52 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_55 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
+    *(tint_symbol_4) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
   } else {
     float const x_58 = f;
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl
index 5f95172..fdf819f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.hlsl
@@ -20,11 +20,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl
index 6aa5c6a..da3439b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.spvasm.expected.msl
@@ -4,26 +4,32 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_20 = (*(tint_symbol_5)).x;
-  float const x_23 = (*(tint_symbol_5)).x;
-  float const x_26 = (*(tint_symbol_5)).y;
-  float const x_32 = (*(tint_symbol_5)).y;
-  *(tint_symbol_6) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f);
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_20 = (*(tint_symbol_3)).x;
+  float const x_23 = (*(tint_symbol_3)).x;
+  float const x_26 = (*(tint_symbol_3)).y;
+  float const x_32 = (*(tint_symbol_3)).y;
+  *(tint_symbol_4) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl
index 5f95172..fdf819f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.hlsl
@@ -20,11 +20,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl
index 6aa5c6a..da3439b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl.expected.msl
@@ -4,26 +4,32 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_20 = (*(tint_symbol_5)).x;
-  float const x_23 = (*(tint_symbol_5)).x;
-  float const x_26 = (*(tint_symbol_5)).y;
-  float const x_32 = (*(tint_symbol_5)).y;
-  *(tint_symbol_6) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f);
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_20 = (*(tint_symbol_3)).x;
+  float const x_23 = (*(tint_symbol_3)).x;
+  float const x_26 = (*(tint_symbol_3)).y;
+  float const x_32 = (*(tint_symbol_3)).y;
+  *(tint_symbol_4) = float4((x_20 * 0.00390625f), (float((int(x_23) ^ int(x_26))) * 0.00390625f), (x_32 * 0.00390625f), 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl
index 94cc273..371971b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.hlsl
@@ -58,11 +58,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl
index 421d745..5709ee1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -34,10 +34,10 @@
   return 0.0f;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 v = 0.0f;
   v = float4(1.0f, 1.0f, 1.0f, 1.0f);
-  float const x_38 = (*(tint_symbol_5)).y;
+  float const x_38 = (*(tint_symbol_3)).y;
   if ((x_38 < 0.0f)) {
     float const x_42 = func_();
     v = float4(x_42, x_42, x_42, x_42);
@@ -48,22 +48,28 @@
   }
   uint const x_50 = x_8.one;
   if (((1u << x_50) == 2u)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
     int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl
index 94cc273..371971b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.hlsl
@@ -58,11 +58,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl
index 421d745..5709ee1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl
@@ -17,7 +17,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -34,10 +34,10 @@
   return 0.0f;
 }
 
-void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4 v = 0.0f;
   v = float4(1.0f, 1.0f, 1.0f, 1.0f);
-  float const x_38 = (*(tint_symbol_5)).y;
+  float const x_38 = (*(tint_symbol_3)).y;
   if ((x_38 < 0.0f)) {
     float const x_42 = func_();
     v = float4(x_42, x_42, x_42, x_42);
@@ -48,22 +48,28 @@
   }
   uint const x_50 = x_8.one;
   if (((1u << x_50) == 2u)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
     int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_58 = float(x_57);
-    *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+    *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_8, constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl
index 0a42777..d11a25c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl
index a72ccb7..dc64841 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.spvasm.expected.msl
@@ -18,11 +18,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   a = (as_type<float>(1u) - (1.0f * floor((as_type<float>(1u) / 1.0f))));
   float const x_29 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29);
+  *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29);
   float const x_31 = a;
   float const x_33 = x_6.x_GLF_uniform_float_values.arr[2].el;
   if ((x_31 < x_33)) {
@@ -30,16 +30,22 @@
     float const x_40 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_38, x_40, x_42, x_44);
+    *(tint_symbol_3) = float4(x_38, x_40, x_42, x_44);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl
index 307332d..6fea881 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl
index d51d832..c60e6c1 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl.expected.msl
@@ -18,11 +18,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   a = fmod(as_type<float>(1u), 1.0f);
   float const x_29 = x_6.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_4) = float4(x_29, x_29, x_29, x_29);
+  *(tint_symbol_3) = float4(x_29, x_29, x_29, x_29);
   float const x_31 = a;
   float const x_33 = x_6.x_GLF_uniform_float_values.arr[2].el;
   if ((x_31 < x_33)) {
@@ -30,16 +30,22 @@
     float const x_40 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el;
     float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_38, x_40, x_42, x_44);
+    *(tint_symbol_3) = float4(x_38, x_40, x_42, x_44);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl
index 2639d33..4d230c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl
@@ -34,17 +34,17 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   uint a = 0u;
   int b = 0;
   a = 0u;
   int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el;
   b = x_41;
-  float const x_43 = (*(tint_symbol_5)).x;
+  float const x_43 = (*(tint_symbol_3)).x;
   float const x_45 = x_10.x_GLF_uniform_float_values.arr[0].el;
   if ((x_43 < x_45)) {
     uint const x_50 = x_12.x_GLF_uniform_uint_values.arr[0].el;
@@ -58,22 +58,28 @@
     int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_68 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_71 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
+    *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
   } else {
     int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_76 = float(x_75);
-    *(tint_symbol_6) = float4(x_76, x_76, x_76, x_76);
+    *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, x_12, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl
index 2639d33..4d230c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl
@@ -34,17 +34,17 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   uint a = 0u;
   int b = 0;
   a = 0u;
   int const x_41 = x_8.x_GLF_uniform_int_values.arr[1].el;
   b = x_41;
-  float const x_43 = (*(tint_symbol_5)).x;
+  float const x_43 = (*(tint_symbol_3)).x;
   float const x_45 = x_10.x_GLF_uniform_float_values.arr[0].el;
   if ((x_43 < x_45)) {
     uint const x_50 = x_12.x_GLF_uniform_uint_values.arr[0].el;
@@ -58,22 +58,28 @@
     int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_68 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_71 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_6) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
+    *(tint_symbol_4) = float4(float(x_62), float(x_65), float(x_68), float(x_71));
   } else {
     int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_76 = float(x_75);
-    *(tint_symbol_6) = float4(x_76, x_76, x_76, x_76);
+    *(tint_symbol_4) = float4(x_76, x_76, x_76, x_76);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf2& x_8, constant buf0& x_10, constant buf1& x_12, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, x_10, x_12, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl
index 0b412c2..93f927e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x3 m23 = float2x3(0.0f);
   float2x4 m24 = float2x4(0.0f);
   float3x2 m32 = float3x2(0.0f);
@@ -57,7 +57,7 @@
   int i_37 = 0;
   float sum = 0.0f;
   int r = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   m23 = float2x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f));
   m24 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
   m32 = float3x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
@@ -333,10 +333,10 @@
                                                                                 break;
                                                                               }
                                                                               while (true) {
-                                                                                int const x_371 = *(tint_symbol_4);
-                                                                                *(tint_symbol_4) = as_type<int>((as_type<uint>(x_371) + as_type<uint>(1)));
+                                                                                int const x_371 = *(tint_symbol_3);
+                                                                                *(tint_symbol_3) = as_type<int>((as_type<uint>(x_371) + as_type<uint>(1)));
                                                                                 {
-                                                                                  int const x_373 = *(tint_symbol_4);
+                                                                                  int const x_373 = *(tint_symbol_3);
                                                                                   if ((x_373 < 98)) {
                                                                                   } else {
                                                                                     break;
@@ -560,13 +560,13 @@
   sum = 0.0f;
   r = 0;
   while (true) {
-    int const x_479 = *(tint_symbol_4);
+    int const x_479 = *(tint_symbol_3);
     if ((x_479 < 100)) {
     } else {
       break;
     }
-    int const x_482 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_482) + as_type<uint>(1)));
+    int const x_482 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_482) + as_type<uint>(1)));
     int const x_484 = r;
     float const x_486 = m23[0][x_484];
     float const x_487 = sum;
@@ -606,19 +606,25 @@
   }
   float const x_526 = sum;
   if ((x_526 == 8.0f)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl
index 0b412c2..93f927e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x3 m23 = float2x3(0.0f);
   float2x4 m24 = float2x4(0.0f);
   float3x2 m32 = float3x2(0.0f);
@@ -57,7 +57,7 @@
   int i_37 = 0;
   float sum = 0.0f;
   int r = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   m23 = float2x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f));
   m24 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
   m32 = float3x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
@@ -333,10 +333,10 @@
                                                                                 break;
                                                                               }
                                                                               while (true) {
-                                                                                int const x_371 = *(tint_symbol_4);
-                                                                                *(tint_symbol_4) = as_type<int>((as_type<uint>(x_371) + as_type<uint>(1)));
+                                                                                int const x_371 = *(tint_symbol_3);
+                                                                                *(tint_symbol_3) = as_type<int>((as_type<uint>(x_371) + as_type<uint>(1)));
                                                                                 {
-                                                                                  int const x_373 = *(tint_symbol_4);
+                                                                                  int const x_373 = *(tint_symbol_3);
                                                                                   if ((x_373 < 98)) {
                                                                                   } else {
                                                                                     break;
@@ -560,13 +560,13 @@
   sum = 0.0f;
   r = 0;
   while (true) {
-    int const x_479 = *(tint_symbol_4);
+    int const x_479 = *(tint_symbol_3);
     if ((x_479 < 100)) {
     } else {
       break;
     }
-    int const x_482 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_482) + as_type<uint>(1)));
+    int const x_482 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_482) + as_type<uint>(1)));
     int const x_484 = r;
     float const x_486 = m23[0][x_484];
     float const x_487 = sum;
@@ -606,19 +606,25 @@
   }
   float const x_526 = sum;
   if ((x_526 == 8.0f)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl
index 39c1dc1..2f02d27 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl
@@ -124,11 +124,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
index 86c77f2..996fea0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_5) {
+void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_3) {
   int i = 0;
   bool x_137 = false;
   bool x_138 = false;
@@ -72,8 +72,8 @@
         int const x_155 = clamp(x_154, 0, 3);
         int const x_156 = i;
         float const x_158 = x_12.x_GLF_uniform_float_values.arr[0].el;
-        float const x_160 = (*(tint_symbol_5))[x_155][x_156];
-        (*(tint_symbol_5))[x_155][x_156] = (x_160 + x_158);
+        float const x_160 = (*(tint_symbol_3))[x_155][x_156];
+        (*(tint_symbol_3))[x_155][x_156] = (x_160 + x_158);
         int const x_163 = i;
         i = as_type<int>((as_type<uint>(x_163) + as_type<uint>(1)));
       }
@@ -82,22 +82,22 @@
   return;
 }
 
-void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4x2* const tint_symbol_7) {
+void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4x2* const tint_symbol_5) {
   int param = 0;
-  float const x_167 = (*(tint_symbol_6)).y;
+  float const x_167 = (*(tint_symbol_4)).y;
   if ((x_167 < 0.0f)) {
     return;
   }
   param = 1;
-  func0_i1_(x_10, x_12, &(param), tint_symbol_7);
+  func0_i1_(x_10, x_12, &(param), tint_symbol_5);
   return;
 }
 
-void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
-  *(tint_symbol_8) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
-  func1_(x_10, x_12, tint_symbol_9, tint_symbol_8);
-  func1_(x_10, x_12, tint_symbol_9, tint_symbol_8);
-  float4x2 const x_54 = *(tint_symbol_8);
+void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_6) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
+  func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
+  func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
+  float4x2 const x_54 = *(tint_symbol_6);
   int const x_56 = x_16.x_GLF_uniform_int_values.arr[0].el;
   int const x_59 = x_16.x_GLF_uniform_int_values.arr[0].el;
   int const x_62 = x_16.x_GLF_uniform_int_values.arr[1].el;
@@ -112,23 +112,29 @@
     int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el;
     int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el;
     int const x_116 = x_16.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_10) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_8) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_16.x_GLF_uniform_int_values.arr[0].el;
     float const x_121 = float(x_120);
-    *(tint_symbol_10) = float4(x_121, x_121, x_121, x_121);
+    *(tint_symbol_8) = float4(x_121, x_121, x_121, x_121);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread float4x2 tint_symbol_12 = float4x2(0.0f);
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_10, x_12, x_16, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4x2* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_10, x_12, x_16, tint_symbol_10, tint_symbol_9, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread float4x2 tint_symbol_13 = float4x2(0.0f);
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_10, x_12, x_16, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl
index 2327dda..3818584 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.hlsl
@@ -136,11 +136,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl
index cc84cc2..b0c0ae0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl
@@ -27,11 +27,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_5) {
+void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_3) {
   int i = 0;
   bool x_137 = false;
   bool x_138 = false;
@@ -72,8 +72,8 @@
         int const x_155 = clamp(x_154, 0, 3);
         int const x_156 = i;
         float const x_158 = x_12.x_GLF_uniform_float_values.arr[0].el;
-        float const x_160 = (*(tint_symbol_5))[x_155][x_156];
-        (*(tint_symbol_5))[x_155][x_156] = (x_160 + x_158);
+        float const x_160 = (*(tint_symbol_3))[x_155][x_156];
+        (*(tint_symbol_3))[x_155][x_156] = (x_160 + x_158);
         int const x_163 = i;
         i = as_type<int>((as_type<uint>(x_163) + as_type<uint>(1)));
       }
@@ -82,22 +82,22 @@
   return;
 }
 
-void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4x2* const tint_symbol_7) {
+void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4x2* const tint_symbol_5) {
   int param = 0;
-  float const x_167 = (*(tint_symbol_6)).y;
+  float const x_167 = (*(tint_symbol_4)).y;
   if ((x_167 < 0.0f)) {
     return;
   }
   param = 1;
-  func0_i1_(x_10, x_12, &(param), tint_symbol_7);
+  func0_i1_(x_10, x_12, &(param), tint_symbol_5);
   return;
 }
 
-void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
-  *(tint_symbol_8) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
-  func1_(x_10, x_12, tint_symbol_9, tint_symbol_8);
-  func1_(x_10, x_12, tint_symbol_9, tint_symbol_8);
-  float4x2 const x_54 = *(tint_symbol_8);
+void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_6) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
+  func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
+  func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
+  float4x2 const x_54 = *(tint_symbol_6);
   int const x_56 = x_16.x_GLF_uniform_int_values.arr[0].el;
   int const x_59 = x_16.x_GLF_uniform_int_values.arr[0].el;
   int const x_62 = x_16.x_GLF_uniform_int_values.arr[1].el;
@@ -112,23 +112,29 @@
     int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el;
     int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el;
     int const x_116 = x_16.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_10) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_8) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_16.x_GLF_uniform_int_values.arr[0].el;
     float const x_121 = float(x_120);
-    *(tint_symbol_10) = float4(x_121, x_121, x_121, x_121);
+    *(tint_symbol_8) = float4(x_121, x_121, x_121, x_121);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread float4x2 tint_symbol_12 = float4x2(0.0f);
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_10, x_12, x_16, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4x2* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_10, x_12, x_16, tint_symbol_10, tint_symbol_9, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread float4x2 tint_symbol_13 = float4x2(0.0f);
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_10, x_12, x_16, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl
index 5ae6c98..8ab73a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.hlsl
@@ -84,9 +84,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl
index 70bd67b..643912a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   float4 v0 = 0.0f;
   float4 v1 = 0.0f;
   int a = 0;
@@ -88,20 +88,26 @@
     int const x_112 = x_10.x_GLF_uniform_int_values.arr[3].el;
     int const x_115 = x_10.x_GLF_uniform_int_values.arr[3].el;
     int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
+    *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
   } else {
     int const x_122 = x_10.x_GLF_uniform_int_values.arr[3].el;
     float const x_123 = float(x_122);
-    *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123);
+    *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl
index 5ae6c98..8ab73a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.hlsl
@@ -84,9 +84,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl
index 70bd67b..643912a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   float4 v0 = 0.0f;
   float4 v1 = 0.0f;
   int a = 0;
@@ -88,20 +88,26 @@
     int const x_112 = x_10.x_GLF_uniform_int_values.arr[3].el;
     int const x_115 = x_10.x_GLF_uniform_int_values.arr[3].el;
     int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
+    *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
   } else {
     int const x_122 = x_10.x_GLF_uniform_int_values.arr[3].el;
     float const x_123 = float(x_122);
-    *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123);
+    *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl
index a1f4edb..af64e54 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   int i = 0;
   int i_1 = 0;
@@ -47,7 +47,7 @@
   int i_14 = 0;
   float sum = 0.0f;
   int r = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_53 = x_7.x_GLF_uniform_float_values.arr[1].el;
   f = x_53;
   int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -186,10 +186,10 @@
                                   break;
                                 }
                                 while (true) {
-                                  int const x_223 = *(tint_symbol_4);
-                                  *(tint_symbol_4) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(1)));
+                                  int const x_223 = *(tint_symbol_3);
+                                  *(tint_symbol_3) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(1)));
                                   {
-                                    int const x_225 = *(tint_symbol_4);
+                                    int const x_225 = *(tint_symbol_3);
                                     int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el;
                                     if ((x_225 < as_type<int>((as_type<uint>(100) - as_type<uint>(x_227))))) {
                                     } else {
@@ -280,13 +280,13 @@
   int const x_267 = x_10.x_GLF_uniform_int_values.arr[1].el;
   r = x_267;
   while (true) {
-    int const x_272 = *(tint_symbol_4);
+    int const x_272 = *(tint_symbol_3);
     if ((x_272 < 100)) {
     } else {
       break;
     }
-    int const x_275 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(1)));
+    int const x_275 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(1)));
     float const x_277 = f;
     float const x_278 = sum;
     sum = (x_278 + x_277);
@@ -302,21 +302,27 @@
     int const x_293 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_296 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_299 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_290), float(x_293), float(x_296), float(x_299));
+    *(tint_symbol_4) = float4(float(x_290), float(x_293), float(x_296), float(x_299));
   } else {
     int const x_303 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_304 = float(x_303);
-    *(tint_symbol_5) = float4(x_304, x_304, x_304, x_304);
+    *(tint_symbol_4) = float4(x_304, x_304, x_304, x_304);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl
index a1f4edb..af64e54 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   int i = 0;
   int i_1 = 0;
@@ -47,7 +47,7 @@
   int i_14 = 0;
   float sum = 0.0f;
   int r = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   float const x_53 = x_7.x_GLF_uniform_float_values.arr[1].el;
   f = x_53;
   int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el;
@@ -186,10 +186,10 @@
                                   break;
                                 }
                                 while (true) {
-                                  int const x_223 = *(tint_symbol_4);
-                                  *(tint_symbol_4) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(1)));
+                                  int const x_223 = *(tint_symbol_3);
+                                  *(tint_symbol_3) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(1)));
                                   {
-                                    int const x_225 = *(tint_symbol_4);
+                                    int const x_225 = *(tint_symbol_3);
                                     int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el;
                                     if ((x_225 < as_type<int>((as_type<uint>(100) - as_type<uint>(x_227))))) {
                                     } else {
@@ -280,13 +280,13 @@
   int const x_267 = x_10.x_GLF_uniform_int_values.arr[1].el;
   r = x_267;
   while (true) {
-    int const x_272 = *(tint_symbol_4);
+    int const x_272 = *(tint_symbol_3);
     if ((x_272 < 100)) {
     } else {
       break;
     }
-    int const x_275 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(1)));
+    int const x_275 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(1)));
     float const x_277 = f;
     float const x_278 = sum;
     sum = (x_278 + x_277);
@@ -302,21 +302,27 @@
     int const x_293 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_296 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_299 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_290), float(x_293), float(x_296), float(x_299));
+    *(tint_symbol_4) = float4(float(x_290), float(x_293), float(x_296), float(x_299));
   } else {
     int const x_303 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_304 = float(x_303);
-    *(tint_symbol_5) = float4(x_304, x_304, x_304, x_304);
+    *(tint_symbol_4) = float4(x_304, x_304, x_304, x_304);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, x_10, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl
index 9e560db..59ce8f1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.hlsl
@@ -27,8 +27,8 @@
   const int x_80 = asint(x_6[2].x);
   const int x_82 = asint(x_6[2].x);
   const int x_84 = asint(x_6[2].x);
-  const int tint_symbol_3[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84};
-  A = tint_symbol_3;
+  const int tint_symbol_2[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84};
+  A = tint_symbol_2;
   const int x_87 = asint(x_6[3].x);
   const int x_89 = asint(x_6[4].x);
   const int x_91 = asint(x_6[5].x);
@@ -46,8 +46,8 @@
   const int x_115 = asint(x_6[17].x);
   const int x_117 = asint(x_6[18].x);
   const int x_119 = asint(x_6[1].x);
-  const int tint_symbol_4[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119};
-  ref = tint_symbol_4;
+  const int tint_symbol_3[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119};
+  ref = tint_symbol_3;
   const int x_122 = asint(x_6[2].x);
   a = x_122;
   const int x_124 = asint(x_6[2].x);
@@ -112,9 +112,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl
index f1c678f..7449600 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
   tint_array_wrapper_1 A = {};
   tint_array_wrapper_1 ref = {};
   int a = 0;
@@ -45,8 +45,8 @@
   int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_82 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}};
-  A = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}};
+  A = tint_symbol_2;
   int const x_87 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_89 = x_6.x_GLF_uniform_int_values.arr[4].el;
   int const x_91 = x_6.x_GLF_uniform_int_values.arr[5].el;
@@ -64,8 +64,8 @@
   int const x_115 = x_6.x_GLF_uniform_int_values.arr[17].el;
   int const x_117 = x_6.x_GLF_uniform_int_values.arr[18].el;
   int const x_119 = x_6.x_GLF_uniform_int_values.arr[1].el;
-  tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}};
-  ref = tint_symbol_4;
+  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}};
+  ref = tint_symbol_3;
   int const x_122 = x_6.x_GLF_uniform_int_values.arr[2].el;
   a = x_122;
   int const x_124 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -116,23 +116,29 @@
   }
   int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el;
   float const x_175 = float(x_174);
-  *(tint_symbol_6) = float4(x_175, x_175, x_175, x_175);
+  *(tint_symbol_5) = float4(x_175, x_175, x_175, x_175);
   bool const x_177 = ok;
   if (x_177) {
     int const x_181 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_184 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_187 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_190 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_6) = float4(float(x_181), float(x_184), float(x_187), float(x_190));
+    *(tint_symbol_5) = float4(float(x_181), float(x_184), float(x_187), float(x_190));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl
index 9e560db..59ce8f1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.hlsl
@@ -27,8 +27,8 @@
   const int x_80 = asint(x_6[2].x);
   const int x_82 = asint(x_6[2].x);
   const int x_84 = asint(x_6[2].x);
-  const int tint_symbol_3[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84};
-  A = tint_symbol_3;
+  const int tint_symbol_2[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84};
+  A = tint_symbol_2;
   const int x_87 = asint(x_6[3].x);
   const int x_89 = asint(x_6[4].x);
   const int x_91 = asint(x_6[5].x);
@@ -46,8 +46,8 @@
   const int x_115 = asint(x_6[17].x);
   const int x_117 = asint(x_6[18].x);
   const int x_119 = asint(x_6[1].x);
-  const int tint_symbol_4[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119};
-  ref = tint_symbol_4;
+  const int tint_symbol_3[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119};
+  ref = tint_symbol_3;
   const int x_122 = asint(x_6[2].x);
   a = x_122;
   const int x_124 = asint(x_6[2].x);
@@ -112,9 +112,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl
index f1c678f..7449600 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
   tint_array_wrapper_1 A = {};
   tint_array_wrapper_1 ref = {};
   int a = 0;
@@ -45,8 +45,8 @@
   int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_82 = x_6.x_GLF_uniform_int_values.arr[2].el;
   int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el;
-  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}};
-  A = tint_symbol_3;
+  tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}};
+  A = tint_symbol_2;
   int const x_87 = x_6.x_GLF_uniform_int_values.arr[3].el;
   int const x_89 = x_6.x_GLF_uniform_int_values.arr[4].el;
   int const x_91 = x_6.x_GLF_uniform_int_values.arr[5].el;
@@ -64,8 +64,8 @@
   int const x_115 = x_6.x_GLF_uniform_int_values.arr[17].el;
   int const x_117 = x_6.x_GLF_uniform_int_values.arr[18].el;
   int const x_119 = x_6.x_GLF_uniform_int_values.arr[1].el;
-  tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}};
-  ref = tint_symbol_4;
+  tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}};
+  ref = tint_symbol_3;
   int const x_122 = x_6.x_GLF_uniform_int_values.arr[2].el;
   a = x_122;
   int const x_124 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -116,23 +116,29 @@
   }
   int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el;
   float const x_175 = float(x_174);
-  *(tint_symbol_6) = float4(x_175, x_175, x_175, x_175);
+  *(tint_symbol_5) = float4(x_175, x_175, x_175, x_175);
   bool const x_177 = ok;
   if (x_177) {
     int const x_181 = x_6.x_GLF_uniform_int_values.arr[3].el;
     int const x_184 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_187 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_190 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_6) = float4(float(x_181), float(x_184), float(x_187), float(x_190));
+    *(tint_symbol_5) = float4(float(x_181), float(x_184), float(x_187), float(x_190));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl
index d7b62c4..8b616d2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.hlsl
@@ -28,8 +28,8 @@
     const int x_58 = i;
     const int x_60 = asint(x_9[1].x);
     const int x_62 = asint(x_9[2].x);
-    const float4 tint_symbol_4[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-    indexable = tint_symbol_4;
+    const float4 tint_symbol_3[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+    indexable = tint_symbol_3;
     const float x_65 = indexable[clamp(x_58, x_60, x_62)].x;
     a = int(x_65);
     const uint scalar_offset_2 = ((16u * uint(0))) / 4;
@@ -45,8 +45,8 @@
     const float x_81 = asfloat(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]);
     const float x_83 = asfloat(x_6[1].x);
     const int x_86 = a;
-    const float4 tint_symbol_5[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)};
-    indexable_1 = tint_symbol_5;
+    const float4 tint_symbol_4[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)};
+    indexable_1 = tint_symbol_4;
     const float4 x_88 = indexable_1[x_86];
     v1 = x_88;
     {
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_6 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl
index 7cdef23..77ab09b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
   float4 v1 = 0.0f;
   int i = 0;
   int a = 0;
@@ -51,8 +51,8 @@
     int const x_58 = i;
     int const x_60 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_9.x_GLF_uniform_int_values.arr[2].el;
-    tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+    indexable = tint_symbol_2;
     float const x_65 = indexable.arr[clamp(x_58, x_60, x_62)].x;
     a = int(x_65);
     float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el;
@@ -64,8 +64,8 @@
     float const x_81 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_83 = x_6.x_GLF_uniform_float_values.arr[1].el;
     int const x_86 = a;
-    tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}};
-    indexable_1 = tint_symbol_4;
+    tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}};
+    indexable_1 = tint_symbol_3;
     float4 const x_88 = indexable_1.arr[x_86];
     v1 = x_88;
     {
@@ -74,15 +74,21 @@
     }
   }
   float4 const x_91 = v1;
-  *(tint_symbol_6) = x_91;
+  *(tint_symbol_5) = x_91;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) {
+  main_1(x_6, x_9, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl
index d7b62c4..8b616d2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.hlsl
@@ -28,8 +28,8 @@
     const int x_58 = i;
     const int x_60 = asint(x_9[1].x);
     const int x_62 = asint(x_9[2].x);
-    const float4 tint_symbol_4[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-    indexable = tint_symbol_4;
+    const float4 tint_symbol_3[2] = {float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+    indexable = tint_symbol_3;
     const float x_65 = indexable[clamp(x_58, x_60, x_62)].x;
     a = int(x_65);
     const uint scalar_offset_2 = ((16u * uint(0))) / 4;
@@ -45,8 +45,8 @@
     const float x_81 = asfloat(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]);
     const float x_83 = asfloat(x_6[1].x);
     const int x_86 = a;
-    const float4 tint_symbol_5[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)};
-    indexable_1 = tint_symbol_5;
+    const float4 tint_symbol_4[2] = {float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)};
+    indexable_1 = tint_symbol_4;
     const float4 x_88 = indexable_1[x_86];
     v1 = x_88;
     {
@@ -64,9 +64,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_6 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl
index 7cdef23..77ab09b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) {
   float4 v1 = 0.0f;
   int i = 0;
   int a = 0;
@@ -51,8 +51,8 @@
     int const x_58 = i;
     int const x_60 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_9.x_GLF_uniform_int_values.arr[2].el;
-    tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-    indexable = tint_symbol_3;
+    tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+    indexable = tint_symbol_2;
     float const x_65 = indexable.arr[clamp(x_58, x_60, x_62)].x;
     a = int(x_65);
     float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el;
@@ -64,8 +64,8 @@
     float const x_81 = x_6.x_GLF_uniform_float_values.arr[0].el;
     float const x_83 = x_6.x_GLF_uniform_float_values.arr[1].el;
     int const x_86 = a;
-    tint_array_wrapper_2 const tint_symbol_4 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}};
-    indexable_1 = tint_symbol_4;
+    tint_array_wrapper_2 const tint_symbol_3 = {.arr={float4(x_68, x_70, x_72, x_74), float4(x_77, x_79, x_81, x_83)}};
+    indexable_1 = tint_symbol_3;
     float4 const x_88 = indexable_1.arr[x_86];
     v1 = x_88;
     {
@@ -74,15 +74,21 @@
     }
   }
   float4 const x_91 = v1;
-  *(tint_symbol_6) = x_91;
+  *(tint_symbol_5) = x_91;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_6) {
+  main_1(x_6, x_9, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl
index ecfd0d5..d21a8d6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl
index e8baf09..d8d6827 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.spvasm.expected.msl
@@ -28,10 +28,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_31 = x_5.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_4) = float4(x_31, x_31, x_31, x_31);
+  *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31);
   float const x_34 = x_5.x_GLF_uniform_float_values.arr[0].el;
   a = x_34;
   while (true) {
@@ -69,15 +69,21 @@
   int const x_78 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_84 = x_8.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
+  *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl
index ecfd0d5..d21a8d6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl
index e8baf09..d8d6827 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl.expected.msl
@@ -28,10 +28,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_31 = x_5.x_GLF_uniform_float_values.arr[1].el;
-  *(tint_symbol_4) = float4(x_31, x_31, x_31, x_31);
+  *(tint_symbol_3) = float4(x_31, x_31, x_31, x_31);
   float const x_34 = x_5.x_GLF_uniform_float_values.arr[0].el;
   a = x_34;
   while (true) {
@@ -69,15 +69,21 @@
   int const x_78 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el;
   int const x_84 = x_8.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_4) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
+  *(tint_symbol_3) = float4(float(x_75), float(x_78), float(x_81), float(x_84));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl
index e028935..8737c6c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl
index 856f1d9..f0c07b4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   float2x2 M1 = float2x2(0.0f);
   float a = 0.0f;
   int c = 0;
@@ -65,20 +65,26 @@
     int const x_86 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_89 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_92 = x_10.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_83), float(x_86), float(x_89), float(x_92));
+    *(tint_symbol_3) = float4(float(x_83), float(x_86), float(x_89), float(x_92));
   } else {
     int const x_96 = x_10.x_GLF_uniform_int_values.arr[2].el;
     float const x_97 = float(x_96);
-    *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97);
+    *(tint_symbol_3) = float4(x_97, x_97, x_97, x_97);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl
index e028935..8737c6c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.hlsl
@@ -58,9 +58,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl
index 856f1d9..f0c07b4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_3) {
   float2x2 M1 = float2x2(0.0f);
   float a = 0.0f;
   int c = 0;
@@ -65,20 +65,26 @@
     int const x_86 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_89 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_92 = x_10.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_83), float(x_86), float(x_89), float(x_92));
+    *(tint_symbol_3) = float4(float(x_83), float(x_86), float(x_89), float(x_92));
   } else {
     int const x_96 = x_10.x_GLF_uniform_int_values.arr[2].el;
     float const x_97 = float(x_96);
-    *(tint_symbol_4) = float4(x_97, x_97, x_97, x_97);
+    *(tint_symbol_3) = float4(x_97, x_97, x_97, x_97);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl
index 6710a76..4815ef5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl
index 824e6dc..f54d84e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int a = 0;
   f = 2.0f;
@@ -31,20 +31,26 @@
     int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_39), float(x_42), float(x_45), float(x_48));
+    *(tint_symbol_3) = float4(float(x_39), float(x_42), float(x_45), float(x_48));
   } else {
     int const x_52 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_53 = float(x_52);
-    *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+    *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl
index 6710a76..4815ef5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl
index 824e6dc..f54d84e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   int a = 0;
   f = 2.0f;
@@ -31,20 +31,26 @@
     int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_48 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_39), float(x_42), float(x_45), float(x_48));
+    *(tint_symbol_3) = float4(float(x_39), float(x_42), float(x_45), float(x_48));
   } else {
     int const x_52 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_53 = float(x_52);
-    *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+    *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl
index 400789e..8062a6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.hlsl
@@ -90,11 +90,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl
index 589b4c6..69d8106 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
   int i = 0;
   int j = 0;
@@ -55,7 +55,7 @@
       while (true) {
         int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el;
         a = x_64;
-        float const x_66 = (*(tint_symbol_5)).y;
+        float const x_66 = (*(tint_symbol_3)).y;
         float const x_68 = x_11.x_GLF_uniform_float_values.arr[0].el;
         if ((x_66 < x_68)) {
           discard_fragment();
@@ -69,7 +69,7 @@
           }
         }
       }
-      float const x_77 = (*(tint_symbol_5)).y;
+      float const x_77 = (*(tint_symbol_3)).y;
       float const x_79 = x_11.x_GLF_uniform_float_values.arr[0].el;
       if ((x_77 < x_79)) {
         break;
@@ -91,22 +91,28 @@
     int const x_97 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_100 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_102 = a;
-    *(tint_symbol_6) = float4(float(x_94), float(x_97), float(x_100), float(x_102));
+    *(tint_symbol_4) = float4(float(x_94), float(x_97), float(x_100), float(x_102));
   } else {
     int const x_106 = x_7.x_GLF_uniform_int_values.arr[2].el;
     float const x_107 = float(x_106);
-    *(tint_symbol_6) = float4(x_107, x_107, x_107, x_107);
+    *(tint_symbol_4) = float4(x_107, x_107, x_107, x_107);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl
index 400789e..8062a6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.hlsl
@@ -90,11 +90,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl
index 589b4c6..69d8106 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
   int i = 0;
   int j = 0;
@@ -55,7 +55,7 @@
       while (true) {
         int const x_64 = x_7.x_GLF_uniform_int_values.arr[1].el;
         a = x_64;
-        float const x_66 = (*(tint_symbol_5)).y;
+        float const x_66 = (*(tint_symbol_3)).y;
         float const x_68 = x_11.x_GLF_uniform_float_values.arr[0].el;
         if ((x_66 < x_68)) {
           discard_fragment();
@@ -69,7 +69,7 @@
           }
         }
       }
-      float const x_77 = (*(tint_symbol_5)).y;
+      float const x_77 = (*(tint_symbol_3)).y;
       float const x_79 = x_11.x_GLF_uniform_float_values.arr[0].el;
       if ((x_77 < x_79)) {
         break;
@@ -91,22 +91,28 @@
     int const x_97 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_100 = x_7.x_GLF_uniform_int_values.arr[2].el;
     int const x_102 = a;
-    *(tint_symbol_6) = float4(float(x_94), float(x_97), float(x_100), float(x_102));
+    *(tint_symbol_4) = float4(float(x_94), float(x_97), float(x_100), float(x_102));
   } else {
     int const x_106 = x_7.x_GLF_uniform_int_values.arr[2].el;
     float const x_107 = float(x_106);
-    *(tint_symbol_6) = float4(x_107, x_107, x_107, x_107);
+    *(tint_symbol_4) = float4(x_107, x_107, x_107, x_107);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl
index 3345993..e04095d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.hlsl
@@ -202,11 +202,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl
index 15bee7e..669df37 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float a = 0.0f;
   float b = 0.0f;
   int i = 0;
@@ -147,7 +147,7 @@
                         }
                         float const x_196 = x_7.x_GLF_uniform_float_values.arr[1].el;
                         a = x_196;
-                        float const x_198 = (*(tint_symbol_5)).y;
+                        float const x_198 = (*(tint_symbol_3)).y;
                         float const x_200 = x_7.x_GLF_uniform_float_values.arr[1].el;
                         if ((x_198 > x_200)) {
                           break;
@@ -213,17 +213,23 @@
   float const x_207 = a;
   float const x_208 = a;
   float const x_209 = b;
-  *(tint_symbol_6) = float4(x_206, x_207, x_208, x_209);
+  *(tint_symbol_4) = float4(x_206, x_207, x_208, x_209);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl
index 3345993..e04095d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.hlsl
@@ -202,11 +202,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl
index 15bee7e..669df37 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float a = 0.0f;
   float b = 0.0f;
   int i = 0;
@@ -147,7 +147,7 @@
                         }
                         float const x_196 = x_7.x_GLF_uniform_float_values.arr[1].el;
                         a = x_196;
-                        float const x_198 = (*(tint_symbol_5)).y;
+                        float const x_198 = (*(tint_symbol_3)).y;
                         float const x_200 = x_7.x_GLF_uniform_float_values.arr[1].el;
                         if ((x_198 > x_200)) {
                           break;
@@ -213,17 +213,23 @@
   float const x_207 = a;
   float const x_208 = a;
   float const x_209 = b;
-  *(tint_symbol_6) = float4(x_206, x_207, x_208, x_209);
+  *(tint_symbol_4) = float4(x_206, x_207, x_208, x_209);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_11, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_11, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl
index f87712b..7b19951 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.hlsl
@@ -104,9 +104,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl
index 8e6d935..5e039e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 values = 0.0f;
   float4 ref = 0.0f;
@@ -93,20 +93,26 @@
     int const x_126 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_129 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_132 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_123), float(x_126), float(x_129), float(x_132));
+    *(tint_symbol_3) = float4(float(x_123), float(x_126), float(x_129), float(x_132));
   } else {
     int const x_136 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_137 = float(x_136);
-    *(tint_symbol_4) = float4(x_137, x_137, x_137, x_137);
+    *(tint_symbol_3) = float4(x_137, x_137, x_137, x_137);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl
index f87712b..7b19951 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.hlsl
@@ -104,9 +104,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl
index 8e6d935..5e039e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float4 values = 0.0f;
   float4 ref = 0.0f;
@@ -93,20 +93,26 @@
     int const x_126 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_129 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_132 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_123), float(x_126), float(x_129), float(x_132));
+    *(tint_symbol_3) = float4(float(x_123), float(x_126), float(x_129), float(x_132));
   } else {
     int const x_136 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_137 = float(x_136);
-    *(tint_symbol_4) = float4(x_137, x_137, x_137, x_137);
+    *(tint_symbol_3) = float4(x_137, x_137, x_137, x_137);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl
index e0e1799..6938693 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl
index 4c29280..6df2bc2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.spvasm.expected.msl
@@ -21,23 +21,29 @@
   return x_41;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int param = 0;
   param = -1;
   int const x_28 = func_i1_(x_7, &(param));
   if ((x_28 <= 0)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl
index e0e1799..6938693 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl
index 4c29280..6df2bc2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl.expected.msl
@@ -21,23 +21,29 @@
   return x_41;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int param = 0;
   param = -1;
   int const x_28 = func_i1_(x_7, &(param));
   if ((x_28 <= 0)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl
index 564a67a..36a8a86 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl
index eab11e2..c3651d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.spvasm.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_25 = x_5.three;
   if (((10 / (2 & x_25)) == 5)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl
index 564a67a..36a8a86 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl
index eab11e2..c3651d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl.expected.msl
@@ -11,21 +11,27 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_25 = x_5.three;
   if (((10 / (2 & x_25)) == 5)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl
index a06717c..5a59ebd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.hlsl
@@ -73,11 +73,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl
index abd41b5..fbc7140 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl
@@ -24,15 +24,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_38 = float(x_37);
-  *(tint_symbol_5) = float4(x_38, x_38, x_38, x_38);
+  *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38);
   int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el;
   i = x_41;
   while (true) {
@@ -42,10 +42,10 @@
     } else {
       break;
     }
-    float const x_52 = (*(tint_symbol_6)).y;
+    float const x_52 = (*(tint_symbol_4)).y;
     float const x_54 = x_9.x_GLF_uniform_float_values.arr[0].el;
     if ((x_52 < x_54)) {
-      float const x_59 = (*(tint_symbol_6)).x;
+      float const x_59 = (*(tint_symbol_4)).x;
       float const x_61 = x_9.x_GLF_uniform_float_values.arr[0].el;
       if ((x_59 < x_61)) {
         return;
@@ -64,7 +64,7 @@
       int const x_83 = x_6.x_GLF_uniform_int_values.arr[1].el;
       int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el;
       int const x_89 = x_6.x_GLF_uniform_int_values.arr[0].el;
-      *(tint_symbol_5) = float4(float(x_80), float(x_83), float(x_86), float(x_89));
+      *(tint_symbol_3) = float4(float(x_80), float(x_83), float(x_86), float(x_89));
       break;
     }
     float const x_93 = x_9.x_GLF_uniform_float_values.arr[0].el;
@@ -79,13 +79,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_9, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl
index a06717c..5a59ebd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.hlsl
@@ -73,11 +73,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl
index abd41b5..fbc7140 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl
@@ -24,15 +24,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_38 = float(x_37);
-  *(tint_symbol_5) = float4(x_38, x_38, x_38, x_38);
+  *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38);
   int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el;
   i = x_41;
   while (true) {
@@ -42,10 +42,10 @@
     } else {
       break;
     }
-    float const x_52 = (*(tint_symbol_6)).y;
+    float const x_52 = (*(tint_symbol_4)).y;
     float const x_54 = x_9.x_GLF_uniform_float_values.arr[0].el;
     if ((x_52 < x_54)) {
-      float const x_59 = (*(tint_symbol_6)).x;
+      float const x_59 = (*(tint_symbol_4)).x;
       float const x_61 = x_9.x_GLF_uniform_float_values.arr[0].el;
       if ((x_59 < x_61)) {
         return;
@@ -64,7 +64,7 @@
       int const x_83 = x_6.x_GLF_uniform_int_values.arr[1].el;
       int const x_86 = x_6.x_GLF_uniform_int_values.arr[1].el;
       int const x_89 = x_6.x_GLF_uniform_int_values.arr[0].el;
-      *(tint_symbol_5) = float4(float(x_80), float(x_83), float(x_86), float(x_89));
+      *(tint_symbol_3) = float4(float(x_80), float(x_83), float(x_86), float(x_89));
       break;
     }
     float const x_93 = x_9.x_GLF_uniform_float_values.arr[0].el;
@@ -79,13 +79,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, x_9, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, x_9, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl
index f0bc792..7102617 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl
index 5e53c89..61d0827 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_3) {
   float f0 = 0.0f;
   float f1 = 0.0f;
   float f2 = 0.0f;
@@ -56,20 +56,26 @@
     int const x_68 = x_13.x_GLF_uniform_int_values.arr[1].el;
     int const x_71 = x_13.x_GLF_uniform_int_values.arr[1].el;
     int const x_74 = x_13.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_65), float(x_68), float(x_71), float(x_74));
+    *(tint_symbol_3) = float4(float(x_65), float(x_68), float(x_71), float(x_74));
   } else {
     int const x_78 = x_13.x_GLF_uniform_int_values.arr[1].el;
     float const x_79 = float(x_78);
-    *(tint_symbol_4) = float4(x_79, x_79, x_79, x_79);
+    *(tint_symbol_3) = float4(x_79, x_79, x_79, x_79);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_11, x_13, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_11, x_13, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_11, x_13, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl
index f0bc792..7102617 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl
index 5e53c89..61d0827 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_3) {
   float f0 = 0.0f;
   float f1 = 0.0f;
   float f2 = 0.0f;
@@ -56,20 +56,26 @@
     int const x_68 = x_13.x_GLF_uniform_int_values.arr[1].el;
     int const x_71 = x_13.x_GLF_uniform_int_values.arr[1].el;
     int const x_74 = x_13.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_65), float(x_68), float(x_71), float(x_74));
+    *(tint_symbol_3) = float4(float(x_65), float(x_68), float(x_71), float(x_74));
   } else {
     int const x_78 = x_13.x_GLF_uniform_int_values.arr[1].el;
     float const x_79 = float(x_78);
-    *(tint_symbol_4) = float4(x_79, x_79, x_79, x_79);
+    *(tint_symbol_3) = float4(x_79, x_79, x_79, x_79);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf2& x_11, constant buf1& x_13, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_11, x_13, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_11, x_13, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_11, x_13, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl
index fd122cb..038f2c2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl
index 53c1f7d..31ebccb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   bool x_48 = false;
   bool x_49_phi = false;
@@ -53,20 +53,26 @@
     int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_60 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
+    *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
   } else {
     int const x_67 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_68 = float(x_67);
-    *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68);
+    *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl
index fd122cb..038f2c2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl
index 53c1f7d..31ebccb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   bool x_48 = false;
   bool x_49_phi = false;
@@ -53,20 +53,26 @@
     int const x_57 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_60 = x_10.x_GLF_uniform_int_values.arr[0].el;
     int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
+    *(tint_symbol_3) = float4(float(x_54), float(x_57), float(x_60), float(x_63));
   } else {
     int const x_67 = x_10.x_GLF_uniform_int_values.arr[0].el;
     float const x_68 = float(x_67);
-    *(tint_symbol_4) = float4(x_68, x_68, x_68, x_68);
+    *(tint_symbol_3) = float4(x_68, x_68, x_68, x_68);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl
index 223f8fa..5ec6e57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl
index d5cbb31..24ac7ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   float c = 0.0f;
@@ -28,7 +28,7 @@
   float const x_28 = b;
   c = pow(x_27, x_28);
   float const x_30 = c;
-  *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
+  *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30);
   float const x_32 = a;
   float const x_34 = b;
   if (((x_32 == -1.0f) & (x_34 == 1.700000048f))) {
@@ -36,19 +36,25 @@
     float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el;
     float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
     float const x_47 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_41, x_43, x_45, x_47);
+    *(tint_symbol_3) = float4(x_41, x_43, x_45, x_47);
   } else {
     float const x_50 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50);
+    *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl
index 132221e..f5dc7e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl
index 8000e84..c102f6c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   float c = 0.0f;
@@ -28,7 +28,7 @@
   float const x_28 = b;
   c = pow(x_27, x_28);
   float const x_30 = c;
-  *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
+  *(tint_symbol_3) = float4(x_30, x_30, x_30, x_30);
   float const x_32 = a;
   float const x_34 = b;
   if (((x_32 == -1.0f) && (x_34 == 1.700000048f))) {
@@ -36,19 +36,25 @@
     float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el;
     float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
     float const x_47 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_41, x_43, x_45, x_47);
+    *(tint_symbol_3) = float4(x_41, x_43, x_45, x_47);
   } else {
     float const x_50 = x_8.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_50, x_50, x_50, x_50);
+    *(tint_symbol_3) = float4(x_50, x_50, x_50, x_50);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl
index 89c814d..53c03fc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.hlsl
@@ -34,9 +34,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl
index d98099c..260e4cb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = -7563;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -29,20 +29,26 @@
     int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
+    *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
   } else {
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_49 = float(x_48);
-    *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49);
+    *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl
index 89c814d..53c03fc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.hlsl
@@ -34,9 +34,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl
index d98099c..260e4cb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = -7563;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -29,20 +29,26 @@
     int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
+    *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
   } else {
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_49 = float(x_48);
-    *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49);
+    *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl
index 979542d..4120e3c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl
index 7130ddf..5dad71d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = -1;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -29,20 +29,26 @@
     int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
+    *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
   } else {
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_49 = float(x_48);
-    *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49);
+    *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl
index 979542d..4120e3c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.hlsl
@@ -33,9 +33,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl
index 7130ddf..5dad71d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = -1;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -29,20 +29,26 @@
     int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_41 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
+    *(tint_symbol_3) = float4(float(x_35), float(x_38), float(x_41), float(x_44));
   } else {
     int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el;
     float const x_49 = float(x_48);
-    *(tint_symbol_4) = float4(x_49, x_49, x_49, x_49);
+    *(tint_symbol_3) = float4(x_49, x_49, x_49, x_49);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl
index 883cfd2..9ef8ef4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl
@@ -34,9 +34,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl
index 3c3c805..81cec69 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl
@@ -14,13 +14,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   tint_array_wrapper x_9 = {};
   int x_10_phi = 0;
   tint_array_wrapper const x_33 = x_9;
   int const x_6 = x_33.arr[0u];
   while (true) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     int const x_7 = x_5.zero;
     int const x_8 = x_9.arr[x_7];
     if ((x_8 == x_6)) {
@@ -32,18 +32,24 @@
   }
   int const x_10 = x_10_phi;
   if (((x_10 == 1) | (x_10 == 2))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl
index 2c7bb9e..76eb097 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.hlsl
@@ -38,9 +38,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl
index fc24e78..cb7da37 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl.expected.msl
@@ -14,13 +14,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   tint_array_wrapper x_9 = {};
   int x_10_phi = 0;
   tint_array_wrapper const x_33 = x_9;
   int const x_6 = x_33.arr[0u];
   while (true) {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     int const x_7 = x_5.zero;
     int const x_8 = x_9.arr[x_7];
     if ((x_8 == x_6)) {
@@ -32,18 +32,24 @@
   }
   int const x_10 = x_10_phi;
   if (((x_10 == 1) || (x_10 == 2))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl
index 0adcd37..32622e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl
index a0d65d8..acdf2d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   tint_array_wrapper b = {};
   S param = {};
@@ -55,18 +55,24 @@
   }
   float const x_63 = a;
   if ((x_63 == 5.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl
index 0adcd37..32622e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl
index a0d65d8..acdf2d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   tint_array_wrapper b = {};
   S param = {};
@@ -55,18 +55,24 @@
   }
   float const x_63 = a;
   if ((x_63 == 5.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl
index 59e50ef..26431be 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.hlsl
@@ -68,11 +68,16 @@
   float4 x_GLF_v1_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_v1};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_v1};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl
index f75a911..1ccb594 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_v1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_v1_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int j = 0;
   int const x_36 = x_7.x_GLF_uniform_int_values.arr[1].el;
@@ -54,7 +54,7 @@
       } else {
         break;
       }
-      float const x_65 = (*(tint_symbol_5)).x;
+      float const x_65 = (*(tint_symbol_3)).x;
       float const x_67 = x_9.x_GLF_uniform_float_values.arr[0].el;
       if ((x_65 < x_67)) {
         discard_fragment();
@@ -63,7 +63,7 @@
       int const x_75 = x_7.x_GLF_uniform_int_values.arr[1].el;
       int const x_78 = x_7.x_GLF_uniform_int_values.arr[1].el;
       int const x_81 = x_7.x_GLF_uniform_int_values.arr[2].el;
-      *(tint_symbol_6) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+      *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
       {
         int const x_84 = j;
         j = as_type<int>((as_type<uint>(x_84) + as_type<uint>(1)));
@@ -77,13 +77,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl
index 59e50ef..26431be 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.hlsl
@@ -68,11 +68,16 @@
   float4 x_GLF_v1_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_v1};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_v1};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl
index f75a911..1ccb594 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl
@@ -24,11 +24,11 @@
 struct main_out {
   float4 x_GLF_v1_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_v1_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int j = 0;
   int const x_36 = x_7.x_GLF_uniform_int_values.arr[1].el;
@@ -54,7 +54,7 @@
       } else {
         break;
       }
-      float const x_65 = (*(tint_symbol_5)).x;
+      float const x_65 = (*(tint_symbol_3)).x;
       float const x_67 = x_9.x_GLF_uniform_float_values.arr[0].el;
       if ((x_65 < x_67)) {
         discard_fragment();
@@ -63,7 +63,7 @@
       int const x_75 = x_7.x_GLF_uniform_int_values.arr[1].el;
       int const x_78 = x_7.x_GLF_uniform_int_values.arr[1].el;
       int const x_81 = x_7.x_GLF_uniform_int_values.arr[2].el;
-      *(tint_symbol_6) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+      *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
       {
         int const x_84 = j;
         j = as_type<int>((as_type<uint>(x_84) + as_type<uint>(1)));
@@ -77,13 +77,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_v1_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_v1_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_v1_1=tint_symbol_3.x_GLF_v1_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_v1_1 = inner_result.x_GLF_v1_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl
index e9afb93..dee41a7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   float f = 0.0f;
   int i = 0;
@@ -73,20 +73,26 @@
     int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el;
     int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el;
     int const x_118 = x_5.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
+    *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
   } else {
     int const x_122 = x_5.x_GLF_uniform_int_values.arr[1].el;
     float const x_123 = float(x_122);
-    *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123);
+    *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl
index c00aec3..81fa027 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   float f = 0.0f;
   int i = 0;
@@ -73,20 +73,26 @@
     int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el;
     int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el;
     int const x_118 = x_5.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
+    *(tint_symbol_3) = float4(float(x_109), float(x_112), float(x_115), float(x_118));
   } else {
     int const x_122 = x_5.x_GLF_uniform_int_values.arr[1].el;
     float const x_123 = float(x_122);
-    *(tint_symbol_4) = float4(x_123, x_123, x_123, x_123);
+    *(tint_symbol_3) = float4(x_123, x_123, x_123, x_123);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl
index c226607..e3bbf2a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl
index b86c0c8..0376e59 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl
@@ -30,7 +30,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_3) {
   int a = 0;
   tint_array_wrapper arr = {};
   int i = 0;
@@ -75,18 +75,24 @@
   }
   int const x_33 = a;
   if ((x_33 == 6)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl
index c226607..e3bbf2a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl
index b86c0c8..0376e59 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl
@@ -30,7 +30,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_11, thread float4* const tint_symbol_3) {
   int a = 0;
   tint_array_wrapper arr = {};
   int i = 0;
@@ -75,18 +75,24 @@
   }
   int const x_33 = a;
   if ((x_33 == 6)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl
index 1ade401..e4be6c8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.spvasm.expected.msl
@@ -18,19 +18,19 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, thread float4* const tint_symbol_3) {
   int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_25 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_31 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_22), float(x_25), float(x_28), float(x_31));
+  *(tint_symbol_3) = float4(float(x_22), float(x_25), float(x_28), float(x_31));
   int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el;
   if ((x_35 > x_37)) {
     while (true) {
       int const x_46 = x_5.x_GLF_uniform_int_values.arr[0].el;
       float const x_47 = float(x_46);
-      *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47);
+      *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47);
       {
         int const x_50 = x_5.x_GLF_uniform_int_values.arr[1].el;
         int const x_52 = x_5.x_GLF_uniform_int_values.arr[0].el;
@@ -45,11 +45,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl
index 1ade401..e4be6c8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl.expected.msl
@@ -18,19 +18,19 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, thread float4* const tint_symbol_3) {
   int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_25 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_31 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_22), float(x_25), float(x_28), float(x_31));
+  *(tint_symbol_3) = float4(float(x_22), float(x_25), float(x_28), float(x_31));
   int const x_35 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_37 = x_5.x_GLF_uniform_int_values.arr[0].el;
   if ((x_35 > x_37)) {
     while (true) {
       int const x_46 = x_5.x_GLF_uniform_int_values.arr[0].el;
       float const x_47 = float(x_46);
-      *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47);
+      *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47);
       {
         int const x_50 = x_5.x_GLF_uniform_int_values.arr[1].el;
         int const x_52 = x_5.x_GLF_uniform_int_values.arr[0].el;
@@ -45,11 +45,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl
index 02dc25f..552bf5d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.hlsl
@@ -53,11 +53,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl
index ab191bd..32fd0e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl
@@ -27,13 +27,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
   i = x_42;
   while (true) {
@@ -53,23 +53,29 @@
       i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
     }
   }
-  float const x_61 = (*(tint_symbol_6)).y;
+  float const x_61 = (*(tint_symbol_4)).y;
   float const x_63 = x_9.x_GLF_uniform_float_values.arr[0].el;
   if ((x_61 < x_63)) {
     return;
   }
   float const x_68 = x_11.injectionSwitch.y;
-  *(tint_symbol_5) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68);
+  *(tint_symbol_3) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, x_11, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, x_11, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl
index 02dc25f..552bf5d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.hlsl
@@ -53,11 +53,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl
index ab191bd..32fd0e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl
@@ -27,13 +27,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   int const x_42 = x_7.x_GLF_uniform_int_values.arr[1].el;
   i = x_42;
   while (true) {
@@ -53,23 +53,29 @@
       i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
     }
   }
-  float const x_61 = (*(tint_symbol_6)).y;
+  float const x_61 = (*(tint_symbol_4)).y;
   float const x_63 = x_9.x_GLF_uniform_float_values.arr[0].el;
   if ((x_61 < x_63)) {
     return;
   }
   float const x_68 = x_11.injectionSwitch.y;
-  *(tint_symbol_5) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68);
+  *(tint_symbol_3) = float4(float3(1.0f, 1.0f, 1.0f).x, float3(1.0f, 1.0f, 1.0f).y, float3(1.0f, 1.0f, 1.0f).z, x_68);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, x_11, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, x_11, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl
index c33dd5c..aac269b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.hlsl
@@ -17,8 +17,8 @@
   const float x_70 = asfloat(x_7[1].x);
   const float x_73 = asfloat(x_7[1].x);
   const int x_77 = a;
-  const float2 tint_symbol_4[3] = {float2(x_70, x_70), float2(x_73, x_73), v};
-  indexable = tint_symbol_4;
+  const float2 tint_symbol_3[3] = {float2(x_70, x_70), float2(x_73, x_73), v};
+  indexable = tint_symbol_3;
   const float2 x_79 = indexable[x_77];
   return x_79;
 }
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl
index d54821f..e36fd59 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.spvasm.expected.msl
@@ -42,13 +42,13 @@
   float const x_73 = x_7.x_GLF_uniform_float_values.arr[1].el;
   float2 const x_75 = v;
   int const x_77 = a;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}};
-  indexable = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}};
+  indexable = tint_symbol_2;
   float2 const x_79 = indexable.arr[x_77];
   return x_79;
 }
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
   float2 const x_40 = func_(x_7);
   float const x_43 = x_7.x_GLF_uniform_float_values.arr[0].el;
   if ((x_40.y == x_43)) {
@@ -56,20 +56,26 @@
     int const x_52 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_55 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_58 = x_11.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_49), float(x_52), float(x_55), float(x_58));
+    *(tint_symbol_4) = float4(float(x_49), float(x_52), float(x_55), float(x_58));
   } else {
     int const x_62 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_63 = float(x_62);
-    *(tint_symbol_5) = float4(x_63, x_63, x_63, x_63);
+    *(tint_symbol_4) = float4(x_63, x_63, x_63, x_63);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) {
+  main_1(x_7, x_11, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, x_11, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl
index c33dd5c..aac269b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.hlsl
@@ -17,8 +17,8 @@
   const float x_70 = asfloat(x_7[1].x);
   const float x_73 = asfloat(x_7[1].x);
   const int x_77 = a;
-  const float2 tint_symbol_4[3] = {float2(x_70, x_70), float2(x_73, x_73), v};
-  indexable = tint_symbol_4;
+  const float2 tint_symbol_3[3] = {float2(x_70, x_70), float2(x_73, x_73), v};
+  indexable = tint_symbol_3;
   const float2 x_79 = indexable[x_77];
   return x_79;
 }
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl
index d54821f..e36fd59 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl.expected.msl
@@ -42,13 +42,13 @@
   float const x_73 = x_7.x_GLF_uniform_float_values.arr[1].el;
   float2 const x_75 = v;
   int const x_77 = a;
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}};
-  indexable = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={float2(x_70, x_70), float2(x_73, x_73), x_75}};
+  indexable = tint_symbol_2;
   float2 const x_79 = indexable.arr[x_77];
   return x_79;
 }
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
   float2 const x_40 = func_(x_7);
   float const x_43 = x_7.x_GLF_uniform_float_values.arr[0].el;
   if ((x_40.y == x_43)) {
@@ -56,20 +56,26 @@
     int const x_52 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_55 = x_11.x_GLF_uniform_int_values.arr[1].el;
     int const x_58 = x_11.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_49), float(x_52), float(x_55), float(x_58));
+    *(tint_symbol_4) = float4(float(x_49), float(x_52), float(x_55), float(x_58));
   } else {
     int const x_62 = x_11.x_GLF_uniform_int_values.arr[1].el;
     float const x_63 = float(x_62);
-    *(tint_symbol_5) = float4(x_63, x_63, x_63, x_63);
+    *(tint_symbol_4) = float4(x_63, x_63, x_63, x_63);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_5) {
+  main_1(x_7, x_11, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, x_11, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl
index 5d63b9b..027b703 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.hlsl
@@ -200,9 +200,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl
index c3f9b00..a2b94a3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 sums = {};
   int a = 0;
   int b = 0;
@@ -213,20 +213,26 @@
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_79 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_76), float(x_77), float(x_78), float(x_79));
+    *(tint_symbol_3) = float4(float(x_76), float(x_77), float(x_78), float(x_79));
   } else {
     int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_230 = float(x_80);
-    *(tint_symbol_4) = float4(x_230, x_230, x_230, x_230);
+    *(tint_symbol_3) = float4(x_230, x_230, x_230, x_230);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl
index 5d63b9b..027b703 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.hlsl
@@ -200,9 +200,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl
index c3f9b00..a2b94a3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 sums = {};
   int a = 0;
   int b = 0;
@@ -213,20 +213,26 @@
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_79 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_76), float(x_77), float(x_78), float(x_79));
+    *(tint_symbol_3) = float4(float(x_76), float(x_77), float(x_78), float(x_79));
   } else {
     int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_230 = float(x_80);
-    *(tint_symbol_4) = float4(x_230, x_230, x_230, x_230);
+    *(tint_symbol_3) = float4(x_230, x_230, x_230, x_230);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl
index 9982cde..794e852 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.hlsl
@@ -160,9 +160,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl
index 1ef23cb..527bad1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i0 = 0;
   int i1 = 0;
@@ -166,18 +166,24 @@
   }
   int const x_157 = a;
   if ((x_157 == 3)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl
index 9982cde..794e852 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.hlsl
@@ -160,9 +160,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl
index 1ef23cb..527bad1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int i0 = 0;
   int i1 = 0;
@@ -166,18 +166,24 @@
   }
   int const x_157 = a;
   if ((x_157 == 3)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl
index 7fa9952..291cdde 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl
index b2905ce..58f4554 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   bool x_51 = false;
@@ -31,7 +31,7 @@
   float const x_37 = a;
   b = cos(log(x_37));
   float const x_40 = b;
-  *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40);
+  *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40);
   float const x_42 = b;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
   bool const x_45 = (x_42 > x_44);
@@ -48,16 +48,22 @@
     float const x_58 = x_6.x_GLF_uniform_float_values.arr[4].el;
     float const x_60 = x_6.x_GLF_uniform_float_values.arr[4].el;
     float const x_62 = x_6.x_GLF_uniform_float_values.arr[3].el;
-    *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62);
+    *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl
index 7fa9952..291cdde 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.hlsl
@@ -44,9 +44,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl
index b2905ce..58f4554 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float b = 0.0f;
   bool x_51 = false;
@@ -31,7 +31,7 @@
   float const x_37 = a;
   b = cos(log(x_37));
   float const x_40 = b;
-  *(tint_symbol_4) = float4(x_40, x_40, x_40, x_40);
+  *(tint_symbol_3) = float4(x_40, x_40, x_40, x_40);
   float const x_42 = b;
   float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el;
   bool const x_45 = (x_42 > x_44);
@@ -48,16 +48,22 @@
     float const x_58 = x_6.x_GLF_uniform_float_values.arr[4].el;
     float const x_60 = x_6.x_GLF_uniform_float_values.arr[4].el;
     float const x_62 = x_6.x_GLF_uniform_float_values.arr[3].el;
-    *(tint_symbol_4) = float4(x_56, x_58, x_60, x_62);
+    *(tint_symbol_3) = float4(x_56, x_58, x_60, x_62);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl
index 84a4567..ef42aea 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl
index b5f5cc9..19c1772 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.spvasm.expected.msl
@@ -18,26 +18,32 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   int const x_25 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_34 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_25), float(x_28), float(x_31), float(x_34));
-  float4 const x_37 = *(tint_symbol_4);
+  *(tint_symbol_3) = float4(float(x_25), float(x_28), float(x_31), float(x_34));
+  float4 const x_37 = *(tint_symbol_3);
   v = x_37;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float4 const x_38 = v;
-  *(tint_symbol_4) = x_38;
+  *(tint_symbol_3) = x_38;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl
index 84a4567..ef42aea 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl
index b5f5cc9..19c1772 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl.expected.msl
@@ -18,26 +18,32 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   int const x_25 = x_5.x_GLF_uniform_int_values.arr[0].el;
   int const x_28 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el;
   int const x_34 = x_5.x_GLF_uniform_int_values.arr[0].el;
-  *(tint_symbol_4) = float4(float(x_25), float(x_28), float(x_31), float(x_34));
-  float4 const x_37 = *(tint_symbol_4);
+  *(tint_symbol_3) = float4(float(x_25), float(x_28), float(x_31), float(x_34));
+  float4 const x_37 = *(tint_symbol_3);
   v = x_37;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float4 const x_38 = v;
-  *(tint_symbol_4) = x_38;
+  *(tint_symbol_3) = x_38;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl
index 3011a24..b3334f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl
index f3cbdcf..2d3d142 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int c = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -43,7 +43,7 @@
   }
   int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_47 = float(x_46);
-  *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47);
+  *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47);
   int const x_49 = c;
   int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
   if ((x_49 == x_51)) {
@@ -51,16 +51,22 @@
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
+    *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl
index 3011a24..b3334f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl
index f3cbdcf..2d3d142 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int c = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -43,7 +43,7 @@
   }
   int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_47 = float(x_46);
-  *(tint_symbol_4) = float4(x_47, x_47, x_47, x_47);
+  *(tint_symbol_3) = float4(x_47, x_47, x_47, x_47);
   int const x_49 = c;
   int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
   if ((x_49 == x_51)) {
@@ -51,16 +51,22 @@
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
+    *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl
index 3739a71..89e0d81 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl
index 762e4db..e632817 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_3) {
   float const x_29 = x_5.v1.x;
   float const x_31 = x_5.v1.y;
   if ((x_29 < x_31)) {
@@ -29,28 +29,34 @@
     int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_46 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
+    *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
     float const x_50 = x_5.v1.x;
     float const x_52 = x_5.v1.y;
     if ((x_50 > x_52)) {
       int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
       float const x_58 = float(x_57);
-      *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+      *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
     }
     return;
   } else {
     int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_62 = float(x_61);
-    *(tint_symbol_4) = float4(x_62, x_62, x_62, x_62);
+    *(tint_symbol_3) = float4(x_62, x_62, x_62, x_62);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl
index 3739a71..89e0d81 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.hlsl
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl
index 762e4db..e632817 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_3) {
   float const x_29 = x_5.v1.x;
   float const x_31 = x_5.v1.y;
   if ((x_29 < x_31)) {
@@ -29,28 +29,34 @@
     int const x_40 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_46 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
+    *(tint_symbol_3) = float4(float(x_37), float(x_40), float(x_43), float(x_46));
     float const x_50 = x_5.v1.x;
     float const x_52 = x_5.v1.y;
     if ((x_50 > x_52)) {
       int const x_57 = x_7.x_GLF_uniform_int_values.arr[0].el;
       float const x_58 = float(x_57);
-      *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+      *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
     }
     return;
   } else {
     int const x_61 = x_7.x_GLF_uniform_int_values.arr[1].el;
     float const x_62 = float(x_61);
-    *(tint_symbol_4) = float4(x_62, x_62, x_62, x_62);
+    *(tint_symbol_3) = float4(x_62, x_62, x_62, x_62);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl
index 4208963..fb3d5a7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl
index 747b267..3586605 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.spvasm.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_29 = false;
   bool x_30_phi = false;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float const x_23 = x_5.one;
   bool const x_24 = (x_23 < 0.0f);
   x_30_phi = x_24;
@@ -25,18 +25,24 @@
   }
   bool const x_30 = x_30_phi;
   if (x_30) {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl
index 4208963..fb3d5a7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl
index 747b267..3586605 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_29 = false;
   bool x_30_phi = false;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float const x_23 = x_5.one;
   bool const x_24 = (x_23 < 0.0f);
   x_30_phi = x_24;
@@ -25,18 +25,24 @@
   }
   bool const x_30 = x_30_phi;
   if (x_30) {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl
index 1fcb766..a5f3b7a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.hlsl
@@ -101,9 +101,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl
index a1a1c5a..ad2ebaf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_36 = 0;
   bool x_74 = false;
   float4 x_33_phi = 0.0f;
@@ -72,7 +72,7 @@
             x_56_phi = x_57;
           }
         }
-        *(tint_symbol_4) = x_53;
+        *(tint_symbol_3) = x_53;
         x_34_phi = x_53;
         x_62_phi = x_31;
         break;
@@ -87,7 +87,7 @@
       x_38_phi = x_39;
     }
   }
-  float4 const x_63 = *(tint_symbol_4);
+  float4 const x_63 = *(tint_symbol_3);
   int const x_65 = x_5.x_GLF_uniform_int_values.arr[2].el;
   float const x_66 = float(x_65);
   bool const x_69 = all((x_63 == float4(x_66, x_66, x_66, x_66)));
@@ -101,19 +101,25 @@
   if (x_75) {
     float const x_79 = float(x_31);
     float const x_80 = float(x_29);
-    *(tint_symbol_4) = float4(x_79, x_80, x_80, x_79);
+    *(tint_symbol_3) = float4(x_79, x_80, x_80, x_79);
   } else {
     float const x_82 = float(x_29);
-    *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82);
+    *(tint_symbol_3) = float4(x_82, x_82, x_82, x_82);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl
index 1fcb766..a5f3b7a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.hlsl
@@ -101,9 +101,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl
index a1a1c5a..ad2ebaf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int x_36 = 0;
   bool x_74 = false;
   float4 x_33_phi = 0.0f;
@@ -72,7 +72,7 @@
             x_56_phi = x_57;
           }
         }
-        *(tint_symbol_4) = x_53;
+        *(tint_symbol_3) = x_53;
         x_34_phi = x_53;
         x_62_phi = x_31;
         break;
@@ -87,7 +87,7 @@
       x_38_phi = x_39;
     }
   }
-  float4 const x_63 = *(tint_symbol_4);
+  float4 const x_63 = *(tint_symbol_3);
   int const x_65 = x_5.x_GLF_uniform_int_values.arr[2].el;
   float const x_66 = float(x_65);
   bool const x_69 = all((x_63 == float4(x_66, x_66, x_66, x_66)));
@@ -101,19 +101,25 @@
   if (x_75) {
     float const x_79 = float(x_31);
     float const x_80 = float(x_29);
-    *(tint_symbol_4) = float4(x_79, x_80, x_80, x_79);
+    *(tint_symbol_3) = float4(x_79, x_80, x_80, x_79);
   } else {
     float const x_82 = float(x_29);
-    *(tint_symbol_4) = float4(x_82, x_82, x_82, x_82);
+    *(tint_symbol_3) = float4(x_82, x_82, x_82, x_82);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl
index 2f55ee9..aa307b7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.hlsl
@@ -73,11 +73,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl
index a68c333..7a4ba5a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 a = 0.0f;
   float3 b = 0.0f;
   bool x_105 = false;
@@ -20,26 +20,26 @@
   bool x_112_phi = false;
   a = float2(1.0f, 1.0f);
   b = float3(0.0f, 0.0f, 0.0f);
-  float const x_52 = (*(tint_symbol_5)).y;
+  float const x_52 = (*(tint_symbol_3)).y;
   if ((int(x_52) < 40)) {
     b = float3(0.100000001f, 0.100000001f, 0.100000001f);
   } else {
-    float const x_59 = (*(tint_symbol_5)).y;
+    float const x_59 = (*(tint_symbol_3)).y;
     if ((int(x_59) < 60)) {
       b = float3(0.200000003f, 0.200000003f, 0.200000003f);
     } else {
-      float const x_66 = (*(tint_symbol_5)).y;
+      float const x_66 = (*(tint_symbol_3)).y;
       if ((x_66 < 80.0f)) {
         float const x_72 = a.x;
         float const x_74 = x_8.one;
         b = (cos((float3(x_72, x_72, x_72) + float3(x_74, x_74, x_74))) + float3(0.01f, 0.01f, 0.01f));
       } else {
-        float const x_82 = (*(tint_symbol_5)).y;
+        float const x_82 = (*(tint_symbol_3)).y;
         if ((int(x_82) < 100)) {
           float const x_89 = x_8.one;
           b = cos(float3(x_89, x_89, x_89));
         } else {
-          float const x_93 = (*(tint_symbol_5)).y;
+          float const x_93 = (*(tint_symbol_3)).y;
           if ((int(x_93) < 500)) {
             b = float3(0.540302277f, 0.540302277f, -0.99996084f);
           }
@@ -64,20 +64,26 @@
   }
   bool const x_112 = x_112_phi;
   if (x_112) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl
index 2f55ee9..aa307b7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.hlsl
@@ -73,11 +73,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl
index a68c333..7a4ba5a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 a = 0.0f;
   float3 b = 0.0f;
   bool x_105 = false;
@@ -20,26 +20,26 @@
   bool x_112_phi = false;
   a = float2(1.0f, 1.0f);
   b = float3(0.0f, 0.0f, 0.0f);
-  float const x_52 = (*(tint_symbol_5)).y;
+  float const x_52 = (*(tint_symbol_3)).y;
   if ((int(x_52) < 40)) {
     b = float3(0.100000001f, 0.100000001f, 0.100000001f);
   } else {
-    float const x_59 = (*(tint_symbol_5)).y;
+    float const x_59 = (*(tint_symbol_3)).y;
     if ((int(x_59) < 60)) {
       b = float3(0.200000003f, 0.200000003f, 0.200000003f);
     } else {
-      float const x_66 = (*(tint_symbol_5)).y;
+      float const x_66 = (*(tint_symbol_3)).y;
       if ((x_66 < 80.0f)) {
         float const x_72 = a.x;
         float const x_74 = x_8.one;
         b = (cos((float3(x_72, x_72, x_72) + float3(x_74, x_74, x_74))) + float3(0.01f, 0.01f, 0.01f));
       } else {
-        float const x_82 = (*(tint_symbol_5)).y;
+        float const x_82 = (*(tint_symbol_3)).y;
         if ((int(x_82) < 100)) {
           float const x_89 = x_8.one;
           b = cos(float3(x_89, x_89, x_89));
         } else {
-          float const x_93 = (*(tint_symbol_5)).y;
+          float const x_93 = (*(tint_symbol_3)).y;
           if ((int(x_93) < 500)) {
             b = float3(0.540302277f, 0.540302277f, -0.99996084f);
           }
@@ -64,20 +64,26 @@
   }
   bool const x_112 = x_112_phi;
   if (x_112) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl
index a739821..7832372 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl
index 0163d7c..a35525e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl
@@ -30,7 +30,7 @@
   return x_21;
 }
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int j = 0;
@@ -74,18 +74,24 @@
   }
   int const x_38 = a;
   if ((x_38 == 30)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl
index a739821..7832372 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl
index 0163d7c..a35525e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl
@@ -30,7 +30,7 @@
   return x_21;
 }
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int j = 0;
@@ -74,18 +74,24 @@
   }
   int const x_38 = a;
   if ((x_38 == 30)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl
index 3cc04e2..4dbce1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl
index abf71b6..a9d7c8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl
@@ -14,10 +14,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   int i = 0;
   float4 v = 0.0f;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   while (true) {
     int const x_38 = i;
@@ -29,7 +29,7 @@
     while (true) {
       int const x_48 = x_6.one;
       if ((x_48 == 1)) {
-        *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       }
       {
         if (false) {
@@ -46,15 +46,21 @@
   int const x_55 = x_9.zero;
   v.y = float(x_55);
   float const x_59 = v.y;
-  (*(tint_symbol_4)).y = x_59;
+  (*(tint_symbol_3)).y = x_59;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl
index 3cc04e2..4dbce1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.hlsl
@@ -48,9 +48,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl
index abf71b6..a9d7c8e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl
@@ -14,10 +14,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_3) {
   int i = 0;
   float4 v = 0.0f;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   while (true) {
     int const x_38 = i;
@@ -29,7 +29,7 @@
     while (true) {
       int const x_48 = x_6.one;
       if ((x_48 == 1)) {
-        *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       }
       {
         if (false) {
@@ -46,15 +46,21 @@
   int const x_55 = x_9.zero;
   v.y = float(x_55);
   float const x_59 = v.y;
-  (*(tint_symbol_4)).y = x_59;
+  (*(tint_symbol_3)).y = x_59;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl
index 2e58c08..973b5de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl
index 6e6d198..35fcbc7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int4 a = 0;
   int i = 0;
   int sum = 0;
@@ -48,18 +48,24 @@
   sum = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(x_67)))) + as_type<uint>(x_70)))) + as_type<uint>(x_73)));
   int const x_75 = sum;
   if ((x_75 == 10)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl
index 2e58c08..973b5de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl
index 6e6d198..35fcbc7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int4 a = 0;
   int i = 0;
   int sum = 0;
@@ -48,18 +48,24 @@
   sum = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(x_67)))) + as_type<uint>(x_70)))) + as_type<uint>(x_73)));
   int const x_75 = sum;
   if ((x_75 == 10)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl
index 0503ece..f8b9b38 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl
index aedac0a..de6f3d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_24 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -30,20 +30,26 @@
     int const x_39 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_44 = a;
-    *(tint_symbol_4) = float4(float(x_36), float(x_39), float(x_42), float(x_44));
+    *(tint_symbol_3) = float4(float(x_36), float(x_39), float(x_42), float(x_44));
   } else {
     int const x_47 = a;
     float const x_48 = float(x_47);
-    *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
+    *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl
index 0503ece..f8b9b38 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.hlsl
@@ -32,9 +32,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl
index aedac0a..de6f3d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int const x_24 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_26 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -30,20 +30,26 @@
     int const x_39 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_44 = a;
-    *(tint_symbol_4) = float4(float(x_36), float(x_39), float(x_42), float(x_44));
+    *(tint_symbol_3) = float4(float(x_36), float(x_39), float(x_42), float(x_44));
   } else {
     int const x_47 = a;
     float const x_48 = float(x_47);
-    *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
+    *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl
index db9236b..4343e59 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.hlsl
@@ -37,9 +37,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl
index 79dbc24..11a33b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int i = 0;
   int r = 0;
   i = 0;
@@ -34,18 +34,24 @@
   }
   int const x_50 = i;
   if ((x_50 == 10)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl
index db9236b..4343e59 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.hlsl
@@ -37,9 +37,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl
index 79dbc24..11a33b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int i = 0;
   int r = 0;
   i = 0;
@@ -34,18 +34,24 @@
   }
   int const x_50 = i;
   if ((x_50 == 10)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl
index ad4b4c8..d719788 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl
index 34251dc..bd21fbd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.spvasm.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   uint a = 0u;
   uint const x_27 = x_6.two;
   a = (x_27 / 1u);
   uint const x_29 = a;
   if ((x_29 == 2u)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl
index ad4b4c8..d719788 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl
index 34251dc..bd21fbd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   uint a = 0u;
   uint const x_27 = x_6.two;
   a = (x_27 / 1u);
   uint const x_29 = a;
   if ((x_29 == 2u)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl
index 910242d..53970fa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl
index fdecb23..5a048cf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl
@@ -23,7 +23,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -53,20 +53,26 @@
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
+    *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
   } else {
     int const x_68 = a;
     float const x_69 = float(x_68);
-    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl
index 910242d..53970fa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl
index fdecb23..5a048cf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl
@@ -23,7 +23,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -53,20 +53,26 @@
     int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
+    *(tint_symbol_3) = float4(float(x_56), float(x_59), float(x_62), float(x_65));
   } else {
     int const x_68 = a;
     float const x_69 = float(x_68);
-    *(tint_symbol_4) = float4(x_69, x_69, x_69, x_69);
+    *(tint_symbol_3) = float4(x_69, x_69, x_69, x_69);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl
index f886474..283e0bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl
index ab479dd..d84266e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.spvasm.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_25 = x_6.three;
   f = ldexp(x_25, 0);
   float const x_27 = f;
   if ((x_27 == 3.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl
index f886474..283e0bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl
index ab479dd..d84266e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_25 = x_6.three;
   f = ldexp(x_25, 0);
   float const x_27 = f;
   if ((x_27 == 3.0f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl
index b79d8c0..f1ff6f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.hlsl
@@ -90,9 +90,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl
index fa512e1..89bc2bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 A = {};
   bool x_77 = false;
@@ -90,18 +90,24 @@
     int const x_106 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_109 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_112 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_103), float(x_106), float(x_109), float(x_112));
+    *(tint_symbol_3) = float4(float(x_103), float(x_106), float(x_109), float(x_112));
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl
index b79d8c0..f1ff6f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.hlsl
@@ -90,9 +90,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl
index fa512e1..89bc2bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 A = {};
   bool x_77 = false;
@@ -90,18 +90,24 @@
     int const x_106 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_109 = x_6.x_GLF_uniform_int_values.arr[0].el;
     int const x_112 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_103), float(x_106), float(x_109), float(x_112));
+    *(tint_symbol_3) = float4(float(x_103), float(x_106), float(x_109), float(x_112));
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl
index 29ab977..40f49b4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl
index d1276b9..2abdef2 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_30 = x_6.x_GLF_uniform_float_values.arr[0].el;
   a = (x_30 - (1.0f * floor((x_30 / 1.0f))));
@@ -39,19 +39,25 @@
     float const x_42 = a;
     float const x_43 = a;
     int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_40), x_42, x_43, float(x_45));
+    *(tint_symbol_3) = float4(float(x_40), x_42, x_43, float(x_45));
   } else {
     float const x_48 = a;
-    *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
+    *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl
index 2ae1a6e..9a99d68 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl
index 7df3919..e9fc53b 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float a = 0.0f;
   float const x_30 = x_6.x_GLF_uniform_float_values.arr[0].el;
   a = fmod(x_30, 1.0f);
@@ -39,19 +39,25 @@
     float const x_42 = a;
     float const x_43 = a;
     int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_40), x_42, x_43, float(x_45));
+    *(tint_symbol_3) = float4(float(x_40), x_42, x_43, float(x_45));
   } else {
     float const x_48 = a;
-    *(tint_symbol_4) = float4(x_48, x_48, x_48, x_48);
+    *(tint_symbol_3) = float4(x_48, x_48, x_48, x_48);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl
index 322962c..1fc8aac 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.hlsl
@@ -24,9 +24,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl
index 6c24b25..a496e4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float4 res = 0.0f;
   v = float4(8.399999619f, -864.664978027f, 945.41998291f, 1.0f);
@@ -21,18 +21,24 @@
   float4 const x_39 = v;
   float4 const x_40 = res;
   if ((distance(x_39, x_40) < 0.01f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl
index 322962c..1fc8aac 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.hlsl
@@ -24,9 +24,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl
index 6c24b25..a496e4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   float4 res = 0.0f;
   v = float4(8.399999619f, -864.664978027f, 945.41998291f, 1.0f);
@@ -21,18 +21,24 @@
   float4 const x_39 = v;
   float4 const x_40 = res;
   if ((distance(x_39, x_40) < 0.01f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl
index 791abae..7393f85 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl
index 051b40e..0b085d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.spvasm.expected.msl
@@ -7,37 +7,43 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   bool x_36 = false;
   bool x_37_phi = false;
   int const x_29 = x_6.three;
   bool const x_30 = (x_29 > 1);
   x_37_phi = x_30;
   if (x_30) {
-    float const x_34 = (*(tint_symbol_5)).y;
+    float const x_34 = (*(tint_symbol_3)).y;
     x_36 = !((x_34 < -5.0f));
     x_37_phi = x_36;
   }
   bool const x_37 = x_37_phi;
   if (x_37) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl
index 791abae..7393f85 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl
index 051b40e..0b085d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl.expected.msl
@@ -7,37 +7,43 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   bool x_36 = false;
   bool x_37_phi = false;
   int const x_29 = x_6.three;
   bool const x_30 = (x_29 > 1);
   x_37_phi = x_30;
   if (x_30) {
-    float const x_34 = (*(tint_symbol_5)).y;
+    float const x_34 = (*(tint_symbol_3)).y;
     x_36 = !((x_34 < -5.0f));
     x_37_phi = x_36;
   }
   bool const x_37 = x_37_phi;
   if (x_37) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl
index cc1c58a..4b3a28e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl
index 1905aab..3268ea1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.spvasm.expected.msl
@@ -18,27 +18,33 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el;
   if (((1 >> as_type<uint>(x_22)) > 0)) {
     int const x_29 = x_5.x_GLF_uniform_int_values.arr[1].el;
     int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_35 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_38 = x_5.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_29), float(x_32), float(x_35), float(x_38));
+    *(tint_symbol_3) = float4(float(x_29), float(x_32), float(x_35), float(x_38));
   } else {
     int const x_42 = x_5.x_GLF_uniform_int_values.arr[0].el;
     float const x_43 = float(x_42);
-    *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43);
+    *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl
index cc1c58a..4b3a28e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.hlsl
@@ -30,9 +30,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl
index 1905aab..3268ea1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl.expected.msl
@@ -18,27 +18,33 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int const x_22 = x_5.x_GLF_uniform_int_values.arr[0].el;
   if (((1 >> as_type<uint>(x_22)) > 0)) {
     int const x_29 = x_5.x_GLF_uniform_int_values.arr[1].el;
     int const x_32 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_35 = x_5.x_GLF_uniform_int_values.arr[0].el;
     int const x_38 = x_5.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_29), float(x_32), float(x_35), float(x_38));
+    *(tint_symbol_3) = float4(float(x_29), float(x_32), float(x_35), float(x_38));
   } else {
     int const x_42 = x_5.x_GLF_uniform_int_values.arr[0].el;
     float const x_43 = float(x_42);
-    *(tint_symbol_4) = float4(x_43, x_43, x_43, x_43);
+    *(tint_symbol_3) = float4(x_43, x_43, x_43, x_43);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl
index 30526ab..4722a0c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl
index 97f9005..2f5f445 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_31 = false;
   bool x_32_phi = false;
   bool const x_26 = (sign(cosh(709.0f)) == 1.0f);
@@ -23,18 +23,24 @@
   }
   bool const x_32 = x_32_phi;
   if (x_32) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl
index 30526ab..4722a0c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl
index 97f9005..2f5f445 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_31 = false;
   bool x_32_phi = false;
   bool const x_26 = (sign(cosh(709.0f)) == 1.0f);
@@ -23,18 +23,24 @@
   }
   bool const x_32 = x_32_phi;
   if (x_32) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl
index 25c78f5..8eb8559 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.hlsl
@@ -43,11 +43,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl
index b9e9449..58e6224 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.spvasm.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   bool x_49 = false;
   bool x_50_phi = false;
-  float const x_31 = (*(tint_symbol_5)).x;
+  float const x_31 = (*(tint_symbol_3)).x;
   f = x_31;
   float const x_32 = f;
   f = (x_32 + NAN);
@@ -39,20 +39,26 @@
   }
   float const x_53 = f;
   if ((x_53 == 0.0f)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl
index 1c644c9..7731160 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl
@@ -43,11 +43,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl
index 6940a25..c93b522 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
   bool x_49 = false;
   bool x_50_phi = false;
-  float const x_31 = (*(tint_symbol_5)).x;
+  float const x_31 = (*(tint_symbol_3)).x;
   f = x_31;
   float const x_32 = f;
   f = (x_32 + -INFINITY);
@@ -39,20 +39,26 @@
   }
   float const x_53 = f;
   if ((x_53 == 0.0f)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl
index 96a4bf3..7eb174d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl
index 47967f7..6be68ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.spvasm.expected.msl
@@ -50,7 +50,7 @@
   return x_106;
 }
 
-void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float2x2 m1 = float2x2(0.0f);
   float2x2 m2 = float2x2(0.0f);
   float2 v1_1 = 0.0f;
@@ -78,20 +78,26 @@
     float const x_77 = x_7.x_GLF_uniform_float_values.arr[1].el;
     float const x_79 = x_7.x_GLF_uniform_float_values.arr[1].el;
     float const x_81 = x_7.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_75, x_77, x_79, x_81);
+    *(tint_symbol_3) = float4(x_75, x_77, x_79, x_81);
   } else {
     int const x_84 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl
index 96a4bf3..7eb174d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl
index 47967f7..6be68ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl.expected.msl
@@ -50,7 +50,7 @@
   return x_106;
 }
 
-void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_3) {
   float2x2 m1 = float2x2(0.0f);
   float2x2 m2 = float2x2(0.0f);
   float2 v1_1 = 0.0f;
@@ -78,20 +78,26 @@
     float const x_77 = x_7.x_GLF_uniform_float_values.arr[1].el;
     float const x_79 = x_7.x_GLF_uniform_float_values.arr[1].el;
     float const x_81 = x_7.x_GLF_uniform_float_values.arr[0].el;
-    *(tint_symbol_4) = float4(x_75, x_77, x_79, x_81);
+    *(tint_symbol_3) = float4(x_75, x_77, x_79, x_81);
   } else {
     int const x_84 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_85 = float(x_84);
-    *(tint_symbol_4) = float4(x_85, x_85, x_85, x_85);
+    *(tint_symbol_3) = float4(x_85, x_85, x_85, x_85);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl
index ca61b52..b0682f9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl
index d1fa98f..46ab0ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl
@@ -11,48 +11,54 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   while (true) {
-    int const x_8 = *(tint_symbol_4);
+    int const x_8 = *(tint_symbol_3);
     float const x_46 = x_6.injectionSwitch.x;
     if ((x_8 < int((x_46 + 2.0f)))) {
     } else {
       break;
     }
-    int const x_9 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
+    int const x_9 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
   }
-  int const x_11 = *(tint_symbol_4);
+  int const x_11 = *(tint_symbol_3);
   a = x_11;
   while (true) {
-    int const x_12 = *(tint_symbol_4);
+    int const x_12 = *(tint_symbol_3);
     float const x_56 = x_6.injectionSwitch.y;
     if ((x_12 < int(x_56))) {
     } else {
       break;
     }
-    int const x_13 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_13) + as_type<uint>(1)));
+    int const x_13 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_13) + as_type<uint>(1)));
   }
   int const x_15 = a;
   a = x_15;
   int const x_16 = a;
   if ((x_16 == 2)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl
index ca61b52..b0682f9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl
index d1fa98f..46ab0ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl
@@ -11,48 +11,54 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_6, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int a = 0;
-  *(tint_symbol_4) = 0;
+  *(tint_symbol_3) = 0;
   while (true) {
-    int const x_8 = *(tint_symbol_4);
+    int const x_8 = *(tint_symbol_3);
     float const x_46 = x_6.injectionSwitch.x;
     if ((x_8 < int((x_46 + 2.0f)))) {
     } else {
       break;
     }
-    int const x_9 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
+    int const x_9 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
   }
-  int const x_11 = *(tint_symbol_4);
+  int const x_11 = *(tint_symbol_3);
   a = x_11;
   while (true) {
-    int const x_12 = *(tint_symbol_4);
+    int const x_12 = *(tint_symbol_3);
     float const x_56 = x_6.injectionSwitch.y;
     if ((x_12 < int(x_56))) {
     } else {
       break;
     }
-    int const x_13 = *(tint_symbol_4);
-    *(tint_symbol_4) = as_type<int>((as_type<uint>(x_13) + as_type<uint>(1)));
+    int const x_13 = *(tint_symbol_3);
+    *(tint_symbol_3) = as_type<int>((as_type<uint>(x_13) + as_type<uint>(1)));
   }
   int const x_15 = a;
   a = x_15;
   int const x_16 = a;
   if ((x_16 == 2)) {
-    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
-  thread int tint_symbol_6 = 0;
-  thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_6, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread int tint_symbol_7 = 0;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl
index 0c6ec66..1b89527 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.hlsl
@@ -55,9 +55,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl
index 0439234..f019220 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   int2 v2 = 0;
   float2 v3 = 0.0f;
@@ -43,7 +43,7 @@
   int2 const x_50 = v2;
   v3 = ldexp(x_49, x_50);
   float const x_53 = v3.y;
-  *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+  *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
   float const x_56 = v3.x;
   float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
   bool const x_59 = (x_56 > x_58);
@@ -60,20 +60,26 @@
     int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+    *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
   } else {
     int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_85);
-    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl
index 0c6ec66..1b89527 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.hlsl
@@ -55,9 +55,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl
index 0439234..f019220 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   int2 v2 = 0;
   float2 v3 = 0.0f;
@@ -43,7 +43,7 @@
   int2 const x_50 = v2;
   v3 = ldexp(x_49, x_50);
   float const x_53 = v3.y;
-  *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+  *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
   float const x_56 = v3.x;
   float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
   bool const x_59 = (x_56 > x_58);
@@ -60,20 +60,26 @@
     int const x_75 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_78 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_81 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
+    *(tint_symbol_3) = float4(float(x_72), float(x_75), float(x_78), float(x_81));
   } else {
     int const x_85 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_86 = float(x_85);
-    *(tint_symbol_4) = float4(x_86, x_86, x_86, x_86);
+    *(tint_symbol_3) = float4(x_86, x_86, x_86, x_86);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl
index 47c3b72..85ee4ed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.hlsl
@@ -63,9 +63,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl
index a9726f7..94aea4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl
@@ -21,9 +21,9 @@
   return float4(0.0f, 0.0f, 0.0f, 0.0f);
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   while (true) {
     int const x_33 = i;
@@ -36,14 +36,14 @@
     switch(x_38) {
       case 1: {
         float4 const x_43 = func_(x_6);
-        *(tint_symbol_4) = x_43;
+        *(tint_symbol_3) = x_43;
         /* fallthrough */
       }
       default: {
         /* fallthrough */
       }
       case 0: {
-        (*(tint_symbol_4)).y = 0.0f;
+        (*(tint_symbol_3)).y = 0.0f;
         break;
       }
     }
@@ -55,11 +55,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl
index 47c3b72..85ee4ed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.hlsl
@@ -63,9 +63,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl
index a9726f7..94aea4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl
@@ -21,9 +21,9 @@
   return float4(0.0f, 0.0f, 0.0f, 0.0f);
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   while (true) {
     int const x_33 = i;
@@ -36,14 +36,14 @@
     switch(x_38) {
       case 1: {
         float4 const x_43 = func_(x_6);
-        *(tint_symbol_4) = x_43;
+        *(tint_symbol_3) = x_43;
         /* fallthrough */
       }
       default: {
         /* fallthrough */
       }
       case 0: {
-        (*(tint_symbol_4)).y = 0.0f;
+        (*(tint_symbol_3)).y = 0.0f;
         break;
       }
     }
@@ -55,11 +55,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl
index 37bf795..56c09e0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl
index 57eb0c0..c006b50 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   float2 v2 = 0.0f;
   v1 = float2(1.0f, -1.0f);
@@ -18,15 +18,21 @@
   float const x_29 = v2.y;
   float const x_31 = v2.y;
   float const x_33 = v2.x;
-  *(tint_symbol_4) = float4(x_27, x_29, x_31, x_33);
+  *(tint_symbol_3) = float4(x_27, x_29, x_31, x_33);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl
index 37bf795..56c09e0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl
index 57eb0c0..c006b50 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   float2 v2 = 0.0f;
   v1 = float2(1.0f, -1.0f);
@@ -18,15 +18,21 @@
   float const x_29 = v2.y;
   float const x_31 = v2.y;
   float const x_33 = v2.x;
-  *(tint_symbol_4) = float4(x_27, x_29, x_31, x_33);
+  *(tint_symbol_3) = float4(x_27, x_29, x_31, x_33);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl
index 0e2f8aa..9c92bd8 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl
@@ -40,7 +40,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_5) {
   S obj = {};
   float a = 0.0f;
   float2 x_49 = 0.0f;
@@ -48,9 +48,9 @@
   float const x_51 = x_7.x_GLF_uniform_float_values.arr[3].el;
   float const x_53 = x_7.x_GLF_uniform_float_values.arr[2].el;
   float const x_55 = x_7.x_GLF_uniform_float_values.arr[4].el;
-  tint_array_wrapper const tint_symbol_3 = {.arr={x_51, x_53, x_55}};
-  S const tint_symbol_4 = {.numbers=tint_symbol_3};
-  obj = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={x_51, x_53, x_55}};
+  S const tint_symbol_3 = {.numbers=tint_symbol_2};
+  obj = tint_symbol_3;
   float const x_59 = x_9.zeroVec.x;
   float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el;
   obj.numbers.arr[int(x_59)] = x_62;
@@ -78,20 +78,26 @@
     int const x_100 = x_15.x_GLF_uniform_int_values.arr[1].el;
     int const x_103 = x_15.x_GLF_uniform_int_values.arr[1].el;
     int const x_106 = x_15.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_97), float(x_100), float(x_103), float(x_106));
+    *(tint_symbol_5) = float4(float(x_97), float(x_100), float(x_103), float(x_106));
   } else {
     int const x_110 = x_15.x_GLF_uniform_int_values.arr[1].el;
     float const x_111 = float(x_110);
-    *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111);
+    *(tint_symbol_5) = float4(x_111, x_111, x_111, x_111);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_9, x_12, x_15, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_9, x_12, x_15, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, x_12, x_15, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl
index 0e2f8aa..9c92bd8 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl
@@ -40,7 +40,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_5) {
   S obj = {};
   float a = 0.0f;
   float2 x_49 = 0.0f;
@@ -48,9 +48,9 @@
   float const x_51 = x_7.x_GLF_uniform_float_values.arr[3].el;
   float const x_53 = x_7.x_GLF_uniform_float_values.arr[2].el;
   float const x_55 = x_7.x_GLF_uniform_float_values.arr[4].el;
-  tint_array_wrapper const tint_symbol_3 = {.arr={x_51, x_53, x_55}};
-  S const tint_symbol_4 = {.numbers=tint_symbol_3};
-  obj = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={x_51, x_53, x_55}};
+  S const tint_symbol_3 = {.numbers=tint_symbol_2};
+  obj = tint_symbol_3;
   float const x_59 = x_9.zeroVec.x;
   float const x_62 = x_7.x_GLF_uniform_float_values.arr[0].el;
   obj.numbers.arr[int(x_59)] = x_62;
@@ -78,20 +78,26 @@
     int const x_100 = x_15.x_GLF_uniform_int_values.arr[1].el;
     int const x_103 = x_15.x_GLF_uniform_int_values.arr[1].el;
     int const x_106 = x_15.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_97), float(x_100), float(x_103), float(x_106));
+    *(tint_symbol_5) = float4(float(x_97), float(x_100), float(x_103), float(x_106));
   } else {
     int const x_110 = x_15.x_GLF_uniform_int_values.arr[1].el;
     float const x_111 = float(x_110);
-    *(tint_symbol_6) = float4(x_111, x_111, x_111, x_111);
+    *(tint_symbol_5) = float4(x_111, x_111, x_111, x_111);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_7, constant buf2& x_9, constant buf3& x_12, constant buf0& x_15, thread float4* const tint_symbol_6) {
+  main_1(x_7, x_9, x_12, x_15, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, x_9, x_12, x_15, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, x_12, x_15, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl
index 3d8d1c1..16a9fa4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.hlsl
@@ -43,9 +43,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl
index 16e16b0..fa05b2e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_37 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_39 = x_8.resolution.x;
@@ -46,20 +46,26 @@
     int const x_62 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_68 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
+    *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
   } else {
     int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_73 = float(x_72);
-    *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73);
+    *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl
index 3d8d1c1..16a9fa4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.hlsl
@@ -43,9 +43,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl
index 16e16b0..fa05b2e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   float const x_37 = x_6.x_GLF_uniform_float_values.arr[1].el;
   float const x_39 = x_8.resolution.x;
@@ -46,20 +46,26 @@
     int const x_62 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_65 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_68 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
+    *(tint_symbol_3) = float4(float(x_59), float(x_62), float(x_65), float(x_68));
   } else {
     int const x_72 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_73 = float(x_72);
-    *(tint_symbol_4) = float4(x_73, x_73, x_73, x_73);
+    *(tint_symbol_3) = float4(x_73, x_73, x_73, x_73);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl
index 8dae79c..3a56778 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.hlsl
@@ -78,9 +78,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl
index 5d1a17b..9ba7250 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3) {
   float4 color = 0.0f;
   int i = 0;
   int j = 0;
@@ -98,15 +98,21 @@
     }
   }
   float4 const x_89 = color;
-  *(tint_symbol_4) = x_89;
+  *(tint_symbol_3) = x_89;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl
index 8dae79c..3a56778 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.hlsl
@@ -78,9 +78,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl
index 5d1a17b..9ba7250 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3) {
   float4 color = 0.0f;
   int i = 0;
   int j = 0;
@@ -98,15 +98,21 @@
     }
   }
   float4 const x_89 = color;
-  *(tint_symbol_4) = x_89;
+  *(tint_symbol_3) = x_89;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
+  main_1(x_7, x_11, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, x_11, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl
index 3f6b2dc..033e7cb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl
@@ -31,16 +31,16 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_3) {
   int i = 0;
   float const x_38 = x_5.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38);
+  *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38);
   float const x_41 = x_7.zero;
   float const x_43 = x_5.x_GLF_uniform_float_values.arr[0].el;
   if ((x_41 > x_43)) {
     while (true) {
       float const x_53 = x_5.x_GLF_uniform_float_values.arr[1].el;
-      *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+      *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
       {
         if (true) {
         } else {
@@ -68,7 +68,7 @@
           float const x_75 = x_5.x_GLF_uniform_float_values.arr[0].el;
           float const x_77 = x_5.x_GLF_uniform_float_values.arr[0].el;
           float const x_79 = x_5.x_GLF_uniform_float_values.arr[1].el;
-          *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79);
+          *(tint_symbol_3) = float4(x_73, x_75, x_77, x_79);
           {
             int const x_16 = i;
             i = as_type<int>((as_type<uint>(x_16) + as_type<uint>(1)));
@@ -89,11 +89,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl
index 3f6b2dc..033e7cb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl
@@ -31,16 +31,16 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_3) {
   int i = 0;
   float const x_38 = x_5.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_4) = float4(x_38, x_38, x_38, x_38);
+  *(tint_symbol_3) = float4(x_38, x_38, x_38, x_38);
   float const x_41 = x_7.zero;
   float const x_43 = x_5.x_GLF_uniform_float_values.arr[0].el;
   if ((x_41 > x_43)) {
     while (true) {
       float const x_53 = x_5.x_GLF_uniform_float_values.arr[1].el;
-      *(tint_symbol_4) = float4(x_53, x_53, x_53, x_53);
+      *(tint_symbol_3) = float4(x_53, x_53, x_53, x_53);
       {
         if (true) {
         } else {
@@ -68,7 +68,7 @@
           float const x_75 = x_5.x_GLF_uniform_float_values.arr[0].el;
           float const x_77 = x_5.x_GLF_uniform_float_values.arr[0].el;
           float const x_79 = x_5.x_GLF_uniform_float_values.arr[1].el;
-          *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79);
+          *(tint_symbol_3) = float4(x_73, x_75, x_77, x_79);
           {
             int const x_16 = i;
             i = as_type<int>((as_type<uint>(x_16) + as_type<uint>(1)));
@@ -89,11 +89,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_5, x_7, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, x_7, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, x_7, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl
index d7bfdcc..7854e84 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl
@@ -29,11 +29,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl
index d8ea250..59beca6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl
@@ -7,14 +7,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float a = 0.0f;
   float b = 0.0f;
-  float const x_33 = (*(tint_symbol_5)).x;
+  float const x_33 = (*(tint_symbol_3)).x;
   a = dfdx(cos(x_33));
   float const x_37 = x_8.two;
   float const x_38 = a;
@@ -22,20 +22,26 @@
   float const x_40 = b;
   float const x_42 = b;
   if (((x_40 >= 1.899999976f) & (x_42 <= 2.099999905f))) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl
index f5d4020..65d213d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl
index 31f4571..9498210 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl.expected.msl
@@ -7,14 +7,14 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float a = 0.0f;
   float b = 0.0f;
-  float const x_33 = (*(tint_symbol_5)).x;
+  float const x_33 = (*(tint_symbol_3)).x;
   a = dfdx(cos(x_33));
   float const x_37 = x_8.two;
   float const x_38 = a;
@@ -22,20 +22,26 @@
   float const x_40 = b;
   float const x_42 = b;
   if (((x_40 >= 1.899999976f) && (x_42 <= 2.099999905f))) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl
index afea7c2..01e8447 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.hlsl
@@ -145,9 +145,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl
index a342ca8..d755278 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl
@@ -42,7 +42,7 @@
   return;
 }
 
-void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 arr = {};
   int i_1 = 0;
@@ -149,20 +149,26 @@
     int const x_155 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_158 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_161 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_152), float(x_155), float(x_158), float(x_161));
+    *(tint_symbol_3) = float4(float(x_152), float(x_155), float(x_158), float(x_161));
   } else {
     int const x_165 = x_10.x_GLF_uniform_int_values.arr[2].el;
     float const x_166 = float(x_165);
-    *(tint_symbol_4) = float4(x_166, x_166, x_166, x_166);
+    *(tint_symbol_3) = float4(x_166, x_166, x_166, x_166);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_10, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl
index afea7c2..01e8447 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.hlsl
@@ -145,9 +145,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl
index a342ca8..d755278 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl
@@ -42,7 +42,7 @@
   return;
 }
 
-void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 arr = {};
   int i_1 = 0;
@@ -149,20 +149,26 @@
     int const x_155 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_158 = x_10.x_GLF_uniform_int_values.arr[2].el;
     int const x_161 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_152), float(x_155), float(x_158), float(x_161));
+    *(tint_symbol_3) = float4(float(x_152), float(x_155), float(x_158), float(x_161));
   } else {
     int const x_165 = x_10.x_GLF_uniform_int_values.arr[2].el;
     float const x_166 = float(x_165);
-    *(tint_symbol_4) = float4(x_166, x_166, x_166, x_166);
+    *(tint_symbol_3) = float4(x_166, x_166, x_166, x_166);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_10, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_10, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_10, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl
index 1012c9a..7625205 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl
index f8856db..c3b0818 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
   float2x2 const x_26 = m;
@@ -18,18 +18,24 @@
   float2x2 const x_32 = m;
   float2x2 const x_34 = transpose((x_31 * x_32));
   if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl
index 256b8ea..d587bd2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.hlsl
@@ -24,9 +24,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl
index 452c4cf..604e881 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2x2 m = float2x2(0.0f);
   m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
   float2x2 const x_26 = m;
@@ -18,18 +18,24 @@
   float2x2 const x_32 = m;
   float2x2 const x_34 = transpose((x_31 * x_32));
   if ((all((x_30[0u] == x_34[0u])) && all((x_30[1u] == x_34[1u])))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl
index 1f17f3d..7ab118a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.hlsl
@@ -41,11 +41,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl
index 268f0cc..bebdfd6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl
@@ -24,13 +24,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
-  float const x_35 = (*(tint_symbol_5)).y;
+  float const x_35 = (*(tint_symbol_3)).y;
   float const x_37 = x_7.x_GLF_uniform_float_values.arr[1].el;
   f = fract(trunc(select(1.0f, 0.100000001f, (x_35 < x_37))));
   float const x_42 = f;
@@ -40,22 +40,28 @@
     int const x_53 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
+    *(tint_symbol_4) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
   } else {
     int const x_63 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_64 = float(x_63);
-    *(tint_symbol_6) = float4(x_64, x_64, x_64, x_64);
+    *(tint_symbol_4) = float4(x_64, x_64, x_64, x_64);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl
index 1f17f3d..7ab118a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.hlsl
@@ -41,11 +41,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl
index 268f0cc..bebdfd6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl
@@ -24,13 +24,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float f = 0.0f;
-  float const x_35 = (*(tint_symbol_5)).y;
+  float const x_35 = (*(tint_symbol_3)).y;
   float const x_37 = x_7.x_GLF_uniform_float_values.arr[1].el;
   f = fract(trunc(select(1.0f, 0.100000001f, (x_35 < x_37))));
   float const x_42 = f;
@@ -40,22 +40,28 @@
     int const x_53 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_9.x_GLF_uniform_int_values.arr[1].el;
     int const x_59 = x_9.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
+    *(tint_symbol_4) = float4(float(x_50), float(x_53), float(x_56), float(x_59));
   } else {
     int const x_63 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_64 = float(x_63);
-    *(tint_symbol_6) = float4(x_64, x_64, x_64, x_64);
+    *(tint_symbol_4) = float4(x_64, x_64, x_64, x_64);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl
index 325bac8..30187e0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.hlsl
@@ -22,11 +22,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float4 func_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl
index cf5d8b8..1bc94ed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.spvasm.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 x_24 = 0.0f;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   int const x_26 = x_6.one;
   if ((x_26 == 0)) {
     return;
   }
   x_24 = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float4 func_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl
index 325bac8..30187e0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.hlsl
@@ -22,11 +22,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float4 func_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl
index cf5d8b8..1bc94ed 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl.expected.msl
@@ -11,24 +11,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float4 x_24 = 0.0f;
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   int const x_26 = x_6.one;
   if ((x_26 == 0)) {
     return;
   }
   x_24 = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float4 func_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl
index 3fb8095..0670ecb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.hlsl
@@ -49,9 +49,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl
index ec52a78..b75ca5d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float2x2 m24 = float2x2(0.0f);
   float a = 0.0f;
   float2 v2 = 0.0f;
@@ -41,23 +41,29 @@
   float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float2 const x_59 = v3;
   float const x_61 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_4) = float4(x_58, x_59.x, x_59.y, x_61);
+  *(tint_symbol_3) = float4(x_58, x_59.x, x_59.y, x_61);
   float const x_66 = x_8.v1.y;
   float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_66 == x_68)) {
-    float4 const x_73 = *(tint_symbol_4);
-    *(tint_symbol_4) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w);
+    float4 const x_73 = *(tint_symbol_3);
+    *(tint_symbol_3) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl
index 8705db8..5513092 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl
index 0ca872c..0f4d9f7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl
@@ -21,7 +21,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float2x2 m24 = float2x2(0.0f);
   float a = 0.0f;
   float2 v2 = 0.0f;
@@ -40,23 +40,29 @@
   float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float2 const x_59 = v3;
   float const x_61 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  *(tint_symbol_4) = float4(x_58, x_59.x, x_59.y, x_61);
+  *(tint_symbol_3) = float4(x_58, x_59.x, x_59.y, x_61);
   float const x_66 = x_8.v1.y;
   float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el;
   if ((x_66 == x_68)) {
-    float4 const x_73 = *(tint_symbol_4);
-    *(tint_symbol_4) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w);
+    float4 const x_73 = *(tint_symbol_3);
+    *(tint_symbol_3) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl
index ac091bd..7b2449d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.hlsl
@@ -81,9 +81,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl
index 9415629..3bfed4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl
@@ -35,7 +35,7 @@
   return;
 }
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 arr = {};
   int index = 0;
@@ -86,20 +86,26 @@
     int const x_88 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_91 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_94 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
+    *(tint_symbol_3) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
   } else {
     int const x_98 = x_9.x_GLF_uniform_int_values.arr[0].el;
     float const x_99 = float(x_98);
-    *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
+    *(tint_symbol_3) = float4(x_99, x_99, x_99, x_99);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl
index ac091bd..7b2449d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.hlsl
@@ -81,9 +81,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl
index 9415629..3bfed4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl
@@ -35,7 +35,7 @@
   return;
 }
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 arr = {};
   int index = 0;
@@ -86,20 +86,26 @@
     int const x_88 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_91 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_94 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
+    *(tint_symbol_3) = float4(float(x_85), float(x_88), float(x_91), float(x_94));
   } else {
     int const x_98 = x_9.x_GLF_uniform_int_values.arr[0].el;
     float const x_99 = float(x_98);
-    *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99);
+    *(tint_symbol_3) = float4(x_99, x_99, x_99, x_99);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl
index 3a0af57..56b40df 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl
index 1f2929c..8dc6a52 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.msl
@@ -38,7 +38,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   uint const x_39 = x_6.x_GLF_uniform_uint_values.arr[0].el;
   uint const x_41 = x_6.x_GLF_uniform_uint_values.arr[0].el;
@@ -55,20 +55,26 @@
     int const x_72 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_78 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
+    *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
   } else {
     int const x_82 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_83 = float(x_82);
-    *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83);
+    *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl
index 3a0af57..56b40df 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.hlsl
@@ -57,9 +57,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl
index 1f2929c..8dc6a52 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.msl
@@ -38,7 +38,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_3) {
   float4 v = 0.0f;
   uint const x_39 = x_6.x_GLF_uniform_uint_values.arr[0].el;
   uint const x_41 = x_6.x_GLF_uniform_uint_values.arr[0].el;
@@ -55,20 +55,26 @@
     int const x_72 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_75 = x_8.x_GLF_uniform_int_values.arr[0].el;
     int const x_78 = x_8.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
+    *(tint_symbol_3) = float4(float(x_69), float(x_72), float(x_75), float(x_78));
   } else {
     int const x_82 = x_8.x_GLF_uniform_int_values.arr[0].el;
     float const x_83 = float(x_82);
-    *(tint_symbol_4) = float4(x_83, x_83, x_83, x_83);
+    *(tint_symbol_3) = float4(x_83, x_83, x_83, x_83);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, constant buf2& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl
index 0aa7f65..340627c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
   float4x3 m43 = float4x3(0.0f);
   tint_array_wrapper sums = {};
   int i = 0;
@@ -44,8 +44,8 @@
   float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_60 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_62 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}};
-  sums = tint_symbol_3;
+  tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}};
+  sums = tint_symbol_2;
   int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el;
   i = x_65;
   x_67_phi = x_65;
@@ -86,20 +86,26 @@
     int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_123 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_126 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_117), float(x_120), float(x_123), float(x_126));
+    *(tint_symbol_4) = float4(float(x_117), float(x_120), float(x_123), float(x_126));
   } else {
     int const x_130 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_131 = float(x_130);
-    *(tint_symbol_5) = float4(x_131, x_131, x_131, x_131);
+    *(tint_symbol_4) = float4(x_131, x_131, x_131, x_131);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl
index 0aa7f65..340627c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
   float4x3 m43 = float4x3(0.0f);
   tint_array_wrapper sums = {};
   int i = 0;
@@ -44,8 +44,8 @@
   float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_60 = x_6.x_GLF_uniform_float_values.arr[0].el;
   float const x_62 = x_6.x_GLF_uniform_float_values.arr[0].el;
-  tint_array_wrapper const tint_symbol_3 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}};
-  sums = tint_symbol_3;
+  tint_array_wrapper const tint_symbol_2 = {.arr={{.el=x_58}, {.el=x_60}, {.el=x_62}}};
+  sums = tint_symbol_2;
   int const x_65 = x_8.x_GLF_uniform_int_values.arr[0].el;
   i = x_65;
   x_67_phi = x_65;
@@ -86,20 +86,26 @@
     int const x_120 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_123 = x_8.x_GLF_uniform_int_values.arr[1].el;
     int const x_126 = x_8.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_5) = float4(float(x_117), float(x_120), float(x_123), float(x_126));
+    *(tint_symbol_4) = float4(float(x_117), float(x_120), float(x_123), float(x_126));
   } else {
     int const x_130 = x_8.x_GLF_uniform_int_values.arr[1].el;
     float const x_131 = float(x_130);
-    *(tint_symbol_5) = float4(x_131, x_131, x_131, x_131);
+    *(tint_symbol_4) = float4(x_131, x_131, x_131, x_131);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
index d35b7e2..c1027b9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float4x4 m0 = float4x4(0.0f);
   int c = 0;
   float4x4 m1 = float4x4(0.0f);
@@ -84,20 +84,26 @@
     int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_165 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_156), float(x_159), float(x_162), float(x_165));
+    *(tint_symbol_3) = float4(float(x_156), float(x_159), float(x_162), float(x_165));
   } else {
     int const x_169 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_170 = float(x_169);
-    *(tint_symbol_4) = float4(x_170, x_170, x_170, x_170);
+    *(tint_symbol_3) = float4(x_170, x_170, x_170, x_170);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl
index 690351b..06467ef 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl
@@ -28,7 +28,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float4x4 m0 = float4x4(0.0f);
   int c = 0;
   float4x4 m1 = float4x4(0.0f);
@@ -84,20 +84,26 @@
     int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_165 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_156), float(x_159), float(x_162), float(x_165));
+    *(tint_symbol_3) = float4(float(x_156), float(x_159), float(x_162), float(x_165));
   } else {
     int const x_169 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_170 = float(x_169);
-    *(tint_symbol_4) = float4(x_170, x_170, x_170, x_170);
+    *(tint_symbol_3) = float4(x_170, x_170, x_170, x_170);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl
index 6b8df2b..f30cc45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl
index 4c04e10..a8af80b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = 0;
   int const x_26 = x_6.one;
@@ -31,18 +31,24 @@
   }
   int const x_31 = a;
   if ((x_31 == 2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl
index 6b8df2b..f30cc45 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl
index 4c04e10..a8af80b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   a = 0;
   int const x_26 = x_6.one;
@@ -31,18 +31,24 @@
   }
   int const x_31 = a;
   if ((x_31 == 2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl
index b0be04f..842d6e7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl
index f471e20..55b611b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl
@@ -26,7 +26,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 A = {};
   int a = 0;
@@ -54,7 +54,7 @@
   a = min(~(x_48), ~(x_53));
   int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_58 = float(x_57);
-  *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+  *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
   int const x_60 = a;
   int const x_62 = x_6.x_GLF_uniform_int_values.arr[0].el;
   if ((x_60 == tint_unary_minus(x_62))) {
@@ -62,16 +62,22 @@
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
+    *(tint_symbol_3) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl
index b0be04f..842d6e7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl
index f471e20..55b611b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl
@@ -26,7 +26,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper_1 A = {};
   int a = 0;
@@ -54,7 +54,7 @@
   a = min(~(x_48), ~(x_53));
   int const x_57 = x_6.x_GLF_uniform_int_values.arr[1].el;
   float const x_58 = float(x_57);
-  *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58);
+  *(tint_symbol_3) = float4(x_58, x_58, x_58, x_58);
   int const x_60 = a;
   int const x_62 = x_6.x_GLF_uniform_int_values.arr[0].el;
   if ((x_60 == tint_unary_minus(x_62))) {
@@ -62,16 +62,22 @@
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_77 = x_6.x_GLF_uniform_int_values.arr[2].el;
-    *(tint_symbol_4) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
+    *(tint_symbol_3) = float4(float(x_68), float(x_71), float(x_74), float(x_77));
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl
index ad949e0..cd254df 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl
index 7d21ec9..8da1242 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -55,20 +55,26 @@
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
+    *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
   } else {
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_72 = float(x_71);
-    *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72);
+    *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl
index ad949e0..cd254df 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.hlsl
@@ -54,9 +54,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl
index 7d21ec9..8da1242 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   int const x_27 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -55,20 +55,26 @@
     int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
     int const x_67 = x_6.x_GLF_uniform_int_values.arr[3].el;
-    *(tint_symbol_4) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
+    *(tint_symbol_3) = float4(float(x_58), float(x_61), float(x_64), float(x_67));
   } else {
     int const x_71 = x_6.x_GLF_uniform_int_values.arr[2].el;
     float const x_72 = float(x_71);
-    *(tint_symbol_4) = float4(x_72, x_72, x_72, x_72);
+    *(tint_symbol_3) = float4(x_72, x_72, x_72, x_72);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl
index cf1aef6..437221f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl
index b6bcce5..5d64f57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -31,18 +31,24 @@
   }
   int const x_38 = a;
   if ((x_38 == -2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl
index cf1aef6..437221f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl
index b6bcce5..5d64f57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int a = 0;
   int i = 0;
   a = 0;
@@ -31,18 +31,24 @@
   }
   int const x_38 = a;
   if ((x_38 == -2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl
index 08b57e0..ae4cdca 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl
index 449f564..70386d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int sum = 0;
   int i = 0;
@@ -54,20 +54,26 @@
     int const x_63 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_66 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_69 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
+    *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
   } else {
     int const x_73 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_74 = float(x_73);
-    *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74);
+    *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl
index 08b57e0..ae4cdca 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.hlsl
@@ -53,9 +53,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl
index 449f564..70386d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl
@@ -18,7 +18,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int a = 0;
   int sum = 0;
   int i = 0;
@@ -54,20 +54,26 @@
     int const x_63 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_66 = x_7.x_GLF_uniform_int_values.arr[0].el;
     int const x_69 = x_7.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
+    *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
   } else {
     int const x_73 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_74 = float(x_73);
-    *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74);
+    *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl
index d3a37e6..b7ce59e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl
index 89ab95d..e498cd3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl
@@ -38,7 +38,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   uint const x_36 = x_6.x_GLF_uniform_uint_values.arr[0].el;
   f = as_type<float>(max(100u, x_36));
@@ -49,20 +49,26 @@
     int const x_50 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_53 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
+    *(tint_symbol_3) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
   } else {
     int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_61 = float(x_60);
-    *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61);
+    *(tint_symbol_3) = float4(x_61, x_61, x_61, x_61);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl
index d3a37e6..b7ce59e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl
index 89ab95d..e498cd3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl
@@ -38,7 +38,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+void main_1(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_3) {
   float f = 0.0f;
   uint const x_36 = x_6.x_GLF_uniform_uint_values.arr[0].el;
   f = as_type<float>(max(100u, x_36));
@@ -49,20 +49,26 @@
     int const x_50 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_53 = x_10.x_GLF_uniform_int_values.arr[1].el;
     int const x_56 = x_10.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
+    *(tint_symbol_3) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
   } else {
     int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
     float const x_61 = float(x_60);
-    *(tint_symbol_4) = float4(x_61, x_61, x_61, x_61);
+    *(tint_symbol_3) = float4(x_61, x_61, x_61, x_61);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf2& x_6, constant buf1& x_8, constant buf0& x_10, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_10, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_10, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl
index 8b5cb07..37bb0b3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.hlsl
@@ -142,9 +142,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl
index 0846e48..0bd5417 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl
@@ -26,7 +26,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   tint_array_wrapper_1 ref = {};
   int i = 0;
   tint_array_wrapper_1 data = {};
@@ -146,7 +146,7 @@
     if ((x_201 != x_204)) {
       int const x_209 = x_6.x_GLF_uniform_int_values.arr[0].el;
       float const x_210 = float(x_209);
-      *(tint_symbol_4) = float4(x_210, x_210, x_210, x_210);
+      *(tint_symbol_3) = float4(x_210, x_210, x_210, x_210);
       return;
     }
     {
@@ -158,15 +158,21 @@
   int const x_218 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_221 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_224 = x_6.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_4) = float4(float(x_215), float(x_218), float(x_221), float(x_224));
+  *(tint_symbol_3) = float4(float(x_215), float(x_218), float(x_221), float(x_224));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl
index 8b5cb07..37bb0b3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.hlsl
@@ -142,9 +142,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl
index 0846e48..0bd5417 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl
@@ -26,7 +26,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   tint_array_wrapper_1 ref = {};
   int i = 0;
   tint_array_wrapper_1 data = {};
@@ -146,7 +146,7 @@
     if ((x_201 != x_204)) {
       int const x_209 = x_6.x_GLF_uniform_int_values.arr[0].el;
       float const x_210 = float(x_209);
-      *(tint_symbol_4) = float4(x_210, x_210, x_210, x_210);
+      *(tint_symbol_3) = float4(x_210, x_210, x_210, x_210);
       return;
     }
     {
@@ -158,15 +158,21 @@
   int const x_218 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_221 = x_6.x_GLF_uniform_int_values.arr[0].el;
   int const x_224 = x_6.x_GLF_uniform_int_values.arr[1].el;
-  *(tint_symbol_4) = float4(float(x_215), float(x_218), float(x_221), float(x_224));
+  *(tint_symbol_3) = float4(float(x_215), float(x_218), float(x_221), float(x_224));
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl
index 11fb504..a7a240a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl
index 0c883ed..189151f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float4 N = 0.0f;
   float4 I = 0.0f;
   float4 Nref = 0.0f;
@@ -26,18 +26,24 @@
   v = faceforward(x_46, x_47, x_48);
   float4 const x_50 = v;
   if (all((x_50 == float4(-1.0f, -2.0f, -3.0f, -4.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl
index 11fb504..a7a240a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.hlsl
@@ -28,9 +28,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl
index 0c883ed..189151f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   float4 N = 0.0f;
   float4 I = 0.0f;
   float4 Nref = 0.0f;
@@ -26,18 +26,24 @@
   v = faceforward(x_46, x_47, x_48);
   float4 const x_50 = v;
   if (all((x_50 == float4(-1.0f, -2.0f, -3.0f, -4.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl
index d6dd5f8..2f6405b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl
index 9bf6ea8..742b628 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 a = 0.0f;
   float2 b = 0.0f;
   a = float2(1.0f, 1.0f);
@@ -24,18 +24,24 @@
   b = (float2(x_47, x_47) + float2(2.0f, 3.0f));
   float2 const x_50 = b;
   if (all((x_50 == float2(3.0f, 4.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl
index d6dd5f8..2f6405b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl
index 9bf6ea8..742b628 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float2 a = 0.0f;
   float2 b = 0.0f;
   a = float2(1.0f, 1.0f);
@@ -24,18 +24,24 @@
   b = (float2(x_47, x_47) + float2(2.0f, 3.0f));
   float2 const x_50 = b;
   if (all((x_50 == float2(3.0f, 4.0f)))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl
index b0f9a87..c06a97e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl
index f64ba57..bb4f4e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 a = 0.0f;
   float2 b = 0.0f;
   a = float2(1.0f, 1.0f);
@@ -18,18 +18,24 @@
   b = fract(x_28);
   float const x_31 = b.x;
   if ((x_31 == 0.5f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl
index b0f9a87..c06a97e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl
index f64ba57..bb4f4e6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 a = 0.0f;
   float2 b = 0.0f;
   a = float2(1.0f, 1.0f);
@@ -18,18 +18,24 @@
   b = fract(x_28);
   float const x_31 = b.x;
   if ((x_31 == 0.5f)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl
index c513660..4edd4ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl
index d1585b5..6eb510b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.spvasm.expected.msl
@@ -8,24 +8,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 v = 0.0f;
   v = log2(cosh(float2(1.0f, 100.0f)));
   float const x_27 = v.x;
   float const x_29 = v.y;
   if ((x_27 < x_29)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl
index c513660..4edd4ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.hlsl
@@ -20,9 +20,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl
index d1585b5..6eb510b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl.expected.msl
@@ -8,24 +8,30 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 v = 0.0f;
   v = log2(cosh(float2(1.0f, 100.0f)));
   float const x_27 = v.x;
   float const x_29 = v.y;
   if ((x_27 < x_29)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl
index e223102..e66c0d6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl
index 6605a4f..b5e6e03 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_4) {
+void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_3) {
   int const x_41 = *(x);
   int const x_43 = x_7.zero;
   if ((x_41 < x_43)) {
@@ -19,18 +19,18 @@
   }
   int const x_47 = *(x);
   if ((x_47 > 8)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
   int i = 0;
   int param = 0;
   int x_31_phi = 0;
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   x_31_phi = 0;
   while (true) {
@@ -42,7 +42,7 @@
     }
     {
       param = x_31;
-      func_i1_(x_7, &(param), tint_symbol_5);
+      func_i1_(x_7, &(param), tint_symbol_4);
       int const x_32 = as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)));
       i = x_32;
       x_31_phi = x_32;
@@ -51,11 +51,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl
index e223102..e66c0d6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl
index 6605a4f..b5e6e03 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_4) {
+void func_i1_(constant buf0& x_7, thread int* const x, thread float4* const tint_symbol_3) {
   int const x_41 = *(x);
   int const x_43 = x_7.zero;
   if ((x_41 < x_43)) {
@@ -19,18 +19,18 @@
   }
   int const x_47 = *(x);
   if ((x_47 > 8)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
   int i = 0;
   int param = 0;
   int x_31_phi = 0;
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   i = 0;
   x_31_phi = 0;
   while (true) {
@@ -42,7 +42,7 @@
     }
     {
       param = x_31;
-      func_i1_(x_7, &(param), tint_symbol_5);
+      func_i1_(x_7, &(param), tint_symbol_4);
       int const x_32 = as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)));
       i = x_32;
       x_31_phi = x_32;
@@ -51,11 +51,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl
index 15e5fa3..fcf1e30 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl
@@ -7,18 +7,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_f1_(thread float* const x, thread float4* const tint_symbol_5) {
+float func_f1_(thread float* const x, thread float4* const tint_symbol_3) {
   float const x_56 = *(x);
   if ((x_56 > 5.0f)) {
-    float const x_61 = (*(tint_symbol_5)).x;
+    float const x_61 = (*(tint_symbol_3)).x;
     if ((x_61 < 0.5f)) {
       discard_fragment();
     } else {
-      float const x_67 = (*(tint_symbol_5)).y;
+      float const x_67 = (*(tint_symbol_3)).y;
       if ((x_67 < 0.5f)) {
         discard_fragment();
       }
@@ -28,7 +28,7 @@
   return (x_71 + 1.0f);
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float f = 0.0f;
   int i = 0;
   float param = 0.0f;
@@ -44,7 +44,7 @@
     {
       int const x_45 = i;
       param = float(x_45);
-      float const x_47 = func_f1_(&(param), tint_symbol_6);
+      float const x_47 = func_f1_(&(param), tint_symbol_4);
       f = x_47;
       int const x_48 = i;
       i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
@@ -52,20 +52,26 @@
   }
   float const x_50 = f;
   if ((x_50 == 5.0f)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl
index 15e5fa3..fcf1e30 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl
@@ -7,18 +7,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_f1_(thread float* const x, thread float4* const tint_symbol_5) {
+float func_f1_(thread float* const x, thread float4* const tint_symbol_3) {
   float const x_56 = *(x);
   if ((x_56 > 5.0f)) {
-    float const x_61 = (*(tint_symbol_5)).x;
+    float const x_61 = (*(tint_symbol_3)).x;
     if ((x_61 < 0.5f)) {
       discard_fragment();
     } else {
-      float const x_67 = (*(tint_symbol_5)).y;
+      float const x_67 = (*(tint_symbol_3)).y;
       if ((x_67 < 0.5f)) {
         discard_fragment();
       }
@@ -28,7 +28,7 @@
   return (x_71 + 1.0f);
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float f = 0.0f;
   int i = 0;
   float param = 0.0f;
@@ -44,7 +44,7 @@
     {
       int const x_45 = i;
       param = float(x_45);
-      float const x_47 = func_f1_(&(param), tint_symbol_6);
+      float const x_47 = func_f1_(&(param), tint_symbol_4);
       f = x_47;
       int const x_48 = i;
       i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
@@ -52,20 +52,26 @@
   }
   float const x_50 = f;
   if ((x_50 == 5.0f)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl
index 844f4c9..ae37da2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
   float3x2 m32 = float3x2(0.0f);
   tint_array_wrapper_2 sums = {};
   int x_52_phi = 0;
@@ -41,8 +41,8 @@
   if ((x_45 == 1)) {
     m32[3][x_45] = x_40;
   }
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_40, x_40}};
-  sums = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_40, x_40}};
+  sums = tint_symbol_2;
   x_52_phi = x_45;
   while (true) {
     int x_53 = 0;
@@ -65,15 +65,21 @@
   float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el;
   int const x_69 = x_8.x_GLF_uniform_int_values.arr[1].el;
   float const x_71 = sums.arr[x_69];
-  *(tint_symbol_5) = float4(x_65, x_67, x_67, x_71);
+  *(tint_symbol_4) = float4(x_65, x_67, x_67, x_71);
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl
index 844f4c9..ae37da2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
   float3x2 m32 = float3x2(0.0f);
   tint_array_wrapper_2 sums = {};
   int x_52_phi = 0;
@@ -41,8 +41,8 @@
   if ((x_45 == 1)) {
     m32[3][x_45] = x_40;
   }
-  tint_array_wrapper_2 const tint_symbol_3 = {.arr={x_40, x_40, x_40}};
-  sums = tint_symbol_3;
+  tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_40, x_40, x_40}};
+  sums = tint_symbol_2;
   x_52_phi = x_45;
   while (true) {
     int x_53 = 0;
@@ -65,15 +65,21 @@
   float const x_67 = x_6.x_GLF_uniform_float_values.arr[1].el;
   int const x_69 = x_8.x_GLF_uniform_int_values.arr[1].el;
   float const x_71 = sums.arr[x_69];
-  *(tint_symbol_5) = float4(x_65, x_67, x_67, x_71);
+  *(tint_symbol_4) = float4(x_65, x_67, x_67, x_71);
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_5) {
+  main_1(x_6, x_8, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl
index b527637..e0d4c6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl
@@ -49,9 +49,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl
index 4ef589f..04da6c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.msl
@@ -28,14 +28,14 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   bool x_54 = false;
   bool x_55_phi = false;
   int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el;
   v1 = cos(cos(as_type<float2>(int2(-1, x_35))));
   float const x_41 = v1.x;
-  *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41);
+  *(tint_symbol_3) = float4(x_41, x_41, x_41, x_41);
   float const x_44 = v1.y;
   float const x_46 = x_8.x_GLF_uniform_float_values.arr[0].el;
   bool const x_47 = (x_44 > x_46);
@@ -52,20 +52,26 @@
     int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
+    *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
   } else {
     int const x_73 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_74 = float(x_73);
-    *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74);
+    *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl
index b527637..e0d4c6b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl
@@ -49,9 +49,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl
index 4ef589f..04da6c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.msl
@@ -28,14 +28,14 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_3) {
   float2 v1 = 0.0f;
   bool x_54 = false;
   bool x_55_phi = false;
   int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el;
   v1 = cos(cos(as_type<float2>(int2(-1, x_35))));
   float const x_41 = v1.x;
-  *(tint_symbol_4) = float4(x_41, x_41, x_41, x_41);
+  *(tint_symbol_3) = float4(x_41, x_41, x_41, x_41);
   float const x_44 = v1.y;
   float const x_46 = x_8.x_GLF_uniform_float_values.arr[0].el;
   bool const x_47 = (x_44 > x_46);
@@ -52,20 +52,26 @@
     int const x_63 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_66 = x_6.x_GLF_uniform_int_values.arr[1].el;
     int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
+    *(tint_symbol_3) = float4(float(x_60), float(x_63), float(x_66), float(x_69));
   } else {
     int const x_73 = x_6.x_GLF_uniform_int_values.arr[1].el;
     float const x_74 = float(x_73);
-    *(tint_symbol_4) = float4(x_74, x_74, x_74, x_74);
+    *(tint_symbol_3) = float4(x_74, x_74, x_74, x_74);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl
index a94b9b7..350b119 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl
index d120e27..85dcc7c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl
@@ -38,7 +38,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float b = 0.0f;
   uint c = 0u;
@@ -56,19 +56,25 @@
     int const x_58 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_12.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     float const x_67 = b;
-    *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_12, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_12, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_12, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl
index a94b9b7..350b119 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl
index d120e27..85dcc7c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl
@@ -38,7 +38,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_3) {
   uint a = 0u;
   float b = 0.0f;
   uint c = 0u;
@@ -56,19 +56,25 @@
     int const x_58 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_61 = x_12.x_GLF_uniform_int_values.arr[1].el;
     int const x_64 = x_12.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_4) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
+    *(tint_symbol_3) = float4(float(x_55), float(x_58), float(x_61), float(x_64));
   } else {
     float const x_67 = b;
-    *(tint_symbol_4) = float4(x_67, x_67, x_67, x_67);
+    *(tint_symbol_3) = float4(x_67, x_67, x_67, x_67);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf2& x_8, constant buf0& x_12, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_8, x_12, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_8, x_12, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_8, x_12, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl
index 70dcbca..18d3471 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 A = {};
   int i = 0;
   int j = 0;
@@ -113,20 +113,26 @@
     int const x_110 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_113 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_116 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_121 = float(x_120);
-    *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121);
+    *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl
index 70dcbca..18d3471 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl
@@ -31,7 +31,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_3) {
   tint_array_wrapper_2 A = {};
   int i = 0;
   int j = 0;
@@ -113,20 +113,26 @@
     int const x_110 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_113 = x_9.x_GLF_uniform_int_values.arr[0].el;
     int const x_116 = x_9.x_GLF_uniform_int_values.arr[1].el;
-    *(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
+    *(tint_symbol_3) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
   } else {
     int const x_120 = x_9.x_GLF_uniform_int_values.arr[1].el;
     float const x_121 = float(x_120);
-    *(tint_symbol_4) = float4(x_121, x_121, x_121, x_121);
+    *(tint_symbol_3) = float4(x_121, x_121, x_121, x_121);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_6, x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl
index 9591e38..7e9bce9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.hlsl
@@ -15,15 +15,15 @@
   const int x_31 = asint(x_7[1].x);
   const int x_33 = asint(x_7[1].x);
   const int x_35 = asint(x_7[1].x);
-  const S tint_symbol_3 = {x_31, x_33, x_35};
-  A[x_29] = tint_symbol_3;
+  const S tint_symbol_2 = {x_31, x_33, x_35};
+  A[x_29] = tint_symbol_2;
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_39 = asint(x_7[scalar_offset / 4][scalar_offset % 4]);
   const int x_41 = asint(x_7[1].x);
   const int x_43 = asint(x_7[1].x);
   const int x_45 = asint(x_7[1].x);
-  const S tint_symbol_4 = {x_41, x_43, x_45};
-  A[x_39] = tint_symbol_4;
+  const S tint_symbol_3 = {x_41, x_43, x_45};
+  A[x_39] = tint_symbol_3;
   const int x_49 = asint(x_7[1].x);
   const int x_51 = A[x_49].b;
   const int x_53 = asint(x_7[1].x);
@@ -62,9 +62,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl
index 69de413..921e868 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.spvasm.expected.msl
@@ -26,20 +26,20 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
   tint_array_wrapper_1 A = {};
   int const x_29 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_31 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_33 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el;
-  S const tint_symbol_3 = {.a=x_31, .b=x_33, .c=x_35};
-  A.arr[x_29] = tint_symbol_3;
+  S const tint_symbol_2 = {.a=x_31, .b=x_33, .c=x_35};
+  A.arr[x_29] = tint_symbol_2;
   int const x_39 = x_7.x_GLF_uniform_int_values.arr[0].el;
   int const x_41 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el;
-  S const tint_symbol_4 = {.a=x_41, .b=x_43, .c=x_45};
-  A.arr[x_39] = tint_symbol_4;
+  S const tint_symbol_3 = {.a=x_41, .b=x_43, .c=x_45};
+  A.arr[x_39] = tint_symbol_3;
   int const x_49 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_51 = A.arr[x_49].b;
   int const x_53 = x_7.x_GLF_uniform_int_values.arr[1].el;
@@ -56,20 +56,26 @@
     int const x_77 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_80 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_83 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_74), float(x_77), float(x_80), float(x_83));
+    *(tint_symbol_5) = float4(float(x_74), float(x_77), float(x_80), float(x_83));
   } else {
     int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_88 = float(x_87);
-    *(tint_symbol_6) = float4(x_88, x_88, x_88, x_88);
+    *(tint_symbol_5) = float4(x_88, x_88, x_88, x_88);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_6) {
+  main_1(x_7, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl
index 9591e38..7e9bce9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.hlsl
@@ -15,15 +15,15 @@
   const int x_31 = asint(x_7[1].x);
   const int x_33 = asint(x_7[1].x);
   const int x_35 = asint(x_7[1].x);
-  const S tint_symbol_3 = {x_31, x_33, x_35};
-  A[x_29] = tint_symbol_3;
+  const S tint_symbol_2 = {x_31, x_33, x_35};
+  A[x_29] = tint_symbol_2;
   const uint scalar_offset = ((16u * uint(0))) / 4;
   const int x_39 = asint(x_7[scalar_offset / 4][scalar_offset % 4]);
   const int x_41 = asint(x_7[1].x);
   const int x_43 = asint(x_7[1].x);
   const int x_45 = asint(x_7[1].x);
-  const S tint_symbol_4 = {x_41, x_43, x_45};
-  A[x_39] = tint_symbol_4;
+  const S tint_symbol_3 = {x_41, x_43, x_45};
+  A[x_39] = tint_symbol_3;
   const int x_49 = asint(x_7[1].x);
   const int x_51 = A[x_49].b;
   const int x_53 = asint(x_7[1].x);
@@ -62,9 +62,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_5 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl
index 69de413..921e868 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl.expected.msl
@@ -26,20 +26,20 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
   tint_array_wrapper_1 A = {};
   int const x_29 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_31 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_33 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_35 = x_7.x_GLF_uniform_int_values.arr[1].el;
-  S const tint_symbol_3 = {.a=x_31, .b=x_33, .c=x_35};
-  A.arr[x_29] = tint_symbol_3;
+  S const tint_symbol_2 = {.a=x_31, .b=x_33, .c=x_35};
+  A.arr[x_29] = tint_symbol_2;
   int const x_39 = x_7.x_GLF_uniform_int_values.arr[0].el;
   int const x_41 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_43 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_45 = x_7.x_GLF_uniform_int_values.arr[1].el;
-  S const tint_symbol_4 = {.a=x_41, .b=x_43, .c=x_45};
-  A.arr[x_39] = tint_symbol_4;
+  S const tint_symbol_3 = {.a=x_41, .b=x_43, .c=x_45};
+  A.arr[x_39] = tint_symbol_3;
   int const x_49 = x_7.x_GLF_uniform_int_values.arr[1].el;
   int const x_51 = A.arr[x_49].b;
   int const x_53 = x_7.x_GLF_uniform_int_values.arr[1].el;
@@ -56,20 +56,26 @@
     int const x_77 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_80 = x_7.x_GLF_uniform_int_values.arr[1].el;
     int const x_83 = x_7.x_GLF_uniform_int_values.arr[0].el;
-    *(tint_symbol_6) = float4(float(x_74), float(x_77), float(x_80), float(x_83));
+    *(tint_symbol_5) = float4(float(x_74), float(x_77), float(x_80), float(x_83));
   } else {
     int const x_87 = x_7.x_GLF_uniform_int_values.arr[0].el;
     float const x_88 = float(x_87);
-    *(tint_symbol_6) = float4(x_88, x_88, x_88, x_88);
+    *(tint_symbol_5) = float4(x_88, x_88, x_88, x_88);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_6) {
+  main_1(x_7, tint_symbol_6);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_7, &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_7));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl
index 6f9a2b7..8c431f0 100644
--- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.hlsl
@@ -79,11 +79,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl
index 348e88d..4e1e472 100644
--- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 v = 0.0f;
   tint_array_wrapper floats = {};
   int one = 0;
@@ -42,7 +42,7 @@
         if (!(x_69)) {
           int const x_73 = one;
           floats.arr[x_73] = 1.0f;
-          *(tint_symbol_5) = float4(1.0f, 1.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(1.0f, 1.0f, 0.0f, 1.0f);
         }
         int const x_75 = one;
         v[x_75] = 1.0f;
@@ -52,7 +52,7 @@
         }
         float const x_81 = x_9.injectionSwitch.y;
         if ((x_81 < 0.0f)) {
-          *(tint_symbol_5) = float4(0.0f, 1.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(0.0f, 1.0f, 0.0f, 1.0f);
         }
       }
       {
@@ -70,7 +70,7 @@
   }
   bool x_102 = false;
   bool x_103_phi = false;
-  float const x_90 = (*(tint_symbol_6)).y;
+  float const x_90 = (*(tint_symbol_4)).y;
   if ((x_90 >= 0.0f)) {
     float const x_96 = v.y;
     bool const x_97 = (x_96 == 1.0f);
@@ -82,21 +82,27 @@
     }
     bool const x_103 = x_103_phi;
     if (x_103) {
-      *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl
index 6f9a2b7..8c431f0 100644
--- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.hlsl
@@ -79,11 +79,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl
index 348e88d..4e1e472 100644
--- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 v = 0.0f;
   tint_array_wrapper floats = {};
   int one = 0;
@@ -42,7 +42,7 @@
         if (!(x_69)) {
           int const x_73 = one;
           floats.arr[x_73] = 1.0f;
-          *(tint_symbol_5) = float4(1.0f, 1.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(1.0f, 1.0f, 0.0f, 1.0f);
         }
         int const x_75 = one;
         v[x_75] = 1.0f;
@@ -52,7 +52,7 @@
         }
         float const x_81 = x_9.injectionSwitch.y;
         if ((x_81 < 0.0f)) {
-          *(tint_symbol_5) = float4(0.0f, 1.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(0.0f, 1.0f, 0.0f, 1.0f);
         }
       }
       {
@@ -70,7 +70,7 @@
   }
   bool x_102 = false;
   bool x_103_phi = false;
-  float const x_90 = (*(tint_symbol_6)).y;
+  float const x_90 = (*(tint_symbol_4)).y;
   if ((x_90 >= 0.0f)) {
     float const x_96 = v.y;
     bool const x_97 = (x_96 == 1.0f);
@@ -82,21 +82,27 @@
     }
     bool const x_103 = x_103_phi;
     if (x_103) {
-      *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
   } else {
-    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl
index 43d7f1d..fad5d97 100644
--- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.hlsl
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl
index 41639eb..3978f97 100644
--- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.spvasm.expected.msl
@@ -15,7 +15,7 @@
   discard_fragment();
 }
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   while (true) {
     bool x_31 = false;
     bool x_30_phi = false;
@@ -46,7 +46,7 @@
           break;
         }
         float4 const x_55 = x_55_phi;
-        *(tint_symbol_4) = x_55;
+        *(tint_symbol_3) = x_55;
         x_31_phi = true;
         break;
       }
@@ -71,11 +71,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl
index 43d7f1d..fad5d97 100644
--- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.hlsl
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl
index 41639eb..3978f97 100644
--- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl.expected.msl
@@ -15,7 +15,7 @@
   discard_fragment();
 }
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   while (true) {
     bool x_31 = false;
     bool x_30_phi = false;
@@ -46,7 +46,7 @@
           break;
         }
         float4 const x_55 = x_55_phi;
-        *(tint_symbol_4) = x_55;
+        *(tint_symbol_3) = x_55;
         x_31_phi = true;
         break;
       }
@@ -71,11 +71,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl
index 4dda860..70e4a5b 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl
index 28d4e20..7196372 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.spvasm.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     bool x_46_phi = false;
     while (true) {
-      float const x_37 = (*(tint_symbol_5)).x;
+      float const x_37 = (*(tint_symbol_3)).x;
       if ((x_37 < 0.0f)) {
         float const x_42 = x_6.injectionSwitch.y;
         if ((1.0f > x_42)) {
@@ -55,17 +55,23 @@
     }
     break;
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl
index 4dda860..70e4a5b 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl
index 28d4e20..7196372 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     bool x_46_phi = false;
     while (true) {
-      float const x_37 = (*(tint_symbol_5)).x;
+      float const x_37 = (*(tint_symbol_3)).x;
       if ((x_37 < 0.0f)) {
         float const x_42 = x_6.injectionSwitch.y;
         if ((1.0f > x_42)) {
@@ -55,17 +55,23 @@
     }
     break;
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl
index 669e1a2..3164b11 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.hlsl
@@ -4,8 +4,8 @@
 void main_1() {
   float data[10] = (float[10])0;
   int i = 0;
-  const float tint_symbol_4[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f};
-  data = tint_symbol_4;
+  const float tint_symbol_3[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f};
+  data = tint_symbol_3;
   i = 0;
   {
     for(; (i < 10); i = (i + 1)) {
@@ -32,11 +32,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl
index 7450656..b4738d2 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper data = {};
   int i = 0;
-  tint_array_wrapper const tint_symbol_4 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}};
-  data = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}};
+  data = tint_symbol_2;
   i = 0;
   while (true) {
     int const x_7 = i;
@@ -23,7 +23,7 @@
     } else {
       break;
     }
-    float const x_50 = (*(tint_symbol_6)).x;
+    float const x_50 = (*(tint_symbol_4)).x;
     if ((x_50 < 0.0f)) {
       discard_fragment();
     }
@@ -36,17 +36,23 @@
     }
   }
   float const x_58 = data.arr[0];
-  *(tint_symbol_7) = float4(x_58, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(x_58, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl
index 669e1a2..3164b11 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.hlsl
@@ -4,8 +4,8 @@
 void main_1() {
   float data[10] = (float[10])0;
   int i = 0;
-  const float tint_symbol_4[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f};
-  data = tint_symbol_4;
+  const float tint_symbol_3[10] = {0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f};
+  data = tint_symbol_3;
   i = 0;
   {
     for(; (i < 10); i = (i + 1)) {
@@ -32,11 +32,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl
index 7450656..b4738d2 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper data = {};
   int i = 0;
-  tint_array_wrapper const tint_symbol_4 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}};
-  data = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={0.100000001f, 0.200000003f, 0.300000012f, 0.400000006f, 0.5f, 0.600000024f, 0.699999988f, 0.800000012f, 0.899999976f, 1.0f}};
+  data = tint_symbol_2;
   i = 0;
   while (true) {
     int const x_7 = i;
@@ -23,7 +23,7 @@
     } else {
       break;
     }
-    float const x_50 = (*(tint_symbol_6)).x;
+    float const x_50 = (*(tint_symbol_4)).x;
     if ((x_50 < 0.0f)) {
       discard_fragment();
     }
@@ -36,17 +36,23 @@
     }
   }
   float const x_58 = data.arr[0];
-  *(tint_symbol_7) = float4(x_58, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(x_58, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl
index bc52353..f2fbcca 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl
index d61e94e..5e753cf 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.spvasm.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void f_(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void f_(constant buf0& x_7, thread float4* const tint_symbol_3) {
   while (true) {
     float const x_35 = x_7.injectionSwitch.y;
     if ((1.0f > x_35)) {
-      float const x_40 = (*(tint_symbol_5)).y;
+      float const x_40 = (*(tint_symbol_3)).y;
       if ((x_40 < 0.0f)) {
         {
           if (false) {
@@ -52,19 +52,25 @@
   return;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  f_(x_7, tint_symbol_6);
-  *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  f_(x_7, tint_symbol_4);
+  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl
index bc52353..f2fbcca 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl
index d61e94e..5e753cf 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl.expected.msl
@@ -7,15 +7,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void f_(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void f_(constant buf0& x_7, thread float4* const tint_symbol_3) {
   while (true) {
     float const x_35 = x_7.injectionSwitch.y;
     if ((1.0f > x_35)) {
-      float const x_40 = (*(tint_symbol_5)).y;
+      float const x_40 = (*(tint_symbol_3)).y;
       if ((x_40 < 0.0f)) {
         {
           if (false) {
@@ -52,19 +52,25 @@
   return;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  f_(x_7, tint_symbol_6);
-  *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
+  f_(x_7, tint_symbol_4);
+  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl
index a01424a..7a092ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.hlsl
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl
index a792451..17aa773 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -12,7 +12,7 @@
   discard_fragment();
 }
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     int x_30_phi = 0;
     bool x_48_phi = false;
@@ -25,9 +25,9 @@
       } else {
         break;
       }
-      float const x_37 = (*(tint_symbol_5)).y;
+      float const x_37 = (*(tint_symbol_3)).y;
       if ((x_37 < 0.0f)) {
-        float const x_42 = (*(tint_symbol_5)).x;
+        float const x_42 = (*(tint_symbol_3)).x;
         if ((x_42 < 0.0f)) {
           x_48_phi = false;
           break;
@@ -56,19 +56,25 @@
     if (x_48) {
       break;
     }
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl
index a01424a..7a092ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.hlsl
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl
index a792451..17aa773 100644
--- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -12,7 +12,7 @@
   discard_fragment();
 }
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     int x_30_phi = 0;
     bool x_48_phi = false;
@@ -25,9 +25,9 @@
       } else {
         break;
       }
-      float const x_37 = (*(tint_symbol_5)).y;
+      float const x_37 = (*(tint_symbol_3)).y;
       if ((x_37 < 0.0f)) {
-        float const x_42 = (*(tint_symbol_5)).x;
+        float const x_42 = (*(tint_symbol_3)).x;
         if ((x_42 < 0.0f)) {
           x_48_phi = false;
           break;
@@ -56,19 +56,25 @@
     if (x_48) {
       break;
     }
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl
index 7a88372..aa9c06c 100644
--- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.hlsl
@@ -38,11 +38,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl
index badaebb..2d28755 100644
--- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl
@@ -4,19 +4,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int ll = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  float const x_30 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  float const x_30 = (*(tint_symbol_4)).x;
   if ((int(x_30) < 2000)) {
   } else {
     ll = 0;
     while (true) {
-      float const x_41 = (*(tint_symbol_6)).x;
+      float const x_41 = (*(tint_symbol_4)).x;
       if ((x_41 < 0.0f)) {
         discard_fragment();
       }
@@ -29,7 +29,7 @@
         ll = as_type<int>((as_type<uint>(x_7) + as_type<uint>(1)));
       }
     }
-    float const x_49 = (*(tint_symbol_6)).x;
+    float const x_49 = (*(tint_symbol_4)).x;
     if ((int(x_49) >= 2000)) {
       discard_fragment();
     }
@@ -37,13 +37,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl
index 7a88372..aa9c06c 100644
--- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.hlsl
@@ -38,11 +38,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl
index badaebb..2d28755 100644
--- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl
@@ -4,19 +4,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int ll = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  float const x_30 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  float const x_30 = (*(tint_symbol_4)).x;
   if ((int(x_30) < 2000)) {
   } else {
     ll = 0;
     while (true) {
-      float const x_41 = (*(tint_symbol_6)).x;
+      float const x_41 = (*(tint_symbol_4)).x;
       if ((x_41 < 0.0f)) {
         discard_fragment();
       }
@@ -29,7 +29,7 @@
         ll = as_type<int>((as_type<uint>(x_7) + as_type<uint>(1)));
       }
     }
-    float const x_49 = (*(tint_symbol_6)).x;
+    float const x_49 = (*(tint_symbol_4)).x;
     if ((int(x_49) >= 2000)) {
       discard_fragment();
     }
@@ -37,13 +37,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl
index f128d4c..47691f0 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.hlsl
@@ -37,9 +37,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl
index a6d951d..b333a22 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl
@@ -43,17 +43,23 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float3 const x_35 = f_();
-  *(tint_symbol_4) = float4(x_35.x, x_35.y, x_35.z, 1.0f);
+  *(tint_symbol_3) = float4(x_35.x, x_35.y, x_35.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl
index f128d4c..47691f0 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.hlsl
@@ -37,9 +37,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl
index a6d951d..b333a22 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl
@@ -43,17 +43,23 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float3 const x_35 = f_();
-  *(tint_symbol_4) = float4(x_35.x, x_35.y, x_35.z, 1.0f);
+  *(tint_symbol_3) = float4(x_35.x, x_35.y, x_35.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl
index db404f6..610bfdc 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.hlsl
@@ -63,9 +63,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl
index f983be3..85e982d 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl
@@ -56,21 +56,27 @@
   return 0;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int const x_31 = func_(x_7);
   if ((x_31 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl
index db404f6..610bfdc 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.hlsl
@@ -63,9 +63,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl
index f983be3..85e982d 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl
@@ -56,21 +56,27 @@
   return 0;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int const x_31 = func_(x_7);
   if ((x_31 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl
index d23c22a..75839bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.hlsl
@@ -31,11 +31,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl
index 84c6e5e..3c12e00 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.spvasm.expected.msl
@@ -4,19 +4,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   if (true) {
-    float const x_23 = (*(tint_symbol_6)).x;
+    float const x_23 = (*(tint_symbol_4)).x;
     if ((x_23 < 0.0f)) {
       while (true) {
-        *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
         {
-          float const x_32 = (*(tint_symbol_6)).x;
+          float const x_32 = (*(tint_symbol_4)).x;
           if ((x_32 < 0.0f)) {
           } else {
             break;
@@ -28,13 +28,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl
index d23c22a..75839bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.hlsl
@@ -31,11 +31,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl
index 84c6e5e..3c12e00 100644
--- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl.expected.msl
@@ -4,19 +4,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   if (true) {
-    float const x_23 = (*(tint_symbol_6)).x;
+    float const x_23 = (*(tint_symbol_4)).x;
     if ((x_23 < 0.0f)) {
       while (true) {
-        *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
         {
-          float const x_32 = (*(tint_symbol_6)).x;
+          float const x_32 = (*(tint_symbol_4)).x;
           if ((x_32 < 0.0f)) {
           } else {
             break;
@@ -28,13 +28,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl
index 6da0503..a0fb19d 100644
--- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl
index ce03716..49c3e8c 100644
--- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int loop_count = 0;
   loop_count = 0;
   float const x_33 = x_7.injectionSwitch.x;
@@ -20,7 +20,7 @@
   if (x_36) {
     return;
   }
-  float const x_40 = (*(tint_symbol_5)).x;
+  float const x_40 = (*(tint_symbol_3)).x;
   bool const x_41 = (x_40 < 0.0f);
   while (true) {
     int const x_43 = loop_count;
@@ -32,16 +32,16 @@
       break;
     }
     if (x_36) {
-      *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     } else {
       if (x_41) {
         return;
       }
     }
     if (x_36) {
-      *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     } else {
-      *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
     if (x_36) {
       return;
@@ -66,20 +66,26 @@
   }
   int const x_71 = loop_count;
   if ((x_71 >= 100)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl
index 6da0503..a0fb19d 100644
--- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl
index ce03716..49c3e8c 100644
--- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int loop_count = 0;
   loop_count = 0;
   float const x_33 = x_7.injectionSwitch.x;
@@ -20,7 +20,7 @@
   if (x_36) {
     return;
   }
-  float const x_40 = (*(tint_symbol_5)).x;
+  float const x_40 = (*(tint_symbol_3)).x;
   bool const x_41 = (x_40 < 0.0f);
   while (true) {
     int const x_43 = loop_count;
@@ -32,16 +32,16 @@
       break;
     }
     if (x_36) {
-      *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     } else {
       if (x_41) {
         return;
       }
     }
     if (x_36) {
-      *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     } else {
-      *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
     if (x_36) {
       return;
@@ -66,20 +66,26 @@
   }
   int const x_71 = loop_count;
   if ((x_71 >= 100)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl
index f3f9061..2fa2417 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.hlsl
@@ -30,9 +30,15 @@
   float4 color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl
index 876f990..dbe923b 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.spvasm.expected.msl
@@ -29,19 +29,25 @@
   return float3(1.0f, 1.0f, 1.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 param = 0.0f;
   param = float2(1.0f, 1.0f);
   float3 const x_29 = drawShape_vf2_(&(param));
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl
index f3f9061..2fa2417 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.hlsl
@@ -30,9 +30,15 @@
   float4 color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl
index 876f990..dbe923b 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl.expected.msl
@@ -29,19 +29,25 @@
   return float3(1.0f, 1.0f, 1.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float2 param = 0.0f;
   param = float2(1.0f, 1.0f);
   float3 const x_29 = drawShape_vf2_(&(param));
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl
index 71965c1..ce7a543 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl
index 5b8b718..ff30036 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.spvasm.expected.msl
@@ -15,20 +15,26 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float3 const x_17 = mand_();
   while (true) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     return;
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl
index 71965c1..ce7a543 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.hlsl
@@ -23,9 +23,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl
index 5b8b718..ff30036 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl.expected.msl
@@ -15,20 +15,26 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float3 const x_17 = mand_();
   while (true) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     return;
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl
index 2d3183d..b4a4b07 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.hlsl
@@ -31,11 +31,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl
index 7ba8d10..47c8827 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl
@@ -4,13 +4,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 1;
   while (true) {
     int const x_6 = i;
@@ -18,11 +18,11 @@
     } else {
       break;
     }
-    float const x_37 = (*(tint_symbol_6)).y;
+    float const x_37 = (*(tint_symbol_4)).y;
     if ((x_37 < 0.0f)) {
-      float const x_42 = (*(tint_symbol_6)).x;
+      float const x_42 = (*(tint_symbol_4)).x;
       if ((x_42 < 0.0f)) {
-        *(tint_symbol_5) = float4(226.695999146f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_3) = float4(226.695999146f, 1.0f, 1.0f, 1.0f);
       }
       {
         int const x_7 = i;
@@ -39,13 +39,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl
index 2d3183d..b4a4b07 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.hlsl
@@ -31,11 +31,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl
index 7ba8d10..47c8827 100644
--- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl
@@ -4,13 +4,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 1;
   while (true) {
     int const x_6 = i;
@@ -18,11 +18,11 @@
     } else {
       break;
     }
-    float const x_37 = (*(tint_symbol_6)).y;
+    float const x_37 = (*(tint_symbol_4)).y;
     if ((x_37 < 0.0f)) {
-      float const x_42 = (*(tint_symbol_6)).x;
+      float const x_42 = (*(tint_symbol_4)).x;
       if ((x_42 < 0.0f)) {
-        *(tint_symbol_5) = float4(226.695999146f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_3) = float4(226.695999146f, 1.0f, 1.0f, 1.0f);
       }
       {
         int const x_7 = i;
@@ -39,13 +39,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl
index 3bb430f..c89a64b 100644
--- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.hlsl
@@ -81,13 +81,18 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int alwaysZero_vf2_(inout float2 coord) {
diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl
index 01561c4..e370e6e 100644
--- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float x_43 = 0.0f;
   float x_44 = 0.0f;
   float x_45 = 0.0f;
@@ -19,7 +19,7 @@
   int zero = 0;
   float2 param = 0.0f;
   float2 temp = 0.0f;
-  float4 const x_47 = *(tint_symbol_5);
+  float4 const x_47 = *(tint_symbol_3);
   param = float2(x_47.x, x_47.y);
   while (true) {
     float const x_54 = param.y;
@@ -31,7 +31,7 @@
     }
     float const x_61 = x_44;
     x_43 = x_61;
-    float const x_63 = (*(tint_symbol_5)).y;
+    float const x_63 = (*(tint_symbol_3)).y;
     float const x_65 = select(0.0f, 1.0f, (x_63 < 50.0f));
     x_45 = x_65;
     if (((x_61 - x_65) < 1.0f)) {
@@ -52,40 +52,46 @@
   if ((x_70 == 1)) {
     return;
   }
-  *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f);
-  float const x_75 = (*(tint_symbol_5)).x;
+  *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 1.0f);
+  float const x_75 = (*(tint_symbol_3)).x;
   float const x_77 = x_9.injectionSwitch.x;
   if ((x_75 >= x_77)) {
-    float const x_82 = (*(tint_symbol_5)).y;
+    float const x_82 = (*(tint_symbol_3)).y;
     if ((x_82 >= 0.0f)) {
       float const x_87 = x_9.injectionSwitch.y;
-      (*(tint_symbol_6)).x = x_87;
+      (*(tint_symbol_4)).x = x_87;
     }
   }
-  float const x_90 = (*(tint_symbol_5)).y;
+  float const x_90 = (*(tint_symbol_3)).y;
   if ((x_90 >= 0.0f)) {
     float const x_95 = x_9.injectionSwitch.x;
-    (*(tint_symbol_6)).y = x_95;
+    (*(tint_symbol_4)).y = x_95;
   }
-  float4 const x_97 = *(tint_symbol_5);
+  float4 const x_97 = *(tint_symbol_3);
   float2 const x_98 = float2(x_97.x, x_97.y);
   float2 const x_101 = float2(x_98.x, x_98.y);
   temp = x_101;
   if ((x_101.y >= 0.0f)) {
     float const x_107 = x_9.injectionSwitch.x;
-    (*(tint_symbol_6)).z = x_107;
+    (*(tint_symbol_4)).z = x_107;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int alwaysZero_vf2_(constant buf0& x_9, thread float2* const coord, thread float4* const tint_symbol_9) {
diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl
index 3bb430f..c89a64b 100644
--- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.hlsl
@@ -81,13 +81,18 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int alwaysZero_vf2_(inout float2 coord) {
diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl
index 01561c4..e370e6e 100644
--- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float x_43 = 0.0f;
   float x_44 = 0.0f;
   float x_45 = 0.0f;
@@ -19,7 +19,7 @@
   int zero = 0;
   float2 param = 0.0f;
   float2 temp = 0.0f;
-  float4 const x_47 = *(tint_symbol_5);
+  float4 const x_47 = *(tint_symbol_3);
   param = float2(x_47.x, x_47.y);
   while (true) {
     float const x_54 = param.y;
@@ -31,7 +31,7 @@
     }
     float const x_61 = x_44;
     x_43 = x_61;
-    float const x_63 = (*(tint_symbol_5)).y;
+    float const x_63 = (*(tint_symbol_3)).y;
     float const x_65 = select(0.0f, 1.0f, (x_63 < 50.0f));
     x_45 = x_65;
     if (((x_61 - x_65) < 1.0f)) {
@@ -52,40 +52,46 @@
   if ((x_70 == 1)) {
     return;
   }
-  *(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f);
-  float const x_75 = (*(tint_symbol_5)).x;
+  *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 1.0f);
+  float const x_75 = (*(tint_symbol_3)).x;
   float const x_77 = x_9.injectionSwitch.x;
   if ((x_75 >= x_77)) {
-    float const x_82 = (*(tint_symbol_5)).y;
+    float const x_82 = (*(tint_symbol_3)).y;
     if ((x_82 >= 0.0f)) {
       float const x_87 = x_9.injectionSwitch.y;
-      (*(tint_symbol_6)).x = x_87;
+      (*(tint_symbol_4)).x = x_87;
     }
   }
-  float const x_90 = (*(tint_symbol_5)).y;
+  float const x_90 = (*(tint_symbol_3)).y;
   if ((x_90 >= 0.0f)) {
     float const x_95 = x_9.injectionSwitch.x;
-    (*(tint_symbol_6)).y = x_95;
+    (*(tint_symbol_4)).y = x_95;
   }
-  float4 const x_97 = *(tint_symbol_5);
+  float4 const x_97 = *(tint_symbol_3);
   float2 const x_98 = float2(x_97.x, x_97.y);
   float2 const x_101 = float2(x_98.x, x_98.y);
   temp = x_101;
   if ((x_101.y >= 0.0f)) {
     float const x_107 = x_9.injectionSwitch.x;
-    (*(tint_symbol_6)).z = x_107;
+    (*(tint_symbol_4)).z = x_107;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int alwaysZero_vf2_(constant buf0& x_9, thread float2* const coord, thread float4* const tint_symbol_9) {
diff --git a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl
index 53d236b..5fc5f85 100644
--- a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.spvasm.expected.msl
@@ -7,12 +7,12 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float fx_(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_50 = (*(tint_symbol_5)).y;
+float fx_(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_50 = (*(tint_symbol_3)).y;
   if ((x_50 >= 0.0f)) {
     float const x_55 = x_7.injectionSwitch.y;
     return x_55;
@@ -22,27 +22,27 @@
     } else {
       break;
     }
-    *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return 0.0f;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   float x2 = 0.0f;
   float B = 0.0f;
   float k0 = 0.0f;
   x2 = 1.0f;
   B = 1.0f;
-  float const x_34 = fx_(x_7, tint_symbol_7, tint_symbol_8);
-  *(tint_symbol_8) = float4(x_34, 0.0f, 0.0f, 1.0f);
+  float const x_34 = fx_(x_7, tint_symbol_5, tint_symbol_6);
+  *(tint_symbol_6) = float4(x_34, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_40 = x2;
     if ((x_40 > 2.0f)) {
     } else {
       break;
     }
-    float const x_43 = fx_(x_7, tint_symbol_7, tint_symbol_8);
-    float const x_44 = fx_(x_7, tint_symbol_7, tint_symbol_8);
+    float const x_43 = fx_(x_7, tint_symbol_5, tint_symbol_6);
+    float const x_44 = fx_(x_7, tint_symbol_5, tint_symbol_6);
     k0 = (x_43 - x_44);
     float const x_46 = k0;
     B = x_46;
@@ -52,13 +52,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl
index 53d236b..5fc5f85 100644
--- a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl.expected.msl
@@ -7,12 +7,12 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float fx_(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_50 = (*(tint_symbol_5)).y;
+float fx_(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_50 = (*(tint_symbol_3)).y;
   if ((x_50 >= 0.0f)) {
     float const x_55 = x_7.injectionSwitch.y;
     return x_55;
@@ -22,27 +22,27 @@
     } else {
       break;
     }
-    *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return 0.0f;
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   float x2 = 0.0f;
   float B = 0.0f;
   float k0 = 0.0f;
   x2 = 1.0f;
   B = 1.0f;
-  float const x_34 = fx_(x_7, tint_symbol_7, tint_symbol_8);
-  *(tint_symbol_8) = float4(x_34, 0.0f, 0.0f, 1.0f);
+  float const x_34 = fx_(x_7, tint_symbol_5, tint_symbol_6);
+  *(tint_symbol_6) = float4(x_34, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_40 = x2;
     if ((x_40 > 2.0f)) {
     } else {
       break;
     }
-    float const x_43 = fx_(x_7, tint_symbol_7, tint_symbol_8);
-    float const x_44 = fx_(x_7, tint_symbol_7, tint_symbol_8);
+    float const x_43 = fx_(x_7, tint_symbol_5, tint_symbol_6);
+    float const x_44 = fx_(x_7, tint_symbol_5, tint_symbol_6);
     k0 = (x_43 - x_44);
     float const x_46 = k0;
     B = x_46;
@@ -52,13 +52,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl
index adb4b13..34cea08 100644
--- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.hlsl
@@ -135,11 +135,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int yieldsZero_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl
index 87ba14b..c30e197 100644
--- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   bool x_68 = false;
   int x_29 = 0;
   int x_30 = 0;
@@ -137,19 +137,25 @@
     }
   }
   if ((x_24 == as_type<int>(4))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int yieldsZero_(constant buf0& x_8) {
diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl
index adb4b13..34cea08 100644
--- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.hlsl
@@ -135,11 +135,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int yieldsZero_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl
index 87ba14b..c30e197 100644
--- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl
@@ -17,7 +17,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   bool x_68 = false;
   int x_29 = 0;
   int x_30 = 0;
@@ -137,19 +137,25 @@
     }
   }
   if ((x_24 == as_type<int>(4))) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 int yieldsZero_(constant buf0& x_8) {
diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl
index 9cdb063..9f2aaaa 100644
--- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl
index b4c618f..b11e929 100644
--- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.spvasm.expected.msl
@@ -14,13 +14,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   tint_array_wrapper data = {};
   float x_32 = 0.0f;
   x_32 = x_6.injectionSwitch.x;
   data.arr[0] = x_32;
   data.arr[1] = x_32;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   float const x_35 = data.arr[1];
   if ((x_35 > 1.0f)) {
     float x_43_phi = 0.0f;
@@ -34,7 +34,7 @@
       case 1: {
         float const x_43 = x_43_phi;
         data.arr[x_39] = x_43;
-        *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+        *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
         break;
       }
       default: {
@@ -45,11 +45,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl
index 9cdb063..9f2aaaa 100644
--- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.hlsl
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl
index b4c618f..b11e929 100644
--- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl.expected.msl
@@ -14,13 +14,13 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   tint_array_wrapper data = {};
   float x_32 = 0.0f;
   x_32 = x_6.injectionSwitch.x;
   data.arr[0] = x_32;
   data.arr[1] = x_32;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   float const x_35 = data.arr[1];
   if ((x_35 > 1.0f)) {
     float x_43_phi = 0.0f;
@@ -34,7 +34,7 @@
       case 1: {
         float const x_43 = x_43_phi;
         data.arr[x_39] = x_43;
-        *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+        *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
         break;
       }
       default: {
@@ -45,11 +45,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl
index 0ab13c5..6e8c035 100644
--- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     bool x_45 = false;
     int x_48 = 0;
@@ -51,7 +51,7 @@
       x_48 = x_48_phi;
       int const x_50 = x_50_phi;
       int const x_52 = x_52_phi;
-      float const x_55 = (*(tint_symbol_5)).y;
+      float const x_55 = (*(tint_symbol_3)).y;
       x_111_phi = x_48;
       x_112_phi = x_45;
       if ((x_52 < select(100, 10, (x_55 > -1.0f)))) {
@@ -80,7 +80,7 @@
           int x_86_phi = 0;
           int x_97_phi = 0;
           bool x_98_phi = false;
-          float const x_77 = (*(tint_symbol_5)).x;
+          float const x_77 = (*(tint_symbol_3)).x;
           x_78 = (x_77 < -1.0f);
           if (!((x_40 < 0.0f))) {
             if (x_78) {
@@ -134,7 +134,7 @@
             }
             {
               float const x_105 = float(x_52);
-              *(tint_symbol_6) = float4(x_105, x_105, x_105, x_105);
+              *(tint_symbol_4) = float4(x_105, x_105, x_105, x_105);
             }
           }
           x_51_phi = x_66;
@@ -196,7 +196,7 @@
         int x_143_phi = 0;
         int x_154_phi = 0;
         bool x_155_phi = false;
-        float const x_134 = (*(tint_symbol_5)).x;
+        float const x_134 = (*(tint_symbol_3)).x;
         x_135 = (x_134 < -1.0f);
         if (!((x_40 < 0.0f))) {
           if (x_135) {
@@ -256,22 +256,28 @@
     }
     int const x_161 = x_161_phi;
     if ((x_161 == 4)) {
-      *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     } else {
-      *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     }
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl
index 0ab13c5..6e8c035 100644
--- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     bool x_45 = false;
     int x_48 = 0;
@@ -51,7 +51,7 @@
       x_48 = x_48_phi;
       int const x_50 = x_50_phi;
       int const x_52 = x_52_phi;
-      float const x_55 = (*(tint_symbol_5)).y;
+      float const x_55 = (*(tint_symbol_3)).y;
       x_111_phi = x_48;
       x_112_phi = x_45;
       if ((x_52 < select(100, 10, (x_55 > -1.0f)))) {
@@ -80,7 +80,7 @@
           int x_86_phi = 0;
           int x_97_phi = 0;
           bool x_98_phi = false;
-          float const x_77 = (*(tint_symbol_5)).x;
+          float const x_77 = (*(tint_symbol_3)).x;
           x_78 = (x_77 < -1.0f);
           if (!((x_40 < 0.0f))) {
             if (x_78) {
@@ -134,7 +134,7 @@
             }
             {
               float const x_105 = float(x_52);
-              *(tint_symbol_6) = float4(x_105, x_105, x_105, x_105);
+              *(tint_symbol_4) = float4(x_105, x_105, x_105, x_105);
             }
           }
           x_51_phi = x_66;
@@ -196,7 +196,7 @@
         int x_143_phi = 0;
         int x_154_phi = 0;
         bool x_155_phi = false;
-        float const x_134 = (*(tint_symbol_5)).x;
+        float const x_134 = (*(tint_symbol_3)).x;
         x_135 = (x_134 < -1.0f);
         if (!((x_40 < 0.0f))) {
           if (x_135) {
@@ -256,22 +256,28 @@
     }
     int const x_161 = x_161_phi;
     if ((x_161 == 4)) {
-      *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     } else {
-      *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     }
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl
index 569cc6a..f1f1972 100644
--- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.hlsl
@@ -100,9 +100,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl
index af005b6..13701d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl
@@ -96,17 +96,23 @@
   return x_63;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float const x_34 = makeFrame_(x_6);
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl
index 569cc6a..f1f1972 100644
--- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.hlsl
@@ -100,9 +100,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl
index af005b6..13701d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl
@@ -96,17 +96,23 @@
   return x_63;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float const x_34 = makeFrame_(x_6);
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl
index c0d5468..10694ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.hlsl
@@ -40,11 +40,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl
index 256e64b..4e836be 100644
--- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.spvasm.expected.msl
@@ -8,16 +8,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x2 x_41 = float2x2(0.0f);
   int x_6 = 0;
   float2x2 x_42 = float2x2(0.0f);
   float2x2 x_49_phi = float2x2(0.0f);
-  float const x_44 = (*(tint_symbol_5)).x;
+  float const x_44 = (*(tint_symbol_3)).x;
   if ((x_44 < 0.0f)) {
     x_42 = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
     x_49_phi = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
@@ -34,17 +34,23 @@
   float2x2 const x_59 = x_41;
   float2x2 const x_63 = x_41;
   float2x2 const x_66 = x_41;
-  *(tint_symbol_6) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52));
+  *(tint_symbol_4) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl
index c0d5468..10694ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.hlsl
@@ -40,11 +40,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl
index 256e64b..4e836be 100644
--- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl.expected.msl
@@ -8,16 +8,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x2 x_41 = float2x2(0.0f);
   int x_6 = 0;
   float2x2 x_42 = float2x2(0.0f);
   float2x2 x_49_phi = float2x2(0.0f);
-  float const x_44 = (*(tint_symbol_5)).x;
+  float const x_44 = (*(tint_symbol_3)).x;
   if ((x_44 < 0.0f)) {
     x_42 = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
     x_49_phi = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
@@ -34,17 +34,23 @@
   float2x2 const x_59 = x_41;
   float2x2 const x_63 = x_41;
   float2x2 const x_66 = x_41;
-  *(tint_symbol_6) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52));
+  *(tint_symbol_4) = float4(float(x_52), (x_56[0u].x + x_59[1u].x), (x_63[0u].y + x_66[1u].y), float(x_52));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl
index 6c3f3f4..7106574 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl
@@ -59,9 +59,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl
index 8aad500..03ffdab 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int k = 0;
   int GLF_dead0j = 0;
   tint_array_wrapper donor_replacementGLF_dead0stack = {};
@@ -74,15 +74,21 @@
       k = as_type<int>((as_type<uint>(x_24) + as_type<uint>(1)));
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl
index f1268b0..2783b46 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.hlsl
@@ -63,9 +63,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl
index a41081a..34b68d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int k = 0;
   int GLF_dead0j = 0;
   tint_array_wrapper donor_replacementGLF_dead0stack = {};
@@ -74,15 +74,21 @@
       k = as_type<int>((as_type<uint>(x_24) + as_type<uint>(1)));
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl
index 9862ea7..edb5018 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl
index b378883..b956542 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int j = 0;
   float a = 0.0f;
   j = 0;
@@ -20,7 +20,7 @@
     }
     int const x_7 = j;
     if ((x_7 < 1)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
     int const x_8 = j;
     if ((x_8 != 3)) {
@@ -28,10 +28,10 @@
       if ((x_9 != 4)) {
         int const x_10 = j;
         if ((x_10 == 5)) {
-          (*(tint_symbol_4)).x = ldexp(1.0f, 2);
+          (*(tint_symbol_3)).x = ldexp(1.0f, 2);
         } else {
           a = ldexp(1.0f, 2);
-          *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
         }
       }
     }
@@ -43,11 +43,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl
index 9862ea7..edb5018 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.hlsl
@@ -31,9 +31,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl
index b378883..b956542 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int j = 0;
   float a = 0.0f;
   j = 0;
@@ -20,7 +20,7 @@
     }
     int const x_7 = j;
     if ((x_7 < 1)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
     int const x_8 = j;
     if ((x_8 != 3)) {
@@ -28,10 +28,10 @@
       if ((x_9 != 4)) {
         int const x_10 = j;
         if ((x_10 == 5)) {
-          (*(tint_symbol_4)).x = ldexp(1.0f, 2);
+          (*(tint_symbol_3)).x = ldexp(1.0f, 2);
         } else {
           a = ldexp(1.0f, 2);
-          *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
         }
       }
     }
@@ -43,11 +43,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl
index 4ca646f..52bc359 100644
--- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl
index 86dc885..76d1e33 100644
--- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl
@@ -36,7 +36,7 @@
   return 1;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   BinarySearchObject obj_1 = {};
   BinarySearchObject param = {};
@@ -84,15 +84,21 @@
   BinarySearchObject const x_84 = obj_1;
   param = x_84;
   int const x_26 = binarySearch_struct_BinarySearchObject_i1_10_1_(x_8, &(param));
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl
index 4ca646f..52bc359 100644
--- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.hlsl
@@ -68,9 +68,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl
index 86dc885..76d1e33 100644
--- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl
@@ -36,7 +36,7 @@
   return 1;
 }
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int i = 0;
   BinarySearchObject obj_1 = {};
   BinarySearchObject param = {};
@@ -84,15 +84,21 @@
   BinarySearchObject const x_84 = obj_1;
   param = x_84;
   int const x_26 = binarySearch_struct_BinarySearchObject_i1_10_1_(x_8, &(param));
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl
index 91e6f7c..1620108 100644
--- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl
index 6ff0d16..4b851a4 100644
--- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.spvasm.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -15,10 +15,10 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x2 param = float2x2(0.0f);
   float2x2 x_38_phi = float2x2(0.0f);
-  float const x_34 = (*(tint_symbol_5)).x;
+  float const x_34 = (*(tint_symbol_3)).x;
   x_38_phi = float2x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f));
   if ((x_34 >= 0.0f)) {
     x_38_phi = float2x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f));
@@ -26,17 +26,23 @@
   float2x2 const x_38 = x_38_phi;
   param = (x_38 * x_38);
   float3 const x_40 = f_mf22_(&(param));
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl
index 91e6f7c..1620108 100644
--- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.hlsl
@@ -33,11 +33,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl
index 6ff0d16..4b851a4 100644
--- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -15,10 +15,10 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2x2 param = float2x2(0.0f);
   float2x2 x_38_phi = float2x2(0.0f);
-  float const x_34 = (*(tint_symbol_5)).x;
+  float const x_34 = (*(tint_symbol_3)).x;
   x_38_phi = float2x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f));
   if ((x_34 >= 0.0f)) {
     x_38_phi = float2x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f));
@@ -26,17 +26,23 @@
   float2x2 const x_38 = x_38_phi;
   param = (x_38 * x_38);
   float3 const x_40 = f_mf22_(&(param));
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl
index 0628a80..b2ec293 100644
--- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl
index 388fcc6..7edfb52 100644
--- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.spvasm.expected.msl
@@ -11,11 +11,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int temp = 0;
   float const x_39 = x_5.injectionSwitch.x;
   if ((x_39 > 2.0f)) {
-    float4 const x_8 = *(tint_symbol_4);
+    float4 const x_8 = *(tint_symbol_3);
     temp = int(fmax(mix(float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), x_8), float4(8.600000381f, 8.600000381f, 8.600000381f, 8.600000381f)).y);
     int const x_44 = temp;
     if ((x_44 < 150)) {
@@ -26,16 +26,22 @@
       discard_fragment();
     }
   }
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_5, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
-  thread float4 tint_symbol_6 = 0.0f;
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_5, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl
index 0628a80..b2ec293 100644
--- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.hlsl
@@ -27,9 +27,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl
index 388fcc6..7edfb52 100644
--- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl.expected.msl
@@ -11,11 +11,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int temp = 0;
   float const x_39 = x_5.injectionSwitch.x;
   if ((x_39 > 2.0f)) {
-    float4 const x_8 = *(tint_symbol_4);
+    float4 const x_8 = *(tint_symbol_3);
     temp = int(fmax(mix(float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), x_8), float4(8.600000381f, 8.600000381f, 8.600000381f, 8.600000381f)).y);
     int const x_44 = temp;
     if ((x_44 < 150)) {
@@ -26,16 +26,22 @@
       discard_fragment();
     }
   }
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  main_1(x_5, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
-  thread float4 tint_symbol_6 = 0.0f;
   thread float4 tint_symbol_7 = 0.0f;
-  main_1(x_5, &(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl
index 54b15eb..1924e2c 100644
--- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl
@@ -17,9 +17,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl
index 46dbf20..2417abe 100644
--- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.msl
@@ -12,17 +12,23 @@
   return mix(as_type<float3>(uint3(38730u, 63193u, 63173u)), float3(463.0f, 4.0f, 0.0f), float3(2.0f, 2.0f, 2.0f));
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float3 const x_27 = GLF_live6mand_();
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl
index 54b15eb..1924e2c 100644
--- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl
@@ -17,9 +17,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl
index 46dbf20..2417abe 100644
--- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.msl
@@ -12,17 +12,23 @@
   return mix(as_type<float3>(uint3(38730u, 63193u, 63173u)), float3(463.0f, 4.0f, 0.0f), float3(2.0f, 2.0f, 2.0f));
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float3 const x_27 = GLF_live6mand_();
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl
index 394db17..63be284 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4x4 m44 = float4x4(0.0f);
   int x_10_phi = 0;
   m44 = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
@@ -24,7 +24,7 @@
     } else {
       break;
     }
-    float const x_63 = (*(tint_symbol_5)).y;
+    float const x_63 = (*(tint_symbol_3)).y;
     if ((x_63 < 0.0f)) {
       break;
     }
@@ -59,17 +59,23 @@
   float4 x_83_1 = x_79;
   x_83_1.w = (x_81 - 11.0f);
   float4 const x_83 = x_83_1;
-  *(tint_symbol_6) = x_83;
+  *(tint_symbol_4) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl
index 394db17..63be284 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4x4 m44 = float4x4(0.0f);
   int x_10_phi = 0;
   m44 = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
@@ -24,7 +24,7 @@
     } else {
       break;
     }
-    float const x_63 = (*(tint_symbol_5)).y;
+    float const x_63 = (*(tint_symbol_3)).y;
     if ((x_63 < 0.0f)) {
       break;
     }
@@ -59,17 +59,23 @@
   float4 x_83_1 = x_79;
   x_83_1.w = (x_81 - 11.0f);
   float4 const x_83 = x_83_1;
-  *(tint_symbol_6) = x_83;
+  *(tint_symbol_4) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl
index 861538a..77e3171 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.hlsl
@@ -39,11 +39,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl
index 2455128..c2c4c60 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.spvasm.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -27,22 +27,28 @@
   return 0.0f;
 }
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float param = 0.0f;
-  float const x_34 = (*(tint_symbol_5)).x;
+  float const x_34 = (*(tint_symbol_3)).x;
   param = x_34;
   float const x_35 = nb_mod_f1_(&(param));
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl
index 861538a..77e3171 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.hlsl
@@ -39,11 +39,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl
index 2455128..c2c4c60 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl.expected.msl
@@ -4,7 +4,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -27,22 +27,28 @@
   return 0.0f;
 }
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float param = 0.0f;
-  float const x_34 = (*(tint_symbol_5)).x;
+  float const x_34 = (*(tint_symbol_3)).x;
   param = x_34;
   float const x_35 = nb_mod_f1_(&(param));
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl
index d41e23b..3fc97c4 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl
index 68b02b1..8a6f6de 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   while (true) {
     int const x_7 = i;
@@ -21,10 +21,10 @@
     } else {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     float const x_39 = x_6.injectionSwitch.y;
     if ((1.0f > x_39)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       if (true) {
         return;
       }
@@ -37,11 +37,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl
index d41e23b..3fc97c4 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl
index 68b02b1..8a6f6de 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   while (true) {
     int const x_7 = i;
@@ -21,10 +21,10 @@
     } else {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     float const x_39 = x_6.injectionSwitch.y;
     if ((1.0f > x_39)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       if (true) {
         return;
       }
@@ -37,11 +37,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl
index f41b00d..b6078ce 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl
@@ -73,9 +73,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl
index c22cdd3..3b5c821 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   int GLF_dead5cols = 0;
   int GLF_dead5rows = 0;
@@ -110,15 +110,21 @@
       }
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl
index 938e563..bf551d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.hlsl
@@ -77,9 +77,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl
index 0a2d6a4..bd4986a 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   int GLF_dead5cols = 0;
   int GLF_dead5rows = 0;
@@ -110,15 +110,21 @@
       }
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl
index 17a9f12..3bd8cb6 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.hlsl
@@ -48,11 +48,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl
index 4f27a35..1178565 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.spvasm.expected.msl
@@ -7,20 +7,20 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   float const x_30 = x_6.injectionSwitch.x;
   switch(int(x_30)) {
     case 0: {
       switch(1) {
         case 1: {
-          float const x_38 = (*(tint_symbol_6)).y;
+          float const x_38 = (*(tint_symbol_4)).y;
           if ((x_38 >= 0.0f)) {
-            *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+            *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
             break;
           }
           discard_fragment();
@@ -42,13 +42,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl
index 17a9f12..3bd8cb6 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.hlsl
@@ -48,11 +48,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl
index 4f27a35..1178565 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl.expected.msl
@@ -7,20 +7,20 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   float const x_30 = x_6.injectionSwitch.x;
   switch(int(x_30)) {
     case 0: {
       switch(1) {
         case 1: {
-          float const x_38 = (*(tint_symbol_6)).y;
+          float const x_38 = (*(tint_symbol_4)).y;
           if ((x_38 >= 0.0f)) {
-            *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+            *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
             break;
           }
           discard_fragment();
@@ -42,13 +42,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl
index b530d09..4d40d34 100644
--- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl
index 7e85bb9..d0d0597 100644
--- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   tint_array_wrapper x_10 = {};
   tint_array_wrapper x_9 = {};
   int x_7 = 0;
@@ -26,7 +26,7 @@
   x_7 = x_9.arr[0];
   switch(0u) {
     default: {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       int const x_8 = x_10.arr[0];
       if ((x_8 == as_type<int>(x_7))) {
         x_11_phi = 1;
@@ -38,18 +38,24 @@
   }
   int const x_11 = x_11_phi;
   if ((x_11 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl
index b530d09..4d40d34 100644
--- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.hlsl
@@ -39,9 +39,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl
index 7e85bb9..d0d0597 100644
--- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   tint_array_wrapper x_10 = {};
   tint_array_wrapper x_9 = {};
   int x_7 = 0;
@@ -26,7 +26,7 @@
   x_7 = x_9.arr[0];
   switch(0u) {
     default: {
-      *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+      *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
       int const x_8 = x_10.arr[0];
       if ((x_8 == as_type<int>(x_7))) {
         x_11_phi = 1;
@@ -38,18 +38,24 @@
   }
   int const x_11 = x_11_phi;
   if ((x_11 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl
index abeefe6..1268a9f 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.hlsl
@@ -47,11 +47,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl
index cd6a109..04a9ce2 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   bool x_30 = false;
   float x_47 = 0.0f;
   float const x_29 = x_6.injectionSwitch.x;
@@ -20,7 +20,7 @@
     while (true) {
       float x_47_phi = 0.0f;
       while (true) {
-        float const x_41 = (*(tint_symbol_5)).x;
+        float const x_41 = (*(tint_symbol_3)).x;
         if ((x_41 < 0.0f)) {
           if (x_30) {
             x_47_phi = 1.0f;
@@ -39,19 +39,25 @@
     float4 x_48_1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
     x_48_1.y = x_47;
     float4 const x_48 = x_48_1;
-    *(tint_symbol_6) = x_48;
+    *(tint_symbol_4) = x_48;
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl
index abeefe6..1268a9f 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.hlsl
@@ -47,11 +47,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl
index cd6a109..04a9ce2 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   bool x_30 = false;
   float x_47 = 0.0f;
   float const x_29 = x_6.injectionSwitch.x;
@@ -20,7 +20,7 @@
     while (true) {
       float x_47_phi = 0.0f;
       while (true) {
-        float const x_41 = (*(tint_symbol_5)).x;
+        float const x_41 = (*(tint_symbol_3)).x;
         if ((x_41 < 0.0f)) {
           if (x_30) {
             x_47_phi = 1.0f;
@@ -39,19 +39,25 @@
     float4 x_48_1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
     x_48_1.y = x_47;
     float4 const x_48 = x_48_1;
-    *(tint_symbol_6) = x_48;
+    *(tint_symbol_4) = x_48;
   }
-  *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl
index 6ebe635..16f0423 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl
index 15cae52..082e268 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl
@@ -35,7 +35,7 @@
   return 1.0f;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 c = 0.0f;
   int i_1 = 0;
   c = float4(1.0f, 0.0f, 0.0f, 1.0f);
@@ -54,15 +54,21 @@
     }
   }
   float4 const x_41 = c;
-  *(tint_symbol_4) = x_41;
+  *(tint_symbol_3) = x_41;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl
index 6ebe635..16f0423 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.hlsl
@@ -42,9 +42,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl
index 15cae52..082e268 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl
@@ -35,7 +35,7 @@
   return 1.0f;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 c = 0.0f;
   int i_1 = 0;
   c = float4(1.0f, 0.0f, 0.0f, 1.0f);
@@ -54,15 +54,21 @@
     }
   }
   float4 const x_41 = c;
-  *(tint_symbol_4) = x_41;
+  *(tint_symbol_3) = x_41;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl
index 3c94412..9393324 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.hlsl
@@ -66,11 +66,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float3 GLF_live4drawShape_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl
index 75d8b9b..8752d55 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool x_36 = false;
   float3 x_37 = 0.0f;
   int x_6 = 0;
@@ -17,7 +17,7 @@
   float3 x_54 = 0.0f;
   bool x_40_phi = false;
   float3 x_55_phi = 0.0f;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   x_36 = false;
   x_40_phi = false;
   while (true) {
@@ -68,12 +68,18 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float3 GLF_live4drawShape_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl
index 3c94412..9393324 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.hlsl
@@ -66,11 +66,17 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float3 GLF_live4drawShape_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl
index 75d8b9b..8752d55 100644
--- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool x_36 = false;
   float3 x_37 = 0.0f;
   int x_6 = 0;
@@ -17,7 +17,7 @@
   float3 x_54 = 0.0f;
   bool x_40_phi = false;
   float3 x_55_phi = 0.0f;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   x_36 = false;
   x_40_phi = false;
   while (true) {
@@ -68,12 +68,18 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 float3 GLF_live4drawShape_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl
index 9946472..c439da6 100644
--- a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_36 = false;
   bool x_37 = false;
   int x_7 = 0;
@@ -97,16 +97,22 @@
   }
   x_38 = true;
   float const x_73 = select(0.0f, 1.0f, true);
-  *(tint_symbol_4) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73));
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73));
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl
index 9946472..c439da6 100644
--- a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   bool x_36 = false;
   bool x_37 = false;
   int x_7 = 0;
@@ -97,16 +97,22 @@
   }
   x_38 = true;
   float const x_73 = select(0.0f, 1.0f, true);
-  *(tint_symbol_4) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73));
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = (float4(x_43.x, x_43.y, x_43.z, 1.0f) + float4(x_73, x_73, x_73, x_73));
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl
index a6f8c4b..efb270b 100644
--- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.hlsl
@@ -91,11 +91,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl
index 1288d26..bb35e66 100644
--- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl
@@ -7,19 +7,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     float4 x_42 = 0.0f;
     bool x_39 = false;
     bool x_38_phi = false;
     float4 x_41_phi = 0.0f;
-    float const x_32 = (*(tint_symbol_5)).x;
+    float const x_32 = (*(tint_symbol_3)).x;
     int const x_34 = int(clamp(x_32, 0.0f, 1.0f));
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     x_38_phi = false;
     x_41_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
     while (true) {
@@ -83,19 +83,25 @@
     if (x_39) {
       break;
     }
-    *(tint_symbol_6) = x_42;
+    *(tint_symbol_4) = x_42;
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl
index a6f8c4b..efb270b 100644
--- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.hlsl
@@ -91,11 +91,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl
index 1288d26..bb35e66 100644
--- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl
@@ -7,19 +7,19 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   while (true) {
     float4 x_42 = 0.0f;
     bool x_39 = false;
     bool x_38_phi = false;
     float4 x_41_phi = 0.0f;
-    float const x_32 = (*(tint_symbol_5)).x;
+    float const x_32 = (*(tint_symbol_3)).x;
     int const x_34 = int(clamp(x_32, 0.0f, 1.0f));
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
     x_38_phi = false;
     x_41_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
     while (true) {
@@ -83,19 +83,25 @@
     if (x_39) {
       break;
     }
-    *(tint_symbol_6) = x_42;
+    *(tint_symbol_4) = x_42;
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl
index 2b57a30..c7bc168 100644
--- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl
index 985ef75..a56ad4c 100644
--- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl
@@ -7,18 +7,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, thread float* const tint_symbol_3, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float lv = 0.0f;
   float x_43 = 0.0f;
   int GLF_live5r = 0;
   int GLF_live5_looplimiter6 = 0;
   float const x_45 = x_7.injectionSwitch.y;
   if ((1.0f > x_45)) {
-    float const x_50 = *(tint_symbol_5);
+    float const x_50 = *(tint_symbol_3);
     x_43 = fabs(x_50);
   } else {
     x_43 = 260.0f;
@@ -32,7 +32,7 @@
       float const x_64 = lv;
       float const x_65 = clamp(x_64, 1.0f, 1.0f);
     } else {
-      float const x_67 = (*(tint_symbol_6)).y;
+      float const x_67 = (*(tint_symbol_4)).y;
       if ((x_67 < 0.0f)) {
         float const x_71 = lv;
         if ((int(x_71) < 210)) {
@@ -61,18 +61,24 @@
       }
     }
   }
-  *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_8 = 0.0f;
-  thread float tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_7, tint_symbol_6, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_9 = 0.0f;
+  thread float tint_symbol_10 = 0.0f;
+  thread float4 tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl
index 2b57a30..c7bc168 100644
--- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.hlsl
@@ -61,11 +61,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl
index 985ef75..a56ad4c 100644
--- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl
@@ -7,18 +7,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, thread float* const tint_symbol_3, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float lv = 0.0f;
   float x_43 = 0.0f;
   int GLF_live5r = 0;
   int GLF_live5_looplimiter6 = 0;
   float const x_45 = x_7.injectionSwitch.y;
   if ((1.0f > x_45)) {
-    float const x_50 = *(tint_symbol_5);
+    float const x_50 = *(tint_symbol_3);
     x_43 = fabs(x_50);
   } else {
     x_43 = 260.0f;
@@ -32,7 +32,7 @@
       float const x_64 = lv;
       float const x_65 = clamp(x_64, 1.0f, 1.0f);
     } else {
-      float const x_67 = (*(tint_symbol_6)).y;
+      float const x_67 = (*(tint_symbol_4)).y;
       if ((x_67 < 0.0f)) {
         float const x_71 = lv;
         if ((int(x_71) < 210)) {
@@ -61,18 +61,24 @@
       }
     }
   }
-  *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_8 = 0.0f;
-  thread float tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_7, tint_symbol_6, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_9 = 0.0f;
+  thread float tint_symbol_10 = 0.0f;
+  thread float4 tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl
index bbaed1e..65fb693 100644
--- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl
index f979602..079142b 100644
--- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int GLF_live9r = 0;
   float g = 0.0f;
   while (true) {
@@ -24,15 +24,21 @@
   }
   g = 3.0f;
   float const x_33 = g;
-  *(tint_symbol_4) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl
index bbaed1e..65fb693 100644
--- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.hlsl
@@ -25,9 +25,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl
index f979602..079142b 100644
--- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int GLF_live9r = 0;
   float g = 0.0f;
   while (true) {
@@ -24,15 +24,21 @@
   }
   g = 3.0f;
   float const x_33 = g;
-  *(tint_symbol_4) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(smoothstep(0.0f, 1.0f, x_33), 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl
index a5177e1..a922b72 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.hlsl
@@ -282,11 +282,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl
index 0bff464..98a5d7f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -24,7 +24,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_57 = *(tint_symbol_5);
+  float4 const x_57 = *(tint_symbol_3);
   float2 const x_60 = x_7.resolution;
   pos = (float2(x_57.x, x_57.y) / x_60);
   float const x_63 = pos.x;
@@ -38,7 +38,7 @@
       break;
     }
     int const x_78 = i;
-    (*(tint_symbol_6)).arr[x_78] = 0;
+    (*(tint_symbol_4)).arr[x_78] = 0;
     {
       int const x_80 = i;
       i = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
@@ -65,7 +65,7 @@
     if (x_90) {
       int const x_94 = p.x;
       int const x_97 = p.y;
-      int const x_101 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_94) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_97) * as_type<uint>(16))))))];
+      int const x_101 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_94) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_97) * as_type<uint>(16))))))];
       x_102 = (x_101 == 0);
       x_103_phi = x_102;
     }
@@ -80,7 +80,7 @@
     if (x_110) {
       int const x_114 = p.x;
       int const x_116 = p.y;
-      int const x_121 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_114) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_121 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_114) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_122 = (x_121 == 0);
       x_123_phi = x_122;
     }
@@ -95,7 +95,7 @@
     if (x_130) {
       int const x_134 = p.x;
       int const x_137 = p.y;
-      int const x_141 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_134) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_137) * as_type<uint>(16))))))];
+      int const x_141 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_134) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_137) * as_type<uint>(16))))))];
       x_142 = (x_141 == 0);
       x_143_phi = x_142;
     }
@@ -110,7 +110,7 @@
     if (x_150) {
       int const x_154 = p.x;
       int const x_156 = p.y;
-      int const x_161 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_154) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_156) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_161 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_154) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_156) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_162 = (x_161 == 0);
       x_163_phi = x_162;
     }
@@ -154,7 +154,7 @@
           }
           int const x_187 = j;
           int const x_189 = i;
-          int const x_194 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_187) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_194 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_187) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_194 == 0)) {
             int const x_198 = j;
             p.x = as_type<int>((as_type<uint>(x_198) * as_type<uint>(2)));
@@ -174,7 +174,7 @@
       }
       int const x_209 = p.x;
       int const x_211 = p.y;
-      (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_209) + as_type<uint>(as_type<int>((as_type<uint>(x_211) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_209) + as_type<uint>(as_type<int>((as_type<uint>(x_211) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_215 = v;
       int const x_216 = directions;
@@ -195,7 +195,7 @@
       if (x_228) {
         int const x_232 = p.x;
         int const x_235 = p.y;
-        int const x_239 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_232) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_235) * as_type<uint>(16))))))];
+        int const x_239 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_232) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_235) * as_type<uint>(16))))))];
         x_240 = (x_239 == 0);
         x_241_phi = x_240;
       }
@@ -205,13 +205,13 @@
         d = as_type<int>((as_type<uint>(x_244) - as_type<uint>(1)));
         int const x_247 = p.x;
         int const x_249 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_247) + as_type<uint>(as_type<int>((as_type<uint>(x_249) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_247) + as_type<uint>(as_type<int>((as_type<uint>(x_249) * as_type<uint>(16))))))] = 1;
         int const x_254 = p.x;
         int const x_257 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_257) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_257) * as_type<uint>(16))))))] = 1;
         int const x_262 = p.x;
         int const x_265 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_262) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_265) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_262) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_265) * as_type<uint>(16))))))] = 1;
         int const x_270 = p.x;
         p.x = as_type<int>((as_type<uint>(x_270) - as_type<uint>(2)));
       }
@@ -228,7 +228,7 @@
       if (x_280) {
         int const x_284 = p.x;
         int const x_286 = p.y;
-        int const x_291 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_284) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_286) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_291 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_284) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_286) - as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_292 = (x_291 == 0);
         x_293_phi = x_292;
       }
@@ -238,13 +238,13 @@
         d = as_type<int>((as_type<uint>(x_296) - as_type<uint>(1)));
         int const x_299 = p.x;
         int const x_301 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_299) + as_type<uint>(as_type<int>((as_type<uint>(x_301) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_299) + as_type<uint>(as_type<int>((as_type<uint>(x_301) * as_type<uint>(16))))))] = 1;
         int const x_306 = p.x;
         int const x_308 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_306) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_308) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_306) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_308) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_314 = p.x;
         int const x_316 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_314) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_316) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_314) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_316) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_322 = p.y;
         p.y = as_type<int>((as_type<uint>(x_322) - as_type<uint>(2)));
       }
@@ -261,7 +261,7 @@
       if (x_332) {
         int const x_336 = p.x;
         int const x_339 = p.y;
-        int const x_343 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_336) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_339) * as_type<uint>(16))))))];
+        int const x_343 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_336) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_339) * as_type<uint>(16))))))];
         x_344 = (x_343 == 0);
         x_345_phi = x_344;
       }
@@ -271,13 +271,13 @@
         d = as_type<int>((as_type<uint>(x_348) - as_type<uint>(1)));
         int const x_351 = p.x;
         int const x_353 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(x_353) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(x_353) * as_type<uint>(16))))))] = 1;
         int const x_358 = p.x;
         int const x_361 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_358) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_361) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_358) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_361) * as_type<uint>(16))))))] = 1;
         int const x_366 = p.x;
         int const x_369 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_366) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_369) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_366) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_369) * as_type<uint>(16))))))] = 1;
         int const x_374 = p.x;
         p.x = as_type<int>((as_type<uint>(x_374) + as_type<uint>(2)));
       }
@@ -294,7 +294,7 @@
       if (x_384) {
         int const x_388 = p.x;
         int const x_390 = p.y;
-        int const x_395 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_388) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_390) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_395 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_388) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_390) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_396 = (x_395 == 0);
         x_397_phi = x_396;
       }
@@ -304,22 +304,22 @@
         d = as_type<int>((as_type<uint>(x_400) - as_type<uint>(1)));
         int const x_403 = p.x;
         int const x_405 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_403) + as_type<uint>(as_type<int>((as_type<uint>(x_405) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_403) + as_type<uint>(as_type<int>((as_type<uint>(x_405) * as_type<uint>(16))))))] = 1;
         int const x_410 = p.x;
         int const x_412 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_410) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_412) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_410) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_412) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_418 = p.x;
         int const x_420 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_418) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_420) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_418) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_420) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_426 = p.y;
         p.y = as_type<int>((as_type<uint>(x_426) + as_type<uint>(2)));
       }
     }
     int const x_430 = ipos.y;
     int const x_433 = ipos.x;
-    int const x_436 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) * as_type<uint>(16)))) + as_type<uint>(x_433)))];
+    int const x_436 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) * as_type<uint>(16)))) + as_type<uint>(x_433)))];
     if ((x_436 == 1)) {
-      *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -330,18 +330,24 @@
       }
     }
   }
-  *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_8 = 0.0f;
-  thread tint_array_wrapper tint_symbol_9 = {};
-  thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_9 = 0.0f;
+  thread tint_array_wrapper tint_symbol_10 = {};
+  thread float4 tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl
index a5177e1..a922b72 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.hlsl
@@ -282,11 +282,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl
index 0bff464..98a5d7f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -24,7 +24,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_57 = *(tint_symbol_5);
+  float4 const x_57 = *(tint_symbol_3);
   float2 const x_60 = x_7.resolution;
   pos = (float2(x_57.x, x_57.y) / x_60);
   float const x_63 = pos.x;
@@ -38,7 +38,7 @@
       break;
     }
     int const x_78 = i;
-    (*(tint_symbol_6)).arr[x_78] = 0;
+    (*(tint_symbol_4)).arr[x_78] = 0;
     {
       int const x_80 = i;
       i = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
@@ -65,7 +65,7 @@
     if (x_90) {
       int const x_94 = p.x;
       int const x_97 = p.y;
-      int const x_101 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_94) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_97) * as_type<uint>(16))))))];
+      int const x_101 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_94) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_97) * as_type<uint>(16))))))];
       x_102 = (x_101 == 0);
       x_103_phi = x_102;
     }
@@ -80,7 +80,7 @@
     if (x_110) {
       int const x_114 = p.x;
       int const x_116 = p.y;
-      int const x_121 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_114) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_121 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_114) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_122 = (x_121 == 0);
       x_123_phi = x_122;
     }
@@ -95,7 +95,7 @@
     if (x_130) {
       int const x_134 = p.x;
       int const x_137 = p.y;
-      int const x_141 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_134) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_137) * as_type<uint>(16))))))];
+      int const x_141 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_134) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_137) * as_type<uint>(16))))))];
       x_142 = (x_141 == 0);
       x_143_phi = x_142;
     }
@@ -110,7 +110,7 @@
     if (x_150) {
       int const x_154 = p.x;
       int const x_156 = p.y;
-      int const x_161 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_154) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_156) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_161 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_154) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_156) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_162 = (x_161 == 0);
       x_163_phi = x_162;
     }
@@ -154,7 +154,7 @@
           }
           int const x_187 = j;
           int const x_189 = i;
-          int const x_194 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_187) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_194 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_187) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_194 == 0)) {
             int const x_198 = j;
             p.x = as_type<int>((as_type<uint>(x_198) * as_type<uint>(2)));
@@ -174,7 +174,7 @@
       }
       int const x_209 = p.x;
       int const x_211 = p.y;
-      (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_209) + as_type<uint>(as_type<int>((as_type<uint>(x_211) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_209) + as_type<uint>(as_type<int>((as_type<uint>(x_211) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_215 = v;
       int const x_216 = directions;
@@ -195,7 +195,7 @@
       if (x_228) {
         int const x_232 = p.x;
         int const x_235 = p.y;
-        int const x_239 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_232) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_235) * as_type<uint>(16))))))];
+        int const x_239 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_232) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_235) * as_type<uint>(16))))))];
         x_240 = (x_239 == 0);
         x_241_phi = x_240;
       }
@@ -205,13 +205,13 @@
         d = as_type<int>((as_type<uint>(x_244) - as_type<uint>(1)));
         int const x_247 = p.x;
         int const x_249 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_247) + as_type<uint>(as_type<int>((as_type<uint>(x_249) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_247) + as_type<uint>(as_type<int>((as_type<uint>(x_249) * as_type<uint>(16))))))] = 1;
         int const x_254 = p.x;
         int const x_257 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_257) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_257) * as_type<uint>(16))))))] = 1;
         int const x_262 = p.x;
         int const x_265 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_262) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_265) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_262) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_265) * as_type<uint>(16))))))] = 1;
         int const x_270 = p.x;
         p.x = as_type<int>((as_type<uint>(x_270) - as_type<uint>(2)));
       }
@@ -228,7 +228,7 @@
       if (x_280) {
         int const x_284 = p.x;
         int const x_286 = p.y;
-        int const x_291 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_284) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_286) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_291 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_284) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_286) - as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_292 = (x_291 == 0);
         x_293_phi = x_292;
       }
@@ -238,13 +238,13 @@
         d = as_type<int>((as_type<uint>(x_296) - as_type<uint>(1)));
         int const x_299 = p.x;
         int const x_301 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_299) + as_type<uint>(as_type<int>((as_type<uint>(x_301) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_299) + as_type<uint>(as_type<int>((as_type<uint>(x_301) * as_type<uint>(16))))))] = 1;
         int const x_306 = p.x;
         int const x_308 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_306) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_308) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_306) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_308) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_314 = p.x;
         int const x_316 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_314) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_316) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_314) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_316) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_322 = p.y;
         p.y = as_type<int>((as_type<uint>(x_322) - as_type<uint>(2)));
       }
@@ -261,7 +261,7 @@
       if (x_332) {
         int const x_336 = p.x;
         int const x_339 = p.y;
-        int const x_343 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_336) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_339) * as_type<uint>(16))))))];
+        int const x_343 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_336) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_339) * as_type<uint>(16))))))];
         x_344 = (x_343 == 0);
         x_345_phi = x_344;
       }
@@ -271,13 +271,13 @@
         d = as_type<int>((as_type<uint>(x_348) - as_type<uint>(1)));
         int const x_351 = p.x;
         int const x_353 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(x_353) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(x_353) * as_type<uint>(16))))))] = 1;
         int const x_358 = p.x;
         int const x_361 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_358) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_361) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_358) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_361) * as_type<uint>(16))))))] = 1;
         int const x_366 = p.x;
         int const x_369 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_366) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_369) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_366) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_369) * as_type<uint>(16))))))] = 1;
         int const x_374 = p.x;
         p.x = as_type<int>((as_type<uint>(x_374) + as_type<uint>(2)));
       }
@@ -294,7 +294,7 @@
       if (x_384) {
         int const x_388 = p.x;
         int const x_390 = p.y;
-        int const x_395 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_388) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_390) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_395 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_388) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_390) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_396 = (x_395 == 0);
         x_397_phi = x_396;
       }
@@ -304,22 +304,22 @@
         d = as_type<int>((as_type<uint>(x_400) - as_type<uint>(1)));
         int const x_403 = p.x;
         int const x_405 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_403) + as_type<uint>(as_type<int>((as_type<uint>(x_405) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_403) + as_type<uint>(as_type<int>((as_type<uint>(x_405) * as_type<uint>(16))))))] = 1;
         int const x_410 = p.x;
         int const x_412 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_410) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_412) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_410) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_412) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_418 = p.x;
         int const x_420 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_418) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_420) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_418) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_420) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_426 = p.y;
         p.y = as_type<int>((as_type<uint>(x_426) + as_type<uint>(2)));
       }
     }
     int const x_430 = ipos.y;
     int const x_433 = ipos.x;
-    int const x_436 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) * as_type<uint>(16)))) + as_type<uint>(x_433)))];
+    int const x_436 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) * as_type<uint>(16)))) + as_type<uint>(x_433)))];
     if ((x_436 == 1)) {
-      *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -330,18 +330,24 @@
       }
     }
   }
-  *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_8 = 0.0f;
-  thread tint_array_wrapper tint_symbol_9 = {};
-  thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_9 = 0.0f;
+  thread tint_array_wrapper tint_symbol_10 = {};
+  thread float4 tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl
index 206d78b..bcc4048 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.hlsl
@@ -192,11 +192,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl
index 50fbd98..c60e907 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_51 = 0.0f;
   float x_55 = 0.0f;
@@ -31,7 +31,7 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_47 = x_7.resolution.x;
   float const x_49 = rint((x_47 * 0.125f));
-  x_51 = (*(tint_symbol_5)).x;
+  x_51 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_55_phi = -0.5f;
@@ -98,7 +98,7 @@
   bool x_120_phi = false;
   float const x_85 = x_85_phi;
   c.x = x_85;
-  x_88 = (*(tint_symbol_5)).y;
+  x_88 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       x_92_phi = -0.5f;
@@ -182,17 +182,23 @@
   }
   float3 const x_143 = c;
   float3 const x_145 = normalize(fabs(x_143));
-  *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
+  *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl
index 8d53961..8311f18 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.hlsl
@@ -192,11 +192,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl
index e525067..a1989fc 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_51 = 0.0f;
   float x_55 = 0.0f;
@@ -31,7 +31,7 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_47 = x_7.resolution.x;
   float const x_49 = rint((x_47 * 0.125f));
-  x_51 = (*(tint_symbol_5)).x;
+  x_51 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_55_phi = -0.5f;
@@ -98,7 +98,7 @@
   bool x_120_phi = false;
   float const x_85 = x_85_phi;
   c.x = x_85;
-  x_88 = (*(tint_symbol_5)).y;
+  x_88 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       x_92_phi = -0.5f;
@@ -182,17 +182,23 @@
   }
   float3 const x_143 = c;
   float3 const x_145 = normalize(fabs(x_143));
-  *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
+  *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl
index c78548a..d2184a1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.hlsl
@@ -197,11 +197,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl
index b21c6f8..4b52877 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_53 = 0.0f;
   float x_57 = 0.0f;
@@ -33,7 +33,7 @@
   float2 const x_48 = float2(1.0f, x_47);
   float const x_50 = rint((x_47 * 0.125f));
   float2 const x_51 = float2(0.0f, -0.5f);
-  x_53 = (*(tint_symbol_5)).x;
+  x_53 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_57_phi = -0.5f;
@@ -101,7 +101,7 @@
   float const x_87 = x_87_phi;
   float4 const x_89 = float4(x_84, 0.400000006f, x_83, 0.400000006f);
   c.x = x_87;
-  x_92 = (*(tint_symbol_5)).y;
+  x_92 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       float4 const x_95 = float4(x_51, 0.0f, x_57);
@@ -187,17 +187,23 @@
   }
   float3 const x_149 = c;
   float3 const x_151 = normalize(fabs(x_149));
-  *(tint_symbol_6) = float4(x_151.x, x_151.y, x_151.z, 1.0f);
+  *(tint_symbol_4) = float4(x_151.x, x_151.y, x_151.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl
index f5c9fb0..24247b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.hlsl
@@ -197,11 +197,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl
index 2aea05b..f77b86b 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_53 = 0.0f;
   float x_57 = 0.0f;
@@ -33,7 +33,7 @@
   float2 const x_48 = float2(1.0f, x_47);
   float const x_50 = rint((x_47 * 0.125f));
   float2 const x_51 = float2(0.0f, -0.5f);
-  x_53 = (*(tint_symbol_5)).x;
+  x_53 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_57_phi = -0.5f;
@@ -101,7 +101,7 @@
   float const x_87 = x_87_phi;
   float4 const x_89 = float4(x_84, 0.400000006f, x_83, 0.400000006f);
   c.x = x_87;
-  x_92 = (*(tint_symbol_5)).y;
+  x_92 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       float4 const x_95 = float4(x_51, 0.0f, x_57);
@@ -187,17 +187,23 @@
   }
   float3 const x_149 = c;
   float3 const x_151 = normalize(fabs(x_149));
-  *(tint_symbol_6) = float4(x_151.x, x_151.y, x_151.z, 1.0f);
+  *(tint_symbol_4) = float4(x_151.x, x_151.y, x_151.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl
index 14cc0b5..8e5a341 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.hlsl
@@ -31,8 +31,8 @@
       x_69_phi = x_70;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_78 = indexable[asint((x_66 % 16))];
   x_GLF_color = x_78;
   return;
@@ -48,11 +48,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl
index bc1b29b..203fef6 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_66 = 0;
   int x_66_phi = 0;
   int x_69_phi = 0;
-  float4 const x_52 = *(tint_symbol_6);
+  float4 const x_52 = *(tint_symbol_4);
   float2 const x_55 = x_6.resolution;
   float2 const x_56 = (float2(x_52.x, x_52.y) / x_55);
   int const x_64 = as_type<int>((as_type<uint>(int((x_56.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_56.y * 10.0f))) * as_type<uint>(10))))));
@@ -41,20 +41,26 @@
       x_69_phi = x_70;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_78 = indexable.arr[as_type<int>((x_66 % 16))];
-  *(tint_symbol_7) = x_78;
+  *(tint_symbol_5) = x_78;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl
index 14cc0b5..8e5a341 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.hlsl
@@ -31,8 +31,8 @@
       x_69_phi = x_70;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_78 = indexable[asint((x_66 % 16))];
   x_GLF_color = x_78;
   return;
@@ -48,11 +48,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl
index bc1b29b..203fef6 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_66 = 0;
   int x_66_phi = 0;
   int x_69_phi = 0;
-  float4 const x_52 = *(tint_symbol_6);
+  float4 const x_52 = *(tint_symbol_4);
   float2 const x_55 = x_6.resolution;
   float2 const x_56 = (float2(x_52.x, x_52.y) / x_55);
   int const x_64 = as_type<int>((as_type<uint>(int((x_56.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_56.y * 10.0f))) * as_type<uint>(10))))));
@@ -41,20 +41,26 @@
       x_69_phi = x_70;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_78 = indexable.arr[as_type<int>((x_66 % 16))];
-  *(tint_symbol_7) = x_78;
+  *(tint_symbol_5) = x_78;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl
index ca60803..0f0037f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.hlsl
@@ -32,8 +32,8 @@
       x_75_phi = x_76;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_84 = indexable[asint((x_72 % 16))];
   x_GLF_color = x_84;
   return;
@@ -49,11 +49,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl
index 0aeb0f5..ce529ef 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_72 = 0;
   int x_72_phi = 0;
   int x_75_phi = 0;
-  float4 const x_54 = *(tint_symbol_6);
+  float4 const x_54 = *(tint_symbol_4);
   float2 const x_55 = float2(x_54.x, x_54.y);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (x_55 / x_58);
@@ -42,20 +42,26 @@
       x_75_phi = x_76;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_84 = indexable.arr[as_type<int>((x_72 % 16))];
-  *(tint_symbol_7) = x_84;
+  *(tint_symbol_5) = x_84;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl
index ca60803..0f0037f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.hlsl
@@ -32,8 +32,8 @@
       x_75_phi = x_76;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_84 = indexable[asint((x_72 % 16))];
   x_GLF_color = x_84;
   return;
@@ -49,11 +49,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl
index 0aeb0f5..ce529ef 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_72 = 0;
   int x_72_phi = 0;
   int x_75_phi = 0;
-  float4 const x_54 = *(tint_symbol_6);
+  float4 const x_54 = *(tint_symbol_4);
   float2 const x_55 = float2(x_54.x, x_54.y);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (x_55 / x_58);
@@ -42,20 +42,26 @@
       x_75_phi = x_76;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_84 = indexable.arr[as_type<int>((x_72 % 16))];
-  *(tint_symbol_7) = x_84;
+  *(tint_symbol_5) = x_84;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl
index cd5825d..d1165c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.hlsl
@@ -34,21 +34,21 @@
           break;
         }
         const int x_220 = x_213.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_195 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_195 = tint_symbol_4;
         const int x_222 = x_195[x_216];
         const bool x_224 = (x_220 < (x_222 + 15));
         x_231_phi = x_224;
         if (x_224) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_196 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_196 = tint_symbol_5;
           const int x_228 = x_196[x_216];
           x_230 = (x_220 > (x_228 - 15));
           x_231_phi = x_230;
         }
         if (x_231_phi) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_6;
           const int x_235 = x_197[x_216];
           const float x_240 = ((15.0f - abs(float((x_220 - x_235)))) * 0.06666667f);
           x_241 = float4(x_240, x_240, x_240, 1.0f);
@@ -87,11 +87,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl
index f406708..d343b1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper x_195 = {};
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
@@ -25,7 +25,7 @@
   float4 x_243_phi = 0.0f;
   bool x_244_phi = false;
   float4 x_246_phi = 0.0f;
-  float4 const x_198 = *(tint_symbol_8);
+  float4 const x_198 = *(tint_symbol_6);
   float2 const x_201 = x_6.resolution;
   float2 const x_202 = (float2(x_198.x, x_198.y) / x_201);
   x_209 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f)));
@@ -44,22 +44,22 @@
           break;
         }
         int const x_220 = x_213.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_195 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_195 = tint_symbol_2;
         int const x_222 = x_195.arr[x_216];
         bool const x_224 = (x_220 < as_type<int>((as_type<uint>(x_222) + as_type<uint>(15))));
         x_231_phi = x_224;
         if (x_224) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_196 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_196 = tint_symbol_3;
           int const x_228 = x_196.arr[x_216];
           x_230 = (x_220 > as_type<int>((as_type<uint>(x_228) - as_type<uint>(15))));
           x_231_phi = x_230;
         }
         bool const x_231 = x_231_phi;
         if (x_231) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_4;
           int const x_235 = x_197.arr[x_216];
           float const x_240 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_220) - as_type<uint>(x_235)))))) * 0.06666667f);
           x_241 = float4(x_240, x_240, x_240, 1.0f);
@@ -85,17 +85,23 @@
     }
   }
   float4 const x_246 = x_246_phi;
-  *(tint_symbol_9) = x_246;
+  *(tint_symbol_7) = x_246;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl
index cd5825d..d1165c5 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.hlsl
@@ -34,21 +34,21 @@
           break;
         }
         const int x_220 = x_213.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_195 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_195 = tint_symbol_4;
         const int x_222 = x_195[x_216];
         const bool x_224 = (x_220 < (x_222 + 15));
         x_231_phi = x_224;
         if (x_224) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_196 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_196 = tint_symbol_5;
           const int x_228 = x_196[x_216];
           x_230 = (x_220 > (x_228 - 15));
           x_231_phi = x_230;
         }
         if (x_231_phi) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_6;
           const int x_235 = x_197[x_216];
           const float x_240 = ((15.0f - abs(float((x_220 - x_235)))) * 0.06666667f);
           x_241 = float4(x_240, x_240, x_240, 1.0f);
@@ -87,11 +87,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl
index f406708..d343b1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper x_195 = {};
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
@@ -25,7 +25,7 @@
   float4 x_243_phi = 0.0f;
   bool x_244_phi = false;
   float4 x_246_phi = 0.0f;
-  float4 const x_198 = *(tint_symbol_8);
+  float4 const x_198 = *(tint_symbol_6);
   float2 const x_201 = x_6.resolution;
   float2 const x_202 = (float2(x_198.x, x_198.y) / x_201);
   x_209 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f)));
@@ -44,22 +44,22 @@
           break;
         }
         int const x_220 = x_213.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_195 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_195 = tint_symbol_2;
         int const x_222 = x_195.arr[x_216];
         bool const x_224 = (x_220 < as_type<int>((as_type<uint>(x_222) + as_type<uint>(15))));
         x_231_phi = x_224;
         if (x_224) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_196 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_196 = tint_symbol_3;
           int const x_228 = x_196.arr[x_216];
           x_230 = (x_220 > as_type<int>((as_type<uint>(x_228) - as_type<uint>(15))));
           x_231_phi = x_230;
         }
         bool const x_231 = x_231_phi;
         if (x_231) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_4;
           int const x_235 = x_197.arr[x_216];
           float const x_240 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_220) - as_type<uint>(x_235)))))) * 0.06666667f);
           x_241 = float4(x_240, x_240, x_240, 1.0f);
@@ -85,17 +85,23 @@
     }
   }
   float4 const x_246 = x_246_phi;
-  *(tint_symbol_9) = x_246;
+  *(tint_symbol_7) = x_246;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl
index 0e4020b..e2eab22 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.hlsl
@@ -42,25 +42,25 @@
           break;
         }
         const int x_225 = x_218.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_195 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_195 = tint_symbol_4;
         const int x_227 = x_195[x_221];
         const bool x_229 = (x_225 < (x_227 + 15));
         x_236_phi = x_229;
         if (x_229) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_196 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_196 = tint_symbol_5;
           const int x_233 = x_196[x_221];
           x_235 = (x_225 > (x_233 - 15));
           x_236_phi = x_235;
         }
         if (x_236_phi) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_6;
           const int x_240 = x_197[x_221];
           const int x_244 = (91 + 244);
-          const buf0 tint_symbol_8 = {x_208};
-          const float x_248 = ((tint_symbol_8.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f);
+          const buf0 tint_symbol_7 = {x_208};
+          const float x_248 = ((tint_symbol_7.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
           x_251_phi = x_249;
           x_252_phi = true;
@@ -97,11 +97,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl
index 6c9b126..fb55e83 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   tint_array_wrapper x_195 = {};
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
@@ -31,7 +31,7 @@
   float4 x_251_phi = 0.0f;
   bool x_252_phi = false;
   float4 x_254_phi = 0.0f;
-  float4 const x_198 = *(tint_symbol_9);
+  float4 const x_198 = *(tint_symbol_7);
   float2 const x_201 = x_6.resolution;
   float2 const x_202 = (float2(x_198.x, x_198.y) / x_201);
   int const x_204 = tint_unary_minus(82);
@@ -53,26 +53,26 @@
           break;
         }
         int const x_225 = x_218.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_195 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_195 = tint_symbol_2;
         int const x_227 = x_195.arr[x_221];
         bool const x_229 = (x_225 < as_type<int>((as_type<uint>(x_227) + as_type<uint>(15))));
         x_236_phi = x_229;
         if (x_229) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_196 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_196 = tint_symbol_3;
           int const x_233 = x_196.arr[x_221];
           x_235 = (x_225 > as_type<int>((as_type<uint>(x_233) - as_type<uint>(15))));
           x_236_phi = x_235;
         }
         bool const x_236 = x_236_phi;
         if (x_236) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_4;
           int const x_240 = x_197.arr[x_221];
           int const x_244 = as_type<int>((as_type<uint>(91) + as_type<uint>(244)));
-          buf0 const tint_symbol_7 = {.resolution=x_208};
-          float const x_248 = ((tint_symbol_7.resolution.y - fabs(float(as_type<int>((as_type<uint>(x_225) - as_type<uint>(x_240)))))) * 0.06666667f);
+          buf0 const tint_symbol_5 = {.resolution=x_208};
+          float const x_248 = ((tint_symbol_5.resolution.y - fabs(float(as_type<int>((as_type<uint>(x_225) - as_type<uint>(x_240)))))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
           x_251_phi = x_249;
           x_252_phi = true;
@@ -96,17 +96,23 @@
     }
   }
   float4 const x_254 = x_254_phi;
-  *(tint_symbol_10) = x_254;
+  *(tint_symbol_8) = x_254;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl
index 0e4020b..e2eab22 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.hlsl
@@ -42,25 +42,25 @@
           break;
         }
         const int x_225 = x_218.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_195 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_195 = tint_symbol_4;
         const int x_227 = x_195[x_221];
         const bool x_229 = (x_225 < (x_227 + 15));
         x_236_phi = x_229;
         if (x_229) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_196 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_196 = tint_symbol_5;
           const int x_233 = x_196[x_221];
           x_235 = (x_225 > (x_233 - 15));
           x_236_phi = x_235;
         }
         if (x_236_phi) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_6;
           const int x_240 = x_197[x_221];
           const int x_244 = (91 + 244);
-          const buf0 tint_symbol_8 = {x_208};
-          const float x_248 = ((tint_symbol_8.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f);
+          const buf0 tint_symbol_7 = {x_208};
+          const float x_248 = ((tint_symbol_7.resolution.y - abs(float((x_225 - x_240)))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
           x_251_phi = x_249;
           x_252_phi = true;
@@ -97,11 +97,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl
index 6c9b126..fb55e83 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   tint_array_wrapper x_195 = {};
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
@@ -31,7 +31,7 @@
   float4 x_251_phi = 0.0f;
   bool x_252_phi = false;
   float4 x_254_phi = 0.0f;
-  float4 const x_198 = *(tint_symbol_9);
+  float4 const x_198 = *(tint_symbol_7);
   float2 const x_201 = x_6.resolution;
   float2 const x_202 = (float2(x_198.x, x_198.y) / x_201);
   int const x_204 = tint_unary_minus(82);
@@ -53,26 +53,26 @@
           break;
         }
         int const x_225 = x_218.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_195 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_195 = tint_symbol_2;
         int const x_227 = x_195.arr[x_221];
         bool const x_229 = (x_225 < as_type<int>((as_type<uint>(x_227) + as_type<uint>(15))));
         x_236_phi = x_229;
         if (x_229) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_196 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_196 = tint_symbol_3;
           int const x_233 = x_196.arr[x_221];
           x_235 = (x_225 > as_type<int>((as_type<uint>(x_233) - as_type<uint>(15))));
           x_236_phi = x_235;
         }
         bool const x_236 = x_236_phi;
         if (x_236) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_4;
           int const x_240 = x_197.arr[x_221];
           int const x_244 = as_type<int>((as_type<uint>(91) + as_type<uint>(244)));
-          buf0 const tint_symbol_7 = {.resolution=x_208};
-          float const x_248 = ((tint_symbol_7.resolution.y - fabs(float(as_type<int>((as_type<uint>(x_225) - as_type<uint>(x_240)))))) * 0.06666667f);
+          buf0 const tint_symbol_5 = {.resolution=x_208};
+          float const x_248 = ((tint_symbol_5.resolution.y - fabs(float(as_type<int>((as_type<uint>(x_225) - as_type<uint>(x_240)))))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
           x_251_phi = x_249;
           x_252_phi = true;
@@ -96,17 +96,23 @@
     }
   }
   float4 const x_254 = x_254_phi;
-  *(tint_symbol_10) = x_254;
+  *(tint_symbol_8) = x_254;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl
index d8420f8..bf9483e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.hlsl
@@ -299,11 +299,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl
index 147da65..a43e94d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float2x4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float2x4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -29,7 +29,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_63 = *(tint_symbol_5);
+  float4 const x_63 = *(tint_symbol_3);
   float2 const x_67 = x_7.resolution;
   int const x_68 = tint_unary_minus(as_type<int>((as_type<uint>(256) - as_type<uint>(14))));
   pos = (float2(x_63.x, x_63.y) / x_67);
@@ -44,7 +44,7 @@
       break;
     }
     int const x_86 = i;
-    (*(tint_symbol_6)).arr[x_86] = 0;
+    (*(tint_symbol_4)).arr[x_86] = 0;
     {
       int const x_88 = i;
       i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
@@ -71,7 +71,7 @@
     if (x_98) {
       int const x_102 = p.x;
       int const x_105 = p.y;
-      int const x_109 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_102) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_105) * as_type<uint>(16))))))];
+      int const x_109 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_102) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_105) * as_type<uint>(16))))))];
       x_110 = (x_109 == 0);
       x_111_phi = x_110;
     }
@@ -86,7 +86,7 @@
     if (x_118) {
       int const x_122 = p.x;
       int const x_124 = p.y;
-      int const x_129 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_122) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_124) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_129 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_122) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_124) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_130 = (x_129 == 0);
       x_131_phi = x_130;
     }
@@ -101,7 +101,7 @@
     if (x_138) {
       int const x_142 = p.x;
       int const x_145 = p.y;
-      int const x_149 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_142) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_145) * as_type<uint>(16))))))];
+      int const x_149 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_142) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_145) * as_type<uint>(16))))))];
       x_150 = (x_149 == 0);
       x_151_phi = x_150;
     }
@@ -117,7 +117,7 @@
     if (x_159) {
       int const x_163 = p.x;
       int const x_165 = p.y;
-      int const x_170 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_163) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_165) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_170 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_163) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_165) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_171 = (x_170 == 0);
       x_172_phi = x_171;
     }
@@ -154,7 +154,7 @@
         }
         j = 0;
         int const x_189 = as_type<int>((as_type<uint>(x_156) - as_type<uint>(x_186)));
-        *(tint_symbol_7) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
+        *(tint_symbol_5) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
         if (false) {
           {
             int const x_216 = i;
@@ -170,7 +170,7 @@
           }
           int const x_197 = j;
           int const x_199 = i;
-          int const x_204 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_197) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_199) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_204 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_197) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_199) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_204 == 0)) {
             int const x_208 = j;
             p.x = as_type<int>((as_type<uint>(x_208) * as_type<uint>(2)));
@@ -190,7 +190,7 @@
       }
       int const x_219 = p.x;
       int const x_221 = p.y;
-      (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_219) + as_type<uint>(as_type<int>((as_type<uint>(x_221) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_219) + as_type<uint>(as_type<int>((as_type<uint>(x_221) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_225 = v;
       int const x_226 = directions;
@@ -211,7 +211,7 @@
       if (x_238) {
         int const x_242 = p.x;
         int const x_245 = p.y;
-        int const x_249 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_242) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_245) * as_type<uint>(16))))))];
+        int const x_249 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_242) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_245) * as_type<uint>(16))))))];
         x_250 = (x_249 == 0);
         x_251_phi = x_250;
       }
@@ -221,13 +221,13 @@
         d = as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)));
         int const x_257 = p.x;
         int const x_259 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_257) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_257) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
         int const x_264 = p.x;
         int const x_267 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
         int const x_272 = p.x;
         int const x_275 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_275) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_275) * as_type<uint>(16))))))] = 1;
         int const x_280 = p.x;
         p.x = as_type<int>((as_type<uint>(x_280) - as_type<uint>(2)));
       }
@@ -244,7 +244,7 @@
       if (x_290) {
         int const x_294 = p.x;
         int const x_296 = p.y;
-        int const x_301 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_294) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_296) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_301 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_294) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_296) - as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_302 = (x_301 == 0);
         x_303_phi = x_302;
       }
@@ -254,13 +254,13 @@
         d = as_type<int>((as_type<uint>(x_306) - as_type<uint>(1)));
         int const x_309 = p.x;
         int const x_311 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(x_311) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(x_311) * as_type<uint>(16))))))] = 1;
         int const x_316 = p.x;
         int const x_318 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_318) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_318) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_324 = p.x;
         int const x_326 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_324) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_324) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_332 = p.y;
         p.y = as_type<int>((as_type<uint>(x_332) - as_type<uint>(2)));
       }
@@ -277,7 +277,7 @@
       if (x_342) {
         int const x_346 = p.x;
         int const x_349 = p.y;
-        int const x_353 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_346) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_349) * as_type<uint>(16))))))];
+        int const x_353 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_346) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_349) * as_type<uint>(16))))))];
         x_354 = (x_353 == 0);
         x_355_phi = x_354;
       }
@@ -287,13 +287,13 @@
         d = as_type<int>((as_type<uint>(x_358) - as_type<uint>(1)));
         int const x_361 = p.x;
         int const x_363 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(x_363) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(x_363) * as_type<uint>(16))))))] = 1;
         int const x_368 = p.x;
         int const x_371 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_368) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_371) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_368) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_371) * as_type<uint>(16))))))] = 1;
         int const x_376 = p.x;
         int const x_379 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_376) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_379) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_376) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_379) * as_type<uint>(16))))))] = 1;
         int const x_384 = p.x;
         p.x = as_type<int>((as_type<uint>(x_384) + as_type<uint>(2)));
       }
@@ -310,7 +310,7 @@
       if (x_394) {
         int const x_398 = p.x;
         int const x_400 = p.y;
-        int const x_405 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_398) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_405 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_398) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_406 = (x_405 == 0);
         x_407_phi = x_406;
       }
@@ -320,22 +320,22 @@
         d = as_type<int>((as_type<uint>(x_410) - as_type<uint>(1)));
         int const x_413 = p.x;
         int const x_415 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(x_415) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(x_415) * as_type<uint>(16))))))] = 1;
         int const x_420 = p.x;
         int const x_422 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_420) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_422) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_420) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_422) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_428 = p.x;
         int const x_430 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_428) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_428) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_436 = p.y;
         p.y = as_type<int>((as_type<uint>(x_436) + as_type<uint>(2)));
       }
     }
     int const x_440 = ipos.y;
     int const x_443 = ipos.x;
-    int const x_446 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) * as_type<uint>(16)))) + as_type<uint>(x_443)))];
+    int const x_446 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) * as_type<uint>(16)))) + as_type<uint>(x_443)))];
     if ((x_446 == 1)) {
-      *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -346,19 +346,25 @@
       }
     }
   }
-  *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread tint_array_wrapper tint_symbol_10 = {};
-  thread float2x4 tint_symbol_11 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float2x4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread float2x4 tint_symbol_13 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl
index d8420f8..bf9483e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.hlsl
@@ -299,11 +299,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl
index 147da65..a43e94d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float2x4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, thread float2x4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -29,7 +29,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_63 = *(tint_symbol_5);
+  float4 const x_63 = *(tint_symbol_3);
   float2 const x_67 = x_7.resolution;
   int const x_68 = tint_unary_minus(as_type<int>((as_type<uint>(256) - as_type<uint>(14))));
   pos = (float2(x_63.x, x_63.y) / x_67);
@@ -44,7 +44,7 @@
       break;
     }
     int const x_86 = i;
-    (*(tint_symbol_6)).arr[x_86] = 0;
+    (*(tint_symbol_4)).arr[x_86] = 0;
     {
       int const x_88 = i;
       i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
@@ -71,7 +71,7 @@
     if (x_98) {
       int const x_102 = p.x;
       int const x_105 = p.y;
-      int const x_109 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_102) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_105) * as_type<uint>(16))))))];
+      int const x_109 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_102) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_105) * as_type<uint>(16))))))];
       x_110 = (x_109 == 0);
       x_111_phi = x_110;
     }
@@ -86,7 +86,7 @@
     if (x_118) {
       int const x_122 = p.x;
       int const x_124 = p.y;
-      int const x_129 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_122) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_124) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_129 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_122) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_124) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_130 = (x_129 == 0);
       x_131_phi = x_130;
     }
@@ -101,7 +101,7 @@
     if (x_138) {
       int const x_142 = p.x;
       int const x_145 = p.y;
-      int const x_149 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_142) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_145) * as_type<uint>(16))))))];
+      int const x_149 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_142) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_145) * as_type<uint>(16))))))];
       x_150 = (x_149 == 0);
       x_151_phi = x_150;
     }
@@ -117,7 +117,7 @@
     if (x_159) {
       int const x_163 = p.x;
       int const x_165 = p.y;
-      int const x_170 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_163) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_165) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_170 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_163) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_165) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_171 = (x_170 == 0);
       x_172_phi = x_171;
     }
@@ -154,7 +154,7 @@
         }
         j = 0;
         int const x_189 = as_type<int>((as_type<uint>(x_156) - as_type<uint>(x_186)));
-        *(tint_symbol_7) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
+        *(tint_symbol_5) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
         if (false) {
           {
             int const x_216 = i;
@@ -170,7 +170,7 @@
           }
           int const x_197 = j;
           int const x_199 = i;
-          int const x_204 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_197) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_199) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_204 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_197) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_199) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_204 == 0)) {
             int const x_208 = j;
             p.x = as_type<int>((as_type<uint>(x_208) * as_type<uint>(2)));
@@ -190,7 +190,7 @@
       }
       int const x_219 = p.x;
       int const x_221 = p.y;
-      (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_219) + as_type<uint>(as_type<int>((as_type<uint>(x_221) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_219) + as_type<uint>(as_type<int>((as_type<uint>(x_221) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_225 = v;
       int const x_226 = directions;
@@ -211,7 +211,7 @@
       if (x_238) {
         int const x_242 = p.x;
         int const x_245 = p.y;
-        int const x_249 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_242) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_245) * as_type<uint>(16))))))];
+        int const x_249 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_242) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_245) * as_type<uint>(16))))))];
         x_250 = (x_249 == 0);
         x_251_phi = x_250;
       }
@@ -221,13 +221,13 @@
         d = as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)));
         int const x_257 = p.x;
         int const x_259 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_257) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_257) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
         int const x_264 = p.x;
         int const x_267 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
         int const x_272 = p.x;
         int const x_275 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_275) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_275) * as_type<uint>(16))))))] = 1;
         int const x_280 = p.x;
         p.x = as_type<int>((as_type<uint>(x_280) - as_type<uint>(2)));
       }
@@ -244,7 +244,7 @@
       if (x_290) {
         int const x_294 = p.x;
         int const x_296 = p.y;
-        int const x_301 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_294) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_296) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_301 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_294) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_296) - as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_302 = (x_301 == 0);
         x_303_phi = x_302;
       }
@@ -254,13 +254,13 @@
         d = as_type<int>((as_type<uint>(x_306) - as_type<uint>(1)));
         int const x_309 = p.x;
         int const x_311 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(x_311) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(x_311) * as_type<uint>(16))))))] = 1;
         int const x_316 = p.x;
         int const x_318 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_318) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_318) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_324 = p.x;
         int const x_326 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_324) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_324) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_332 = p.y;
         p.y = as_type<int>((as_type<uint>(x_332) - as_type<uint>(2)));
       }
@@ -277,7 +277,7 @@
       if (x_342) {
         int const x_346 = p.x;
         int const x_349 = p.y;
-        int const x_353 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_346) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_349) * as_type<uint>(16))))))];
+        int const x_353 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_346) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_349) * as_type<uint>(16))))))];
         x_354 = (x_353 == 0);
         x_355_phi = x_354;
       }
@@ -287,13 +287,13 @@
         d = as_type<int>((as_type<uint>(x_358) - as_type<uint>(1)));
         int const x_361 = p.x;
         int const x_363 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(x_363) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(x_363) * as_type<uint>(16))))))] = 1;
         int const x_368 = p.x;
         int const x_371 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_368) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_371) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_368) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_371) * as_type<uint>(16))))))] = 1;
         int const x_376 = p.x;
         int const x_379 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_376) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_379) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_376) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_379) * as_type<uint>(16))))))] = 1;
         int const x_384 = p.x;
         p.x = as_type<int>((as_type<uint>(x_384) + as_type<uint>(2)));
       }
@@ -310,7 +310,7 @@
       if (x_394) {
         int const x_398 = p.x;
         int const x_400 = p.y;
-        int const x_405 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_398) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_405 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_398) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_406 = (x_405 == 0);
         x_407_phi = x_406;
       }
@@ -320,22 +320,22 @@
         d = as_type<int>((as_type<uint>(x_410) - as_type<uint>(1)));
         int const x_413 = p.x;
         int const x_415 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(x_415) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(x_415) * as_type<uint>(16))))))] = 1;
         int const x_420 = p.x;
         int const x_422 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_420) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_422) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_420) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_422) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_428 = p.x;
         int const x_430 = p.y;
-        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_428) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(x_428) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_436 = p.y;
         p.y = as_type<int>((as_type<uint>(x_436) + as_type<uint>(2)));
       }
     }
     int const x_440 = ipos.y;
     int const x_443 = ipos.x;
-    int const x_446 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) * as_type<uint>(16)))) + as_type<uint>(x_443)))];
+    int const x_446 = (*(tint_symbol_4)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) * as_type<uint>(16)))) + as_type<uint>(x_443)))];
     if ((x_446 == 1)) {
-      *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -346,19 +346,25 @@
       }
     }
   }
-  *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread tint_array_wrapper tint_symbol_10 = {};
-  thread float2x4 tint_symbol_11 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float2x4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_7, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread float2x4 tint_symbol_13 = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f));
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl
index 3588689..400866d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.hlsl
@@ -48,23 +48,23 @@
       const int x_155 = i;
       const float2 x_156 = pos_1;
       param = x_156;
-      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      indexable = tint_symbol_5;
+      const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      indexable = tint_symbol_4;
       const float4 x_158 = indexable[x_155];
       param_1 = x_158;
       const bool x_159 = collision_vf2_vf4_(param, param_1);
       if (x_159) {
         const int x_162 = i;
-        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_1 = tint_symbol_6;
+        const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_1 = tint_symbol_5;
         const float x_164 = indexable_1[x_162].x;
         const int x_166 = i;
-        const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_2 = tint_symbol_7;
+        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_2 = tint_symbol_6;
         const float x_168 = indexable_2[x_166].y;
         const int x_171 = i;
-        const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-        indexable_3 = tint_symbol_8;
+        const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+        indexable_3 = tint_symbol_7;
         const float4 x_177 = indexable_3[((((int(x_164) * int(x_168)) + (x_171 * 9)) + 11) % 16)];
         res = x_177;
       }
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl
index d072491..1624fe2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl
@@ -16,7 +16,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -66,23 +66,23 @@
     int const x_155 = i;
     float2 const x_156 = *(pos_1);
     param = x_156;
-    tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    indexable = tint_symbol_2;
     float4 const x_158 = indexable.arr[x_155];
     param_1 = x_158;
     bool const x_159 = collision_vf2_vf4_(&(param), &(param_1));
     if (x_159) {
       int const x_162 = i;
-      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_1 = tint_symbol_3;
       float const x_164 = indexable_1.arr[x_162].x;
       int const x_166 = i;
-      tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_2 = tint_symbol_4;
       float const x_168 = indexable_2.arr[x_166].y;
       int const x_171 = i;
-      tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      indexable_3 = tint_symbol_7;
+      tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      indexable_3 = tint_symbol_5;
       float4 const x_177 = indexable_3.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_164)) * as_type<uint>(int(x_168))))) + as_type<uint>(as_type<int>((as_type<uint>(x_171) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       res = x_177;
     }
@@ -95,10 +95,10 @@
   return x_180;
 }
 
-void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 lin = 0.0f;
   float2 param_2 = 0.0f;
-  float4 const x_102 = *(tint_symbol_9);
+  float4 const x_102 = *(tint_symbol_7);
   float2 const x_105 = x_20.resolution;
   lin = (float2(x_102.x, x_102.y) / x_105);
   float2 const x_107 = lin;
@@ -106,17 +106,23 @@
   float2 const x_110 = lin;
   param_2 = x_110;
   float4 const x_111 = match_vf2_(&(param_2));
-  *(tint_symbol_10) = x_111;
+  *(tint_symbol_8) = x_111;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_20, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_20, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl
index 3588689..400866d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.hlsl
@@ -48,23 +48,23 @@
       const int x_155 = i;
       const float2 x_156 = pos_1;
       param = x_156;
-      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      indexable = tint_symbol_5;
+      const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      indexable = tint_symbol_4;
       const float4 x_158 = indexable[x_155];
       param_1 = x_158;
       const bool x_159 = collision_vf2_vf4_(param, param_1);
       if (x_159) {
         const int x_162 = i;
-        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_1 = tint_symbol_6;
+        const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_1 = tint_symbol_5;
         const float x_164 = indexable_1[x_162].x;
         const int x_166 = i;
-        const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_2 = tint_symbol_7;
+        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_2 = tint_symbol_6;
         const float x_168 = indexable_2[x_166].y;
         const int x_171 = i;
-        const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-        indexable_3 = tint_symbol_8;
+        const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+        indexable_3 = tint_symbol_7;
         const float4 x_177 = indexable_3[((((int(x_164) * int(x_168)) + (x_171 * 9)) + 11) % 16)];
         res = x_177;
       }
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl
index d072491..1624fe2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl
@@ -16,7 +16,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -66,23 +66,23 @@
     int const x_155 = i;
     float2 const x_156 = *(pos_1);
     param = x_156;
-    tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    indexable = tint_symbol_2;
     float4 const x_158 = indexable.arr[x_155];
     param_1 = x_158;
     bool const x_159 = collision_vf2_vf4_(&(param), &(param_1));
     if (x_159) {
       int const x_162 = i;
-      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_1 = tint_symbol_3;
       float const x_164 = indexable_1.arr[x_162].x;
       int const x_166 = i;
-      tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_2 = tint_symbol_4;
       float const x_168 = indexable_2.arr[x_166].y;
       int const x_171 = i;
-      tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      indexable_3 = tint_symbol_7;
+      tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      indexable_3 = tint_symbol_5;
       float4 const x_177 = indexable_3.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_164)) * as_type<uint>(int(x_168))))) + as_type<uint>(as_type<int>((as_type<uint>(x_171) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       res = x_177;
     }
@@ -95,10 +95,10 @@
   return x_180;
 }
 
-void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 lin = 0.0f;
   float2 param_2 = 0.0f;
-  float4 const x_102 = *(tint_symbol_9);
+  float4 const x_102 = *(tint_symbol_7);
   float2 const x_105 = x_20.resolution;
   lin = (float2(x_102.x, x_102.y) / x_105);
   float2 const x_107 = lin;
@@ -106,17 +106,23 @@
   float2 const x_110 = lin;
   param_2 = x_110;
   float4 const x_111 = match_vf2_(&(param_2));
-  *(tint_symbol_10) = x_111;
+  *(tint_symbol_8) = x_111;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_20, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_20, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl
index fb19885..8c6fe1a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.hlsl
@@ -49,23 +49,23 @@
       const int x_159 = i;
       const float2 x_160 = pos_1;
       param = x_160;
-      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      indexable = tint_symbol_5;
+      const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      indexable = tint_symbol_4;
       const float4 x_162 = indexable[x_159];
       param_1 = x_162;
       const bool x_163 = collision_vf2_vf4_(param, param_1);
       if (x_163) {
         const int x_166 = i;
-        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_1 = tint_symbol_6;
+        const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_1 = tint_symbol_5;
         const float x_168 = indexable_1[x_166].x;
         const int x_170 = i;
-        const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_2 = tint_symbol_7;
+        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_2 = tint_symbol_6;
         const float x_172 = indexable_2[x_170].y;
         const int x_175 = i;
-        const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-        indexable_3 = tint_symbol_8;
+        const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+        indexable_3 = tint_symbol_7;
         const float4 x_181 = indexable_3[((((int(x_168) * int(x_172)) + (x_175 * 9)) + 11) % 16)];
         res = x_181;
       }
@@ -97,11 +97,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl
index d8c43f8..da51ebc 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl
@@ -16,7 +16,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -67,23 +67,23 @@
     int const x_159 = i;
     float2 const x_160 = *(pos_1);
     param = x_160;
-    tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    indexable = tint_symbol_2;
     float4 const x_162 = indexable.arr[x_159];
     param_1 = x_162;
     bool const x_163 = collision_vf2_vf4_(&(param), &(param_1));
     if (x_163) {
       int const x_166 = i;
-      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_1 = tint_symbol_3;
       float const x_168 = indexable_1.arr[x_166].x;
       int const x_170 = i;
-      tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_2 = tint_symbol_4;
       float const x_172 = indexable_2.arr[x_170].y;
       int const x_175 = i;
-      tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      indexable_3 = tint_symbol_7;
+      tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      indexable_3 = tint_symbol_5;
       float4 const x_181 = indexable_3.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_168)) * as_type<uint>(int(x_172))))) + as_type<uint>(as_type<int>((as_type<uint>(x_175) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       res = x_181;
     }
@@ -96,10 +96,10 @@
   return x_184;
 }
 
-void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 lin = 0.0f;
   float2 param_2 = 0.0f;
-  float4 const x_105 = *(tint_symbol_9);
+  float4 const x_105 = *(tint_symbol_7);
   float2 const x_108 = x_20.resolution;
   lin = (float2(x_105.x, x_105.y) / x_108);
   float2 const x_110 = lin;
@@ -107,17 +107,23 @@
   float2 const x_113 = lin;
   param_2 = x_113;
   float4 const x_114 = match_vf2_(&(param_2));
-  *(tint_symbol_10) = x_114;
+  *(tint_symbol_8) = x_114;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_20, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_20, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl
index fb19885..8c6fe1a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.hlsl
@@ -49,23 +49,23 @@
       const int x_159 = i;
       const float2 x_160 = pos_1;
       param = x_160;
-      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      indexable = tint_symbol_5;
+      const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      indexable = tint_symbol_4;
       const float4 x_162 = indexable[x_159];
       param_1 = x_162;
       const bool x_163 = collision_vf2_vf4_(param, param_1);
       if (x_163) {
         const int x_166 = i;
-        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_1 = tint_symbol_6;
+        const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_1 = tint_symbol_5;
         const float x_168 = indexable_1[x_166].x;
         const int x_170 = i;
-        const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_2 = tint_symbol_7;
+        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_2 = tint_symbol_6;
         const float x_172 = indexable_2[x_170].y;
         const int x_175 = i;
-        const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-        indexable_3 = tint_symbol_8;
+        const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+        indexable_3 = tint_symbol_7;
         const float4 x_181 = indexable_3[((((int(x_168) * int(x_172)) + (x_175 * 9)) + 11) % 16)];
         res = x_181;
       }
@@ -97,11 +97,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl
index d8c43f8..da51ebc 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl
@@ -16,7 +16,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -67,23 +67,23 @@
     int const x_159 = i;
     float2 const x_160 = *(pos_1);
     param = x_160;
-    tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper_1 const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    indexable = tint_symbol_2;
     float4 const x_162 = indexable.arr[x_159];
     param_1 = x_162;
     bool const x_163 = collision_vf2_vf4_(&(param), &(param_1));
     if (x_163) {
       int const x_166 = i;
-      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper_1 const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_1 = tint_symbol_3;
       float const x_168 = indexable_1.arr[x_166].x;
       int const x_170 = i;
-      tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper_1 const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_2 = tint_symbol_4;
       float const x_172 = indexable_2.arr[x_170].y;
       int const x_175 = i;
-      tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      indexable_3 = tint_symbol_7;
+      tint_array_wrapper_2 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      indexable_3 = tint_symbol_5;
       float4 const x_181 = indexable_3.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_168)) * as_type<uint>(int(x_172))))) + as_type<uint>(as_type<int>((as_type<uint>(x_175) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       res = x_181;
     }
@@ -96,10 +96,10 @@
   return x_184;
 }
 
-void main_1(constant buf0& x_20, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_20, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 lin = 0.0f;
   float2 param_2 = 0.0f;
-  float4 const x_105 = *(tint_symbol_9);
+  float4 const x_105 = *(tint_symbol_7);
   float2 const x_108 = x_20.resolution;
   lin = (float2(x_105.x, x_105.y) / x_108);
   float2 const x_110 = lin;
@@ -107,17 +107,23 @@
   float2 const x_113 = lin;
   param_2 = x_113;
   float4 const x_114 = match_vf2_(&(param_2));
-  *(tint_symbol_10) = x_114;
+  *(tint_symbol_8) = x_114;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_20, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_20, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl
index 9aaf73d..a06e811 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl
@@ -253,11 +253,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl
index 40421fe..554121d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -38,23 +38,23 @@
       break;
     }
     int const x_270 = i;
-    int const x_272 = (*(tint_symbol_5)).arr[x_270];
+    int const x_272 = (*(tint_symbol_3)).arr[x_270];
     int const x_273 = j;
-    int const x_275 = (*(tint_symbol_5)).arr[x_273];
+    int const x_275 = (*(tint_symbol_3)).arr[x_273];
     if ((x_272 < x_275)) {
       int const x_280 = k;
       k = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
       int const x_282 = i;
       i = as_type<int>((as_type<uint>(x_282) + as_type<uint>(1)));
-      int const x_285 = (*(tint_symbol_5)).arr[x_282];
-      (*(tint_symbol_6)).arr[x_280] = x_285;
+      int const x_285 = (*(tint_symbol_3)).arr[x_282];
+      (*(tint_symbol_4)).arr[x_280] = x_285;
     } else {
       int const x_287 = k;
       k = as_type<int>((as_type<uint>(x_287) + as_type<uint>(1)));
       int const x_289 = j;
       j = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
-      int const x_292 = (*(tint_symbol_5)).arr[x_289];
-      (*(tint_symbol_6)).arr[x_287] = x_292;
+      int const x_292 = (*(tint_symbol_3)).arr[x_289];
+      (*(tint_symbol_4)).arr[x_287] = x_292;
     }
   }
   while (true) {
@@ -69,8 +69,8 @@
     k = as_type<int>((as_type<uint>(x_305) + as_type<uint>(1)));
     int const x_307 = i;
     i = as_type<int>((as_type<uint>(x_307) + as_type<uint>(1)));
-    int const x_310 = (*(tint_symbol_5)).arr[x_307];
-    (*(tint_symbol_6)).arr[x_305] = x_310;
+    int const x_310 = (*(tint_symbol_3)).arr[x_307];
+    (*(tint_symbol_4)).arr[x_305] = x_310;
   }
   int const x_312 = *(from);
   i_1 = x_312;
@@ -83,8 +83,8 @@
     }
     int const x_321 = i_1;
     int const x_322 = i_1;
-    int const x_324 = (*(tint_symbol_6)).arr[x_322];
-    (*(tint_symbol_5)).arr[x_321] = x_324;
+    int const x_324 = (*(tint_symbol_4)).arr[x_322];
+    (*(tint_symbol_3)).arr[x_321] = x_324;
     {
       int const x_326 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_326) + as_type<uint>(1)));
@@ -93,7 +93,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -138,7 +138,7 @@
       param_1 = x_359;
       int const x_360 = to_1;
       param_2 = x_360;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_362 = m;
         int const x_364 = i_2;
@@ -153,7 +153,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -164,52 +164,52 @@
     switch(x_93) {
       case 9: {
         int const x_123 = i_3;
-        (*(tint_symbol_9)).arr[x_123] = -5;
+        (*(tint_symbol_7)).arr[x_123] = -5;
         break;
       }
       case 8: {
         int const x_121 = i_3;
-        (*(tint_symbol_9)).arr[x_121] = -4;
+        (*(tint_symbol_7)).arr[x_121] = -4;
         break;
       }
       case 7: {
         int const x_119 = i_3;
-        (*(tint_symbol_9)).arr[x_119] = -3;
+        (*(tint_symbol_7)).arr[x_119] = -3;
         break;
       }
       case 6: {
         int const x_117 = i_3;
-        (*(tint_symbol_9)).arr[x_117] = -2;
+        (*(tint_symbol_7)).arr[x_117] = -2;
         break;
       }
       case 5: {
         int const x_115 = i_3;
-        (*(tint_symbol_9)).arr[x_115] = -1;
+        (*(tint_symbol_7)).arr[x_115] = -1;
         break;
       }
       case 4: {
         int const x_113 = i_3;
-        (*(tint_symbol_9)).arr[x_113] = 0;
+        (*(tint_symbol_7)).arr[x_113] = 0;
         break;
       }
       case 3: {
         int const x_111 = i_3;
-        (*(tint_symbol_9)).arr[x_111] = 1;
+        (*(tint_symbol_7)).arr[x_111] = 1;
         break;
       }
       case 2: {
         int const x_109 = i_3;
-        (*(tint_symbol_9)).arr[x_109] = 2;
+        (*(tint_symbol_7)).arr[x_109] = 2;
         break;
       }
       case 1: {
         int const x_107 = i_3;
-        (*(tint_symbol_9)).arr[x_107] = 3;
+        (*(tint_symbol_7)).arr[x_107] = 3;
         break;
       }
       case 0: {
         int const x_105 = i_3;
-        (*(tint_symbol_9)).arr[x_105] = 4;
+        (*(tint_symbol_7)).arr[x_105] = 4;
         break;
       }
       default: {
@@ -235,56 +235,56 @@
     }
     int const x_136 = j_1;
     int const x_137 = j_1;
-    int const x_139 = (*(tint_symbol_9)).arr[x_137];
-    (*(tint_symbol_10)).arr[x_136] = x_139;
+    int const x_139 = (*(tint_symbol_7)).arr[x_137];
+    (*(tint_symbol_8)).arr[x_136] = x_139;
     {
       int const x_141 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_145 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_145 = (*(tint_symbol_9)).y;
   if ((int(x_145) < 30)) {
-    int const x_152 = (*(tint_symbol_9)).arr[0];
+    int const x_152 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_152) / 10.0f));
   } else {
-    float const x_157 = (*(tint_symbol_11)).y;
+    float const x_157 = (*(tint_symbol_9)).y;
     if ((int(x_157) < 60)) {
-      int const x_164 = (*(tint_symbol_9)).arr[1];
+      int const x_164 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_164) / 10.0f));
     } else {
-      float const x_169 = (*(tint_symbol_11)).y;
+      float const x_169 = (*(tint_symbol_9)).y;
       if ((int(x_169) < 90)) {
-        int const x_176 = (*(tint_symbol_9)).arr[2];
+        int const x_176 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_176) / 10.0f));
       } else {
-        float const x_181 = (*(tint_symbol_11)).y;
+        float const x_181 = (*(tint_symbol_9)).y;
         if ((int(x_181) < 120)) {
-          int const x_188 = (*(tint_symbol_9)).arr[3];
+          int const x_188 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_188) / 10.0f));
         } else {
-          float const x_193 = (*(tint_symbol_11)).y;
+          float const x_193 = (*(tint_symbol_9)).y;
           if ((int(x_193) < 150)) {
             discard_fragment();
           } else {
-            float const x_200 = (*(tint_symbol_11)).y;
+            float const x_200 = (*(tint_symbol_9)).y;
             if ((int(x_200) < 180)) {
-              int const x_207 = (*(tint_symbol_9)).arr[5];
+              int const x_207 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_207) / 10.0f));
             } else {
-              float const x_212 = (*(tint_symbol_11)).y;
+              float const x_212 = (*(tint_symbol_9)).y;
               if ((int(x_212) < 210)) {
-                int const x_219 = (*(tint_symbol_9)).arr[6];
+                int const x_219 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_219) / 10.0f));
               } else {
-                float const x_224 = (*(tint_symbol_11)).y;
+                float const x_224 = (*(tint_symbol_9)).y;
                 if ((int(x_224) < 240)) {
-                  int const x_231 = (*(tint_symbol_9)).arr[7];
+                  int const x_231 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_231) / 10.0f));
                 } else {
-                  float const x_236 = (*(tint_symbol_11)).y;
+                  float const x_236 = (*(tint_symbol_9)).y;
                   if ((int(x_236) < 270)) {
-                    int const x_243 = (*(tint_symbol_9)).arr[8];
+                    int const x_243 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_243) / 10.0f));
                   } else {
                     discard_fragment();
@@ -299,19 +299,25 @@
   }
   float const x_247 = grey;
   float3 const x_248 = float3(x_247, x_247, x_247);
-  *(tint_symbol_12) = float4(x_248.x, x_248.y, x_248.z, 1.0f);
+  *(tint_symbol_10) = float4(x_248.x, x_248.y, x_248.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl
index be184c8..fa6bb30 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.hlsl
@@ -261,11 +261,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl
index aff7c99..e9497fe 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -38,23 +38,23 @@
       break;
     }
     int const x_270 = i;
-    int const x_272 = (*(tint_symbol_5)).arr[x_270];
+    int const x_272 = (*(tint_symbol_3)).arr[x_270];
     int const x_273 = j;
-    int const x_275 = (*(tint_symbol_5)).arr[x_273];
+    int const x_275 = (*(tint_symbol_3)).arr[x_273];
     if ((x_272 < x_275)) {
       int const x_280 = k;
       k = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
       int const x_282 = i;
       i = as_type<int>((as_type<uint>(x_282) + as_type<uint>(1)));
-      int const x_285 = (*(tint_symbol_5)).arr[x_282];
-      (*(tint_symbol_6)).arr[x_280] = x_285;
+      int const x_285 = (*(tint_symbol_3)).arr[x_282];
+      (*(tint_symbol_4)).arr[x_280] = x_285;
     } else {
       int const x_287 = k;
       k = as_type<int>((as_type<uint>(x_287) + as_type<uint>(1)));
       int const x_289 = j;
       j = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
-      int const x_292 = (*(tint_symbol_5)).arr[x_289];
-      (*(tint_symbol_6)).arr[x_287] = x_292;
+      int const x_292 = (*(tint_symbol_3)).arr[x_289];
+      (*(tint_symbol_4)).arr[x_287] = x_292;
     }
   }
   while (true) {
@@ -69,8 +69,8 @@
     k = as_type<int>((as_type<uint>(x_305) + as_type<uint>(1)));
     int const x_307 = i;
     i = as_type<int>((as_type<uint>(x_307) + as_type<uint>(1)));
-    int const x_310 = (*(tint_symbol_5)).arr[x_307];
-    (*(tint_symbol_6)).arr[x_305] = x_310;
+    int const x_310 = (*(tint_symbol_3)).arr[x_307];
+    (*(tint_symbol_4)).arr[x_305] = x_310;
   }
   int const x_312 = *(from);
   i_1 = x_312;
@@ -83,8 +83,8 @@
     }
     int const x_321 = i_1;
     int const x_322 = i_1;
-    int const x_324 = (*(tint_symbol_6)).arr[x_322];
-    (*(tint_symbol_5)).arr[x_321] = x_324;
+    int const x_324 = (*(tint_symbol_4)).arr[x_322];
+    (*(tint_symbol_3)).arr[x_321] = x_324;
     {
       int const x_326 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_326) + as_type<uint>(1)));
@@ -93,7 +93,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -138,7 +138,7 @@
       param_1 = x_359;
       int const x_360 = to_1;
       param_2 = x_360;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_362 = m;
         int const x_364 = i_2;
@@ -153,7 +153,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -164,52 +164,52 @@
     switch(x_93) {
       case 9: {
         int const x_123 = i_3;
-        (*(tint_symbol_9)).arr[x_123] = -5;
+        (*(tint_symbol_7)).arr[x_123] = -5;
         break;
       }
       case 8: {
         int const x_121 = i_3;
-        (*(tint_symbol_9)).arr[x_121] = -4;
+        (*(tint_symbol_7)).arr[x_121] = -4;
         break;
       }
       case 7: {
         int const x_119 = i_3;
-        (*(tint_symbol_9)).arr[x_119] = -3;
+        (*(tint_symbol_7)).arr[x_119] = -3;
         break;
       }
       case 6: {
         int const x_117 = i_3;
-        (*(tint_symbol_9)).arr[x_117] = -2;
+        (*(tint_symbol_7)).arr[x_117] = -2;
         break;
       }
       case 5: {
         int const x_115 = i_3;
-        (*(tint_symbol_9)).arr[x_115] = -1;
+        (*(tint_symbol_7)).arr[x_115] = -1;
         break;
       }
       case 4: {
         int const x_113 = i_3;
-        (*(tint_symbol_9)).arr[x_113] = 0;
+        (*(tint_symbol_7)).arr[x_113] = 0;
         break;
       }
       case 3: {
         int const x_111 = i_3;
-        (*(tint_symbol_9)).arr[x_111] = 1;
+        (*(tint_symbol_7)).arr[x_111] = 1;
         break;
       }
       case 2: {
         int const x_109 = i_3;
-        (*(tint_symbol_9)).arr[x_109] = 2;
+        (*(tint_symbol_7)).arr[x_109] = 2;
         break;
       }
       case 1: {
         int const x_107 = i_3;
-        (*(tint_symbol_9)).arr[x_107] = 3;
+        (*(tint_symbol_7)).arr[x_107] = 3;
         break;
       }
       case 0: {
         int const x_105 = i_3;
-        (*(tint_symbol_9)).arr[x_105] = 4;
+        (*(tint_symbol_7)).arr[x_105] = 4;
         break;
       }
       default: {
@@ -235,56 +235,56 @@
     }
     int const x_136 = j_1;
     int const x_137 = j_1;
-    int const x_139 = (*(tint_symbol_9)).arr[x_137];
-    (*(tint_symbol_10)).arr[x_136] = x_139;
+    int const x_139 = (*(tint_symbol_7)).arr[x_137];
+    (*(tint_symbol_8)).arr[x_136] = x_139;
     {
       int const x_141 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_145 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_145 = (*(tint_symbol_9)).y;
   if ((int(x_145) < 30)) {
-    int const x_152 = (*(tint_symbol_9)).arr[0];
+    int const x_152 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_152) / 10.0f));
   } else {
-    float const x_157 = (*(tint_symbol_11)).y;
+    float const x_157 = (*(tint_symbol_9)).y;
     if ((int(x_157) < 60)) {
-      int const x_164 = (*(tint_symbol_9)).arr[1];
+      int const x_164 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_164) / 10.0f));
     } else {
-      float const x_169 = (*(tint_symbol_11)).y;
+      float const x_169 = (*(tint_symbol_9)).y;
       if ((int(x_169) < 90)) {
-        int const x_176 = (*(tint_symbol_9)).arr[2];
+        int const x_176 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_176) / 10.0f));
       } else {
-        float const x_181 = (*(tint_symbol_11)).y;
+        float const x_181 = (*(tint_symbol_9)).y;
         if ((int(x_181) < 120)) {
-          int const x_188 = (*(tint_symbol_9)).arr[3];
+          int const x_188 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_188) / 10.0f));
         } else {
-          float const x_193 = (*(tint_symbol_11)).y;
+          float const x_193 = (*(tint_symbol_9)).y;
           if ((int(x_193) < 150)) {
             discard_fragment();
           } else {
-            float const x_200 = (*(tint_symbol_11)).y;
+            float const x_200 = (*(tint_symbol_9)).y;
             if ((int(x_200) < 180)) {
-              int const x_207 = (*(tint_symbol_9)).arr[5];
+              int const x_207 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_207) / 10.0f));
             } else {
-              float const x_212 = (*(tint_symbol_11)).y;
+              float const x_212 = (*(tint_symbol_9)).y;
               if ((int(x_212) < 210)) {
-                int const x_219 = (*(tint_symbol_9)).arr[6];
+                int const x_219 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_219) / 10.0f));
               } else {
-                float const x_224 = (*(tint_symbol_11)).y;
+                float const x_224 = (*(tint_symbol_9)).y;
                 if ((int(x_224) < 240)) {
-                  int const x_231 = (*(tint_symbol_9)).arr[7];
+                  int const x_231 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_231) / 10.0f));
                 } else {
-                  float const x_236 = (*(tint_symbol_11)).y;
+                  float const x_236 = (*(tint_symbol_9)).y;
                   if ((int(x_236) < 270)) {
-                    int const x_243 = (*(tint_symbol_9)).arr[8];
+                    int const x_243 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_243) / 10.0f));
                   } else {
                     discard_fragment();
@@ -299,19 +299,25 @@
   }
   float const x_247 = grey;
   float3 const x_248 = float3(x_247, x_247, x_247);
-  *(tint_symbol_12) = float4(x_248.x, x_248.y, x_248.z, 1.0f);
+  *(tint_symbol_10) = float4(x_248.x, x_248.y, x_248.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl
index e78af85..d3f0772 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl
@@ -263,11 +263,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl
index 39c99c4..c904072 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -38,23 +38,23 @@
       break;
     }
     int const x_271 = i;
-    int const x_273 = (*(tint_symbol_5)).arr[x_271];
+    int const x_273 = (*(tint_symbol_3)).arr[x_271];
     int const x_274 = j;
-    int const x_276 = (*(tint_symbol_5)).arr[x_274];
+    int const x_276 = (*(tint_symbol_3)).arr[x_274];
     if ((x_273 < x_276)) {
       int const x_281 = k;
       k = as_type<int>((as_type<uint>(x_281) + as_type<uint>(1)));
       int const x_283 = i;
       i = as_type<int>((as_type<uint>(x_283) + as_type<uint>(1)));
-      int const x_286 = (*(tint_symbol_5)).arr[x_283];
-      (*(tint_symbol_6)).arr[x_281] = x_286;
+      int const x_286 = (*(tint_symbol_3)).arr[x_283];
+      (*(tint_symbol_4)).arr[x_281] = x_286;
     } else {
       int const x_288 = k;
       k = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
       int const x_290 = j;
       j = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
-      int const x_293 = (*(tint_symbol_5)).arr[x_290];
-      (*(tint_symbol_6)).arr[x_288] = x_293;
+      int const x_293 = (*(tint_symbol_3)).arr[x_290];
+      (*(tint_symbol_4)).arr[x_288] = x_293;
     }
   }
   while (true) {
@@ -69,8 +69,8 @@
     k = as_type<int>((as_type<uint>(x_306) + as_type<uint>(1)));
     int const x_308 = i;
     i = as_type<int>((as_type<uint>(x_308) + as_type<uint>(1)));
-    int const x_311 = (*(tint_symbol_5)).arr[x_308];
-    (*(tint_symbol_6)).arr[x_306] = x_311;
+    int const x_311 = (*(tint_symbol_3)).arr[x_308];
+    (*(tint_symbol_4)).arr[x_306] = x_311;
   }
   int const x_313 = *(from);
   i_1 = x_313;
@@ -83,8 +83,8 @@
     }
     int const x_322 = i_1;
     int const x_323 = i_1;
-    int const x_325 = (*(tint_symbol_6)).arr[x_323];
-    (*(tint_symbol_5)).arr[x_322] = x_325;
+    int const x_325 = (*(tint_symbol_4)).arr[x_323];
+    (*(tint_symbol_3)).arr[x_322] = x_325;
     {
       int const x_327 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_327) + as_type<uint>(1)));
@@ -93,7 +93,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -138,7 +138,7 @@
       param_1 = x_360;
       int const x_361 = to_1;
       param_2 = x_361;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_363 = m;
         int const x_365 = i_2;
@@ -153,7 +153,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -164,7 +164,7 @@
     switch(x_94) {
       case 9: {
         int const x_124 = i_3;
-        (*(tint_symbol_9)).arr[x_124] = -5;
+        (*(tint_symbol_7)).arr[x_124] = -5;
         if (true) {
         } else {
           {
@@ -180,47 +180,47 @@
       }
       case 8: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -4;
+        (*(tint_symbol_7)).arr[x_122] = -4;
         break;
       }
       case 7: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -3;
+        (*(tint_symbol_7)).arr[x_120] = -3;
         break;
       }
       case 6: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -2;
+        (*(tint_symbol_7)).arr[x_118] = -2;
         break;
       }
       case 5: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -1;
+        (*(tint_symbol_7)).arr[x_116] = -1;
         break;
       }
       case 4: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = 0;
+        (*(tint_symbol_7)).arr[x_114] = 0;
         break;
       }
       case 3: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 1;
+        (*(tint_symbol_7)).arr[x_112] = 1;
         break;
       }
       case 2: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 2;
+        (*(tint_symbol_7)).arr[x_110] = 2;
         break;
       }
       case 1: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 3;
+        (*(tint_symbol_7)).arr[x_108] = 3;
         break;
       }
       case 0: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 4;
+        (*(tint_symbol_7)).arr[x_106] = 4;
         break;
       }
       default: {
@@ -246,56 +246,56 @@
     }
     int const x_137 = j_1;
     int const x_138 = j_1;
-    int const x_140 = (*(tint_symbol_9)).arr[x_138];
-    (*(tint_symbol_10)).arr[x_137] = x_140;
+    int const x_140 = (*(tint_symbol_7)).arr[x_138];
+    (*(tint_symbol_8)).arr[x_137] = x_140;
     {
       int const x_142 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_146 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_146 = (*(tint_symbol_9)).y;
   if ((int(x_146) < 30)) {
-    int const x_153 = (*(tint_symbol_9)).arr[0];
+    int const x_153 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_153) / 10.0f));
   } else {
-    float const x_158 = (*(tint_symbol_11)).y;
+    float const x_158 = (*(tint_symbol_9)).y;
     if ((int(x_158) < 60)) {
-      int const x_165 = (*(tint_symbol_9)).arr[1];
+      int const x_165 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_165) / 10.0f));
     } else {
-      float const x_170 = (*(tint_symbol_11)).y;
+      float const x_170 = (*(tint_symbol_9)).y;
       if ((int(x_170) < 90)) {
-        int const x_177 = (*(tint_symbol_9)).arr[2];
+        int const x_177 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_177) / 10.0f));
       } else {
-        float const x_182 = (*(tint_symbol_11)).y;
+        float const x_182 = (*(tint_symbol_9)).y;
         if ((int(x_182) < 120)) {
-          int const x_189 = (*(tint_symbol_9)).arr[3];
+          int const x_189 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_189) / 10.0f));
         } else {
-          float const x_194 = (*(tint_symbol_11)).y;
+          float const x_194 = (*(tint_symbol_9)).y;
           if ((int(x_194) < 150)) {
             discard_fragment();
           } else {
-            float const x_201 = (*(tint_symbol_11)).y;
+            float const x_201 = (*(tint_symbol_9)).y;
             if ((int(x_201) < 180)) {
-              int const x_208 = (*(tint_symbol_9)).arr[5];
+              int const x_208 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_208) / 10.0f));
             } else {
-              float const x_213 = (*(tint_symbol_11)).y;
+              float const x_213 = (*(tint_symbol_9)).y;
               if ((int(x_213) < 210)) {
-                int const x_220 = (*(tint_symbol_9)).arr[6];
+                int const x_220 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_220) / 10.0f));
               } else {
-                float const x_225 = (*(tint_symbol_11)).y;
+                float const x_225 = (*(tint_symbol_9)).y;
                 if ((int(x_225) < 240)) {
-                  int const x_232 = (*(tint_symbol_9)).arr[7];
+                  int const x_232 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_232) / 10.0f));
                 } else {
-                  float const x_237 = (*(tint_symbol_11)).y;
+                  float const x_237 = (*(tint_symbol_9)).y;
                   if ((int(x_237) < 270)) {
-                    int const x_244 = (*(tint_symbol_9)).arr[8];
+                    int const x_244 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_244) / 10.0f));
                   } else {
                     discard_fragment();
@@ -310,19 +310,25 @@
   }
   float const x_248 = grey;
   float3 const x_249 = float3(x_248, x_248, x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl
index b6f582e..c469d3a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.hlsl
@@ -271,11 +271,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl
index d17e466..be25e91 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -38,23 +38,23 @@
       break;
     }
     int const x_271 = i;
-    int const x_273 = (*(tint_symbol_5)).arr[x_271];
+    int const x_273 = (*(tint_symbol_3)).arr[x_271];
     int const x_274 = j;
-    int const x_276 = (*(tint_symbol_5)).arr[x_274];
+    int const x_276 = (*(tint_symbol_3)).arr[x_274];
     if ((x_273 < x_276)) {
       int const x_281 = k;
       k = as_type<int>((as_type<uint>(x_281) + as_type<uint>(1)));
       int const x_283 = i;
       i = as_type<int>((as_type<uint>(x_283) + as_type<uint>(1)));
-      int const x_286 = (*(tint_symbol_5)).arr[x_283];
-      (*(tint_symbol_6)).arr[x_281] = x_286;
+      int const x_286 = (*(tint_symbol_3)).arr[x_283];
+      (*(tint_symbol_4)).arr[x_281] = x_286;
     } else {
       int const x_288 = k;
       k = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
       int const x_290 = j;
       j = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
-      int const x_293 = (*(tint_symbol_5)).arr[x_290];
-      (*(tint_symbol_6)).arr[x_288] = x_293;
+      int const x_293 = (*(tint_symbol_3)).arr[x_290];
+      (*(tint_symbol_4)).arr[x_288] = x_293;
     }
   }
   while (true) {
@@ -69,8 +69,8 @@
     k = as_type<int>((as_type<uint>(x_306) + as_type<uint>(1)));
     int const x_308 = i;
     i = as_type<int>((as_type<uint>(x_308) + as_type<uint>(1)));
-    int const x_311 = (*(tint_symbol_5)).arr[x_308];
-    (*(tint_symbol_6)).arr[x_306] = x_311;
+    int const x_311 = (*(tint_symbol_3)).arr[x_308];
+    (*(tint_symbol_4)).arr[x_306] = x_311;
   }
   int const x_313 = *(from);
   i_1 = x_313;
@@ -83,8 +83,8 @@
     }
     int const x_322 = i_1;
     int const x_323 = i_1;
-    int const x_325 = (*(tint_symbol_6)).arr[x_323];
-    (*(tint_symbol_5)).arr[x_322] = x_325;
+    int const x_325 = (*(tint_symbol_4)).arr[x_323];
+    (*(tint_symbol_3)).arr[x_322] = x_325;
     {
       int const x_327 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_327) + as_type<uint>(1)));
@@ -93,7 +93,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -138,7 +138,7 @@
       param_1 = x_360;
       int const x_361 = to_1;
       param_2 = x_361;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_363 = m;
         int const x_365 = i_2;
@@ -153,7 +153,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -164,7 +164,7 @@
     switch(x_94) {
       case 9: {
         int const x_124 = i_3;
-        (*(tint_symbol_9)).arr[x_124] = -5;
+        (*(tint_symbol_7)).arr[x_124] = -5;
         if (true) {
         } else {
           {
@@ -180,47 +180,47 @@
       }
       case 8: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -4;
+        (*(tint_symbol_7)).arr[x_122] = -4;
         break;
       }
       case 7: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -3;
+        (*(tint_symbol_7)).arr[x_120] = -3;
         break;
       }
       case 6: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -2;
+        (*(tint_symbol_7)).arr[x_118] = -2;
         break;
       }
       case 5: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -1;
+        (*(tint_symbol_7)).arr[x_116] = -1;
         break;
       }
       case 4: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = 0;
+        (*(tint_symbol_7)).arr[x_114] = 0;
         break;
       }
       case 3: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 1;
+        (*(tint_symbol_7)).arr[x_112] = 1;
         break;
       }
       case 2: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 2;
+        (*(tint_symbol_7)).arr[x_110] = 2;
         break;
       }
       case 1: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 3;
+        (*(tint_symbol_7)).arr[x_108] = 3;
         break;
       }
       case 0: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 4;
+        (*(tint_symbol_7)).arr[x_106] = 4;
         break;
       }
       default: {
@@ -246,56 +246,56 @@
     }
     int const x_137 = j_1;
     int const x_138 = j_1;
-    int const x_140 = (*(tint_symbol_9)).arr[x_138];
-    (*(tint_symbol_10)).arr[x_137] = x_140;
+    int const x_140 = (*(tint_symbol_7)).arr[x_138];
+    (*(tint_symbol_8)).arr[x_137] = x_140;
     {
       int const x_142 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_146 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_146 = (*(tint_symbol_9)).y;
   if ((int(x_146) < 30)) {
-    int const x_153 = (*(tint_symbol_9)).arr[0];
+    int const x_153 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_153) / 10.0f));
   } else {
-    float const x_158 = (*(tint_symbol_11)).y;
+    float const x_158 = (*(tint_symbol_9)).y;
     if ((int(x_158) < 60)) {
-      int const x_165 = (*(tint_symbol_9)).arr[1];
+      int const x_165 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_165) / 10.0f));
     } else {
-      float const x_170 = (*(tint_symbol_11)).y;
+      float const x_170 = (*(tint_symbol_9)).y;
       if ((int(x_170) < 90)) {
-        int const x_177 = (*(tint_symbol_9)).arr[2];
+        int const x_177 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_177) / 10.0f));
       } else {
-        float const x_182 = (*(tint_symbol_11)).y;
+        float const x_182 = (*(tint_symbol_9)).y;
         if ((int(x_182) < 120)) {
-          int const x_189 = (*(tint_symbol_9)).arr[3];
+          int const x_189 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_189) / 10.0f));
         } else {
-          float const x_194 = (*(tint_symbol_11)).y;
+          float const x_194 = (*(tint_symbol_9)).y;
           if ((int(x_194) < 150)) {
             discard_fragment();
           } else {
-            float const x_201 = (*(tint_symbol_11)).y;
+            float const x_201 = (*(tint_symbol_9)).y;
             if ((int(x_201) < 180)) {
-              int const x_208 = (*(tint_symbol_9)).arr[5];
+              int const x_208 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_208) / 10.0f));
             } else {
-              float const x_213 = (*(tint_symbol_11)).y;
+              float const x_213 = (*(tint_symbol_9)).y;
               if ((int(x_213) < 210)) {
-                int const x_220 = (*(tint_symbol_9)).arr[6];
+                int const x_220 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_220) / 10.0f));
               } else {
-                float const x_225 = (*(tint_symbol_11)).y;
+                float const x_225 = (*(tint_symbol_9)).y;
                 if ((int(x_225) < 240)) {
-                  int const x_232 = (*(tint_symbol_9)).arr[7];
+                  int const x_232 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_232) / 10.0f));
                 } else {
-                  float const x_237 = (*(tint_symbol_11)).y;
+                  float const x_237 = (*(tint_symbol_9)).y;
                   if ((int(x_237) < 270)) {
-                    int const x_244 = (*(tint_symbol_9)).arr[8];
+                    int const x_244 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_244) / 10.0f));
                   } else {
                     discard_fragment();
@@ -310,19 +310,25 @@
   }
   float const x_248 = grey;
   float3 const x_249 = float3(x_248, x_248, x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl
index 059390e..28e9f1a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.hlsl
@@ -108,11 +108,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl
index e54d779..97e447b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper data = {};
   int x_40_phi = 0;
   int x_52_phi = 0;
@@ -67,7 +67,7 @@
       float const x_70 = data.arr[x_69_save];
       int const x_71_save = x_59;
       float const x_72 = data.arr[x_71_save];
-      float const x_74 = (*(tint_symbol_5)).y;
+      float const x_74 = (*(tint_symbol_3)).y;
       float const x_76 = x_6.resolution.y;
       if ((x_74 < (x_76 * 0.5f))) {
         x_82 = (x_70 > x_72);
@@ -93,29 +93,35 @@
       x_52_phi = x_53;
     }
   }
-  float const x_90 = (*(tint_symbol_5)).x;
+  float const x_90 = (*(tint_symbol_3)).x;
   float const x_92 = x_6.resolution.x;
   if ((x_90 < (x_92 * 0.5f))) {
     float const x_99 = data.arr[0];
     float const x_102 = data.arr[5];
     float const x_105 = data.arr[9];
-    *(tint_symbol_6) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f);
   } else {
     float const x_109 = data.arr[5];
     float const x_112 = data.arr[9];
     float const x_115 = data.arr[0];
-    *(tint_symbol_6) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl
index 059390e..28e9f1a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.hlsl
@@ -108,11 +108,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl
index e54d779..97e447b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper data = {};
   int x_40_phi = 0;
   int x_52_phi = 0;
@@ -67,7 +67,7 @@
       float const x_70 = data.arr[x_69_save];
       int const x_71_save = x_59;
       float const x_72 = data.arr[x_71_save];
-      float const x_74 = (*(tint_symbol_5)).y;
+      float const x_74 = (*(tint_symbol_3)).y;
       float const x_76 = x_6.resolution.y;
       if ((x_74 < (x_76 * 0.5f))) {
         x_82 = (x_70 > x_72);
@@ -93,29 +93,35 @@
       x_52_phi = x_53;
     }
   }
-  float const x_90 = (*(tint_symbol_5)).x;
+  float const x_90 = (*(tint_symbol_3)).x;
   float const x_92 = x_6.resolution.x;
   if ((x_90 < (x_92 * 0.5f))) {
     float const x_99 = data.arr[0];
     float const x_102 = data.arr[5];
     float const x_105 = data.arr[9];
-    *(tint_symbol_6) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_99 * 0.100000001f), (x_102 * 0.100000001f), (x_105 * 0.100000001f), 1.0f);
   } else {
     float const x_109 = data.arr[5];
     float const x_112 = data.arr[9];
     float const x_115 = data.arr[0];
-    *(tint_symbol_6) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_109 * 0.100000001f), (x_112 * 0.100000001f), (x_115 * 0.100000001f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl
index 9792c8f..4efca13 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.hlsl
@@ -108,11 +108,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl
index 4539194..a5e1be2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper data = {};
   int x_41_phi = 0;
   int x_53_phi = 0;
@@ -67,7 +67,7 @@
       float const x_71 = data.arr[x_70_save];
       int const x_72_save = x_60;
       float const x_73 = data.arr[x_72_save];
-      float const x_75 = (*(tint_symbol_5)).y;
+      float const x_75 = (*(tint_symbol_3)).y;
       float const x_77 = x_6.resolution.y;
       if ((x_75 < (x_77 * 0.5f))) {
         x_83 = (x_71 > x_73);
@@ -93,29 +93,35 @@
       x_53_phi = x_54;
     }
   }
-  float const x_91 = (*(tint_symbol_5)).x;
+  float const x_91 = (*(tint_symbol_3)).x;
   float const x_93 = x_6.resolution.x;
   if ((x_91 < (x_93 * 0.5f))) {
     float const x_100 = data.arr[0];
     float const x_103 = data.arr[5];
     float const x_106 = data.arr[9];
-    *(tint_symbol_6) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f);
   } else {
     float const x_110 = data.arr[5];
     float const x_113 = data.arr[9];
     float const x_116 = data.arr[0];
-    *(tint_symbol_6) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl
index 9792c8f..4efca13 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.hlsl
@@ -108,11 +108,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl
index 4539194..a5e1be2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper data = {};
   int x_41_phi = 0;
   int x_53_phi = 0;
@@ -67,7 +67,7 @@
       float const x_71 = data.arr[x_70_save];
       int const x_72_save = x_60;
       float const x_73 = data.arr[x_72_save];
-      float const x_75 = (*(tint_symbol_5)).y;
+      float const x_75 = (*(tint_symbol_3)).y;
       float const x_77 = x_6.resolution.y;
       if ((x_75 < (x_77 * 0.5f))) {
         x_83 = (x_71 > x_73);
@@ -93,29 +93,35 @@
       x_53_phi = x_54;
     }
   }
-  float const x_91 = (*(tint_symbol_5)).x;
+  float const x_91 = (*(tint_symbol_3)).x;
   float const x_93 = x_6.resolution.x;
   if ((x_91 < (x_93 * 0.5f))) {
     float const x_100 = data.arr[0];
     float const x_103 = data.arr[5];
     float const x_106 = data.arr[9];
-    *(tint_symbol_6) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_100 * 0.100000001f), (x_103 * 0.100000001f), (x_106 * 0.100000001f), 1.0f);
   } else {
     float const x_110 = data.arr[5];
     float const x_113 = data.arr[9];
     float const x_116 = data.arr[0];
-    *(tint_symbol_6) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f);
+    *(tint_symbol_4) = float4((x_110 * 0.100000001f), (x_113 * 0.100000001f), (x_116 * 0.100000001f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl
index cebe086..088c51f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl
@@ -257,11 +257,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl
index eefc297..c5e09f7 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -38,23 +38,23 @@
       break;
     }
     int const x_272 = i;
-    int const x_274 = (*(tint_symbol_5)).arr[x_272];
+    int const x_274 = (*(tint_symbol_3)).arr[x_272];
     int const x_275 = j;
-    int const x_277 = (*(tint_symbol_5)).arr[x_275];
+    int const x_277 = (*(tint_symbol_3)).arr[x_275];
     if ((x_274 < x_277)) {
       int const x_282 = k;
       k = as_type<int>((as_type<uint>(x_282) + as_type<uint>(1)));
       int const x_284 = i;
       i = as_type<int>((as_type<uint>(x_284) + as_type<uint>(1)));
-      int const x_287 = (*(tint_symbol_5)).arr[x_284];
-      (*(tint_symbol_6)).arr[x_282] = x_287;
+      int const x_287 = (*(tint_symbol_3)).arr[x_284];
+      (*(tint_symbol_4)).arr[x_282] = x_287;
     } else {
       int const x_289 = k;
       k = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
       int const x_291 = j;
       j = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
-      int const x_294 = (*(tint_symbol_5)).arr[x_291];
-      (*(tint_symbol_6)).arr[x_289] = x_294;
+      int const x_294 = (*(tint_symbol_3)).arr[x_291];
+      (*(tint_symbol_4)).arr[x_289] = x_294;
     }
   }
   while (true) {
@@ -73,8 +73,8 @@
     k = as_type<int>((as_type<uint>(x_309) + as_type<uint>(1)));
     int const x_311 = i;
     i = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
-    int const x_314 = (*(tint_symbol_5)).arr[x_311];
-    (*(tint_symbol_6)).arr[x_309] = x_314;
+    int const x_314 = (*(tint_symbol_3)).arr[x_311];
+    (*(tint_symbol_4)).arr[x_309] = x_314;
   }
   int const x_316 = *(from);
   i_1 = x_316;
@@ -87,8 +87,8 @@
     }
     int const x_325 = i_1;
     int const x_326 = i_1;
-    int const x_328 = (*(tint_symbol_6)).arr[x_326];
-    (*(tint_symbol_5)).arr[x_325] = x_328;
+    int const x_328 = (*(tint_symbol_4)).arr[x_326];
+    (*(tint_symbol_3)).arr[x_325] = x_328;
     {
       int const x_330 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
@@ -97,7 +97,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -142,7 +142,7 @@
       param_1 = x_363;
       int const x_364 = to_1;
       param_2 = x_364;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_366 = m;
         int const x_368 = i_2;
@@ -157,7 +157,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -168,52 +168,52 @@
     switch(x_95) {
       case 9: {
         int const x_125 = i_3;
-        (*(tint_symbol_9)).arr[x_125] = -5;
+        (*(tint_symbol_7)).arr[x_125] = -5;
         break;
       }
       case 8: {
         int const x_123 = i_3;
-        (*(tint_symbol_9)).arr[x_123] = -4;
+        (*(tint_symbol_7)).arr[x_123] = -4;
         break;
       }
       case 7: {
         int const x_121 = i_3;
-        (*(tint_symbol_9)).arr[x_121] = -3;
+        (*(tint_symbol_7)).arr[x_121] = -3;
         break;
       }
       case 6: {
         int const x_119 = i_3;
-        (*(tint_symbol_9)).arr[x_119] = -2;
+        (*(tint_symbol_7)).arr[x_119] = -2;
         break;
       }
       case 5: {
         int const x_117 = i_3;
-        (*(tint_symbol_9)).arr[x_117] = -1;
+        (*(tint_symbol_7)).arr[x_117] = -1;
         break;
       }
       case 4: {
         int const x_115 = i_3;
-        (*(tint_symbol_9)).arr[x_115] = 0;
+        (*(tint_symbol_7)).arr[x_115] = 0;
         break;
       }
       case 3: {
         int const x_113 = i_3;
-        (*(tint_symbol_9)).arr[x_113] = 1;
+        (*(tint_symbol_7)).arr[x_113] = 1;
         break;
       }
       case 2: {
         int const x_111 = i_3;
-        (*(tint_symbol_9)).arr[x_111] = 2;
+        (*(tint_symbol_7)).arr[x_111] = 2;
         break;
       }
       case 1: {
         int const x_109 = i_3;
-        (*(tint_symbol_9)).arr[x_109] = 3;
+        (*(tint_symbol_7)).arr[x_109] = 3;
         break;
       }
       case 0: {
         int const x_107 = i_3;
-        (*(tint_symbol_9)).arr[x_107] = 4;
+        (*(tint_symbol_7)).arr[x_107] = 4;
         break;
       }
       default: {
@@ -239,56 +239,56 @@
     }
     int const x_138 = j_1;
     int const x_139 = j_1;
-    int const x_141 = (*(tint_symbol_9)).arr[x_139];
-    (*(tint_symbol_10)).arr[x_138] = x_141;
+    int const x_141 = (*(tint_symbol_7)).arr[x_139];
+    (*(tint_symbol_8)).arr[x_138] = x_141;
     {
       int const x_143 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_147 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_147 = (*(tint_symbol_9)).y;
   if ((int(x_147) < 30)) {
-    int const x_154 = (*(tint_symbol_9)).arr[0];
+    int const x_154 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_154) / 10.0f));
   } else {
-    float const x_159 = (*(tint_symbol_11)).y;
+    float const x_159 = (*(tint_symbol_9)).y;
     if ((int(x_159) < 60)) {
-      int const x_166 = (*(tint_symbol_9)).arr[1];
+      int const x_166 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_166) / 10.0f));
     } else {
-      float const x_171 = (*(tint_symbol_11)).y;
+      float const x_171 = (*(tint_symbol_9)).y;
       if ((int(x_171) < 90)) {
-        int const x_178 = (*(tint_symbol_9)).arr[2];
+        int const x_178 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_178) / 10.0f));
       } else {
-        float const x_183 = (*(tint_symbol_11)).y;
+        float const x_183 = (*(tint_symbol_9)).y;
         if ((int(x_183) < 120)) {
-          int const x_190 = (*(tint_symbol_9)).arr[3];
+          int const x_190 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_190) / 10.0f));
         } else {
-          float const x_195 = (*(tint_symbol_11)).y;
+          float const x_195 = (*(tint_symbol_9)).y;
           if ((int(x_195) < 150)) {
             discard_fragment();
           } else {
-            float const x_202 = (*(tint_symbol_11)).y;
+            float const x_202 = (*(tint_symbol_9)).y;
             if ((int(x_202) < 180)) {
-              int const x_209 = (*(tint_symbol_9)).arr[5];
+              int const x_209 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_209) / 10.0f));
             } else {
-              float const x_214 = (*(tint_symbol_11)).y;
+              float const x_214 = (*(tint_symbol_9)).y;
               if ((int(x_214) < 210)) {
-                int const x_221 = (*(tint_symbol_9)).arr[6];
+                int const x_221 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_221) / 10.0f));
               } else {
-                float const x_226 = (*(tint_symbol_11)).y;
+                float const x_226 = (*(tint_symbol_9)).y;
                 if ((int(x_226) < 240)) {
-                  int const x_233 = (*(tint_symbol_9)).arr[7];
+                  int const x_233 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_233) / 10.0f));
                 } else {
-                  float const x_238 = (*(tint_symbol_11)).y;
+                  float const x_238 = (*(tint_symbol_9)).y;
                   if ((int(x_238) < 270)) {
-                    int const x_245 = (*(tint_symbol_9)).arr[8];
+                    int const x_245 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_245) / 10.0f));
                   } else {
                     discard_fragment();
@@ -303,19 +303,25 @@
   }
   float const x_249 = grey;
   float3 const x_250 = float3(x_249, x_249, x_249);
-  *(tint_symbol_12) = float4(x_250.x, x_250.y, x_250.z, 1.0f);
+  *(tint_symbol_10) = float4(x_250.x, x_250.y, x_250.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl
index 61539cb..30a24e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.hlsl
@@ -265,11 +265,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl
index 7455bc8..6e261fd 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -38,23 +38,23 @@
       break;
     }
     int const x_272 = i;
-    int const x_274 = (*(tint_symbol_5)).arr[x_272];
+    int const x_274 = (*(tint_symbol_3)).arr[x_272];
     int const x_275 = j;
-    int const x_277 = (*(tint_symbol_5)).arr[x_275];
+    int const x_277 = (*(tint_symbol_3)).arr[x_275];
     if ((x_274 < x_277)) {
       int const x_282 = k;
       k = as_type<int>((as_type<uint>(x_282) + as_type<uint>(1)));
       int const x_284 = i;
       i = as_type<int>((as_type<uint>(x_284) + as_type<uint>(1)));
-      int const x_287 = (*(tint_symbol_5)).arr[x_284];
-      (*(tint_symbol_6)).arr[x_282] = x_287;
+      int const x_287 = (*(tint_symbol_3)).arr[x_284];
+      (*(tint_symbol_4)).arr[x_282] = x_287;
     } else {
       int const x_289 = k;
       k = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
       int const x_291 = j;
       j = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
-      int const x_294 = (*(tint_symbol_5)).arr[x_291];
-      (*(tint_symbol_6)).arr[x_289] = x_294;
+      int const x_294 = (*(tint_symbol_3)).arr[x_291];
+      (*(tint_symbol_4)).arr[x_289] = x_294;
     }
   }
   while (true) {
@@ -73,8 +73,8 @@
     k = as_type<int>((as_type<uint>(x_309) + as_type<uint>(1)));
     int const x_311 = i;
     i = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
-    int const x_314 = (*(tint_symbol_5)).arr[x_311];
-    (*(tint_symbol_6)).arr[x_309] = x_314;
+    int const x_314 = (*(tint_symbol_3)).arr[x_311];
+    (*(tint_symbol_4)).arr[x_309] = x_314;
   }
   int const x_316 = *(from);
   i_1 = x_316;
@@ -87,8 +87,8 @@
     }
     int const x_325 = i_1;
     int const x_326 = i_1;
-    int const x_328 = (*(tint_symbol_6)).arr[x_326];
-    (*(tint_symbol_5)).arr[x_325] = x_328;
+    int const x_328 = (*(tint_symbol_4)).arr[x_326];
+    (*(tint_symbol_3)).arr[x_325] = x_328;
     {
       int const x_330 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
@@ -97,7 +97,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -142,7 +142,7 @@
       param_1 = x_363;
       int const x_364 = to_1;
       param_2 = x_364;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_366 = m;
         int const x_368 = i_2;
@@ -157,7 +157,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -168,52 +168,52 @@
     switch(x_95) {
       case 9: {
         int const x_125 = i_3;
-        (*(tint_symbol_9)).arr[x_125] = -5;
+        (*(tint_symbol_7)).arr[x_125] = -5;
         break;
       }
       case 8: {
         int const x_123 = i_3;
-        (*(tint_symbol_9)).arr[x_123] = -4;
+        (*(tint_symbol_7)).arr[x_123] = -4;
         break;
       }
       case 7: {
         int const x_121 = i_3;
-        (*(tint_symbol_9)).arr[x_121] = -3;
+        (*(tint_symbol_7)).arr[x_121] = -3;
         break;
       }
       case 6: {
         int const x_119 = i_3;
-        (*(tint_symbol_9)).arr[x_119] = -2;
+        (*(tint_symbol_7)).arr[x_119] = -2;
         break;
       }
       case 5: {
         int const x_117 = i_3;
-        (*(tint_symbol_9)).arr[x_117] = -1;
+        (*(tint_symbol_7)).arr[x_117] = -1;
         break;
       }
       case 4: {
         int const x_115 = i_3;
-        (*(tint_symbol_9)).arr[x_115] = 0;
+        (*(tint_symbol_7)).arr[x_115] = 0;
         break;
       }
       case 3: {
         int const x_113 = i_3;
-        (*(tint_symbol_9)).arr[x_113] = 1;
+        (*(tint_symbol_7)).arr[x_113] = 1;
         break;
       }
       case 2: {
         int const x_111 = i_3;
-        (*(tint_symbol_9)).arr[x_111] = 2;
+        (*(tint_symbol_7)).arr[x_111] = 2;
         break;
       }
       case 1: {
         int const x_109 = i_3;
-        (*(tint_symbol_9)).arr[x_109] = 3;
+        (*(tint_symbol_7)).arr[x_109] = 3;
         break;
       }
       case 0: {
         int const x_107 = i_3;
-        (*(tint_symbol_9)).arr[x_107] = 4;
+        (*(tint_symbol_7)).arr[x_107] = 4;
         break;
       }
       default: {
@@ -239,56 +239,56 @@
     }
     int const x_138 = j_1;
     int const x_139 = j_1;
-    int const x_141 = (*(tint_symbol_9)).arr[x_139];
-    (*(tint_symbol_10)).arr[x_138] = x_141;
+    int const x_141 = (*(tint_symbol_7)).arr[x_139];
+    (*(tint_symbol_8)).arr[x_138] = x_141;
     {
       int const x_143 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_147 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_147 = (*(tint_symbol_9)).y;
   if ((int(x_147) < 30)) {
-    int const x_154 = (*(tint_symbol_9)).arr[0];
+    int const x_154 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_154) / 10.0f));
   } else {
-    float const x_159 = (*(tint_symbol_11)).y;
+    float const x_159 = (*(tint_symbol_9)).y;
     if ((int(x_159) < 60)) {
-      int const x_166 = (*(tint_symbol_9)).arr[1];
+      int const x_166 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_166) / 10.0f));
     } else {
-      float const x_171 = (*(tint_symbol_11)).y;
+      float const x_171 = (*(tint_symbol_9)).y;
       if ((int(x_171) < 90)) {
-        int const x_178 = (*(tint_symbol_9)).arr[2];
+        int const x_178 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_178) / 10.0f));
       } else {
-        float const x_183 = (*(tint_symbol_11)).y;
+        float const x_183 = (*(tint_symbol_9)).y;
         if ((int(x_183) < 120)) {
-          int const x_190 = (*(tint_symbol_9)).arr[3];
+          int const x_190 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_190) / 10.0f));
         } else {
-          float const x_195 = (*(tint_symbol_11)).y;
+          float const x_195 = (*(tint_symbol_9)).y;
           if ((int(x_195) < 150)) {
             discard_fragment();
           } else {
-            float const x_202 = (*(tint_symbol_11)).y;
+            float const x_202 = (*(tint_symbol_9)).y;
             if ((int(x_202) < 180)) {
-              int const x_209 = (*(tint_symbol_9)).arr[5];
+              int const x_209 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_209) / 10.0f));
             } else {
-              float const x_214 = (*(tint_symbol_11)).y;
+              float const x_214 = (*(tint_symbol_9)).y;
               if ((int(x_214) < 210)) {
-                int const x_221 = (*(tint_symbol_9)).arr[6];
+                int const x_221 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_221) / 10.0f));
               } else {
-                float const x_226 = (*(tint_symbol_11)).y;
+                float const x_226 = (*(tint_symbol_9)).y;
                 if ((int(x_226) < 240)) {
-                  int const x_233 = (*(tint_symbol_9)).arr[7];
+                  int const x_233 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_233) / 10.0f));
                 } else {
-                  float const x_238 = (*(tint_symbol_11)).y;
+                  float const x_238 = (*(tint_symbol_9)).y;
                   if ((int(x_238) < 270)) {
-                    int const x_245 = (*(tint_symbol_9)).arr[8];
+                    int const x_245 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_245) / 10.0f));
                   } else {
                     discard_fragment();
@@ -303,19 +303,25 @@
   }
   float const x_249 = grey;
   float3 const x_250 = float3(x_249, x_249, x_249);
-  *(tint_symbol_12) = float4(x_250.x, x_250.y, x_250.z, 1.0f);
+  *(tint_symbol_10) = float4(x_250.x, x_250.y, x_250.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl
index 6b3b61f..0d62f20 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.hlsl
@@ -14,8 +14,8 @@
   int x_357_phi = 0;
   int x_360_phi = 0;
   int x_362_phi = 0;
-  const BST tint_symbol_2 = {9, -1, -1};
-  tree[0] = tint_symbol_2;
+  const BST tint_symbol_1 = {9, -1, -1};
+  tree[0] = tint_symbol_1;
   switch(0u) {
     default: {
       x_62_phi = 0;
@@ -36,8 +36,8 @@
           const int x_83 = tree[x_82_save].leftIndex;
           if ((x_83 == -1)) {
             tree[x_82_save].leftIndex = 1;
-            const BST tint_symbol_3 = {5, -1, -1};
-            tree[1] = tint_symbol_3;
+            const BST tint_symbol_2 = {5, -1, -1};
+            tree[1] = tint_symbol_2;
             x_90_phi = true;
             break;
           } else {
@@ -55,8 +55,8 @@
           const int x_75 = tree[x_74_save].rightIndex;
           if ((x_75 == -1)) {
             tree[x_74_save].rightIndex = 1;
-            const BST tint_symbol_4 = {5, -1, -1};
-            tree[1] = tint_symbol_4;
+            const BST tint_symbol_3 = {5, -1, -1};
+            tree[1] = tint_symbol_3;
             x_90_phi = true;
             break;
           } else {
@@ -104,8 +104,8 @@
           const int x_116 = tree[x_115_save].leftIndex;
           if ((x_116 == -1)) {
             tree[x_115_save].leftIndex = 2;
-            const BST tint_symbol_5 = {12, -1, -1};
-            tree[2] = tint_symbol_5;
+            const BST tint_symbol_4 = {12, -1, -1};
+            tree[2] = tint_symbol_4;
             x_123_phi = true;
             break;
           } else {
@@ -123,8 +123,8 @@
           const int x_108 = tree[x_107_save].rightIndex;
           if ((x_108 == -1)) {
             tree[x_107_save].rightIndex = 2;
-            const BST tint_symbol_6 = {12, -1, -1};
-            tree[2] = tint_symbol_6;
+            const BST tint_symbol_5 = {12, -1, -1};
+            tree[2] = tint_symbol_5;
             x_123_phi = true;
             break;
           } else {
@@ -172,8 +172,8 @@
           const int x_149 = tree[x_148_save].leftIndex;
           if ((x_149 == -1)) {
             tree[x_148_save].leftIndex = 3;
-            const BST tint_symbol_7 = {15, -1, -1};
-            tree[3] = tint_symbol_7;
+            const BST tint_symbol_6 = {15, -1, -1};
+            tree[3] = tint_symbol_6;
             x_156_phi = true;
             break;
           } else {
@@ -191,8 +191,8 @@
           const int x_141 = tree[x_140_save].rightIndex;
           if ((x_141 == -1)) {
             tree[x_140_save].rightIndex = 3;
-            const BST tint_symbol_8 = {15, -1, -1};
-            tree[3] = tint_symbol_8;
+            const BST tint_symbol_7 = {15, -1, -1};
+            tree[3] = tint_symbol_7;
             x_156_phi = true;
             break;
           } else {
@@ -240,8 +240,8 @@
           const int x_182 = tree[x_181_save].leftIndex;
           if ((x_182 == -1)) {
             tree[x_181_save].leftIndex = 4;
-            const BST tint_symbol_9 = {7, -1, -1};
-            tree[4] = tint_symbol_9;
+            const BST tint_symbol_8 = {7, -1, -1};
+            tree[4] = tint_symbol_8;
             x_189_phi = true;
             break;
           } else {
@@ -259,8 +259,8 @@
           const int x_174 = tree[x_173_save].rightIndex;
           if ((x_174 == -1)) {
             tree[x_173_save].rightIndex = 4;
-            const BST tint_symbol_10 = {7, -1, -1};
-            tree[4] = tint_symbol_10;
+            const BST tint_symbol_9 = {7, -1, -1};
+            tree[4] = tint_symbol_9;
             x_189_phi = true;
             break;
           } else {
@@ -308,8 +308,8 @@
           const int x_215 = tree[x_214_save].leftIndex;
           if ((x_215 == -1)) {
             tree[x_214_save].leftIndex = 5;
-            const BST tint_symbol_11 = {8, -1, -1};
-            tree[5] = tint_symbol_11;
+            const BST tint_symbol_10 = {8, -1, -1};
+            tree[5] = tint_symbol_10;
             x_222_phi = true;
             break;
           } else {
@@ -327,8 +327,8 @@
           const int x_207 = tree[x_206_save].rightIndex;
           if ((x_207 == -1)) {
             tree[x_206_save].rightIndex = 5;
-            const BST tint_symbol_12 = {8, -1, -1};
-            tree[5] = tint_symbol_12;
+            const BST tint_symbol_11 = {8, -1, -1};
+            tree[5] = tint_symbol_11;
             x_222_phi = true;
             break;
           } else {
@@ -376,8 +376,8 @@
           const int x_248 = tree[x_247_save].leftIndex;
           if ((x_248 == -1)) {
             tree[x_247_save].leftIndex = 6;
-            const BST tint_symbol_13 = {2, -1, -1};
-            tree[6] = tint_symbol_13;
+            const BST tint_symbol_12 = {2, -1, -1};
+            tree[6] = tint_symbol_12;
             x_255_phi = true;
             break;
           } else {
@@ -395,8 +395,8 @@
           const int x_240 = tree[x_239_save].rightIndex;
           if ((x_240 == -1)) {
             tree[x_239_save].rightIndex = 6;
-            const BST tint_symbol_14 = {2, -1, -1};
-            tree[6] = tint_symbol_14;
+            const BST tint_symbol_13 = {2, -1, -1};
+            tree[6] = tint_symbol_13;
             x_255_phi = true;
             break;
           } else {
@@ -444,8 +444,8 @@
           const int x_281 = tree[x_280_save].leftIndex;
           if ((x_281 == -1)) {
             tree[x_280_save].leftIndex = 7;
-            const BST tint_symbol_15 = {6, -1, -1};
-            tree[7] = tint_symbol_15;
+            const BST tint_symbol_14 = {6, -1, -1};
+            tree[7] = tint_symbol_14;
             x_288_phi = true;
             break;
           } else {
@@ -463,8 +463,8 @@
           const int x_273 = tree[x_272_save].rightIndex;
           if ((x_273 == -1)) {
             tree[x_272_save].rightIndex = 7;
-            const BST tint_symbol_16 = {6, -1, -1};
-            tree[7] = tint_symbol_16;
+            const BST tint_symbol_15 = {6, -1, -1};
+            tree[7] = tint_symbol_15;
             x_288_phi = true;
             break;
           } else {
@@ -512,8 +512,8 @@
           const int x_314 = tree[x_313_save].leftIndex;
           if ((x_314 == -1)) {
             tree[x_313_save].leftIndex = 8;
-            const BST tint_symbol_17 = {17, -1, -1};
-            tree[8] = tint_symbol_17;
+            const BST tint_symbol_16 = {17, -1, -1};
+            tree[8] = tint_symbol_16;
             x_321_phi = true;
             break;
           } else {
@@ -531,8 +531,8 @@
           const int x_306 = tree[x_305_save].rightIndex;
           if ((x_306 == -1)) {
             tree[x_305_save].rightIndex = 8;
-            const BST tint_symbol_18 = {17, -1, -1};
-            tree[8] = tint_symbol_18;
+            const BST tint_symbol_17 = {17, -1, -1};
+            tree[8] = tint_symbol_17;
             x_321_phi = true;
             break;
           } else {
@@ -580,8 +580,8 @@
           const int x_347 = tree[x_346_save].leftIndex;
           if ((x_347 == -1)) {
             tree[x_346_save].leftIndex = 9;
-            const BST tint_symbol_19 = {13, -1, -1};
-            tree[9] = tint_symbol_19;
+            const BST tint_symbol_18 = {13, -1, -1};
+            tree[9] = tint_symbol_18;
             x_354_phi = true;
             break;
           } else {
@@ -599,8 +599,8 @@
           const int x_339 = tree[x_338_save].rightIndex;
           if ((x_339 == -1)) {
             tree[x_338_save].rightIndex = 9;
-            const BST tint_symbol_20 = {13, -1, -1};
-            tree[9] = tint_symbol_20;
+            const BST tint_symbol_19 = {13, -1, -1};
+            tree[9] = tint_symbol_19;
             x_354_phi = true;
             break;
           } else {
@@ -742,9 +742,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_21;
+  const main_out tint_symbol_20 = {x_GLF_color};
+  return tint_symbol_20;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl
index 320cbdb..bb781cd 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl
@@ -16,7 +16,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_23) {
+void main_1(thread float4* const tint_symbol_22) {
   tint_array_wrapper tree = {};
   int x_360 = 0;
   int x_62_phi = 0;
@@ -24,8 +24,8 @@
   int x_357_phi = 0;
   int x_360_phi = 0;
   int x_362_phi = 0;
-  BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1};
-  tree.arr[0] = tint_symbol_3;
+  BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1};
+  tree.arr[0] = tint_symbol_2;
   switch(0u) {
     default: {
       x_62_phi = 0;
@@ -46,8 +46,8 @@
           int const x_83 = tree.arr[x_82_save].leftIndex;
           if ((x_83 == -1)) {
             tree.arr[x_82_save].leftIndex = 1;
-            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_4;
+            BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_3;
             x_90_phi = true;
             break;
           } else {
@@ -65,8 +65,8 @@
           int const x_75 = tree.arr[x_74_save].rightIndex;
           if ((x_75 == -1)) {
             tree.arr[x_74_save].rightIndex = 1;
-            BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_5;
+            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_4;
             x_90_phi = true;
             break;
           } else {
@@ -115,8 +115,8 @@
           int const x_116 = tree.arr[x_115_save].leftIndex;
           if ((x_116 == -1)) {
             tree.arr[x_115_save].leftIndex = 2;
-            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_6;
+            BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_5;
             x_123_phi = true;
             break;
           } else {
@@ -134,8 +134,8 @@
           int const x_108 = tree.arr[x_107_save].rightIndex;
           if ((x_108 == -1)) {
             tree.arr[x_107_save].rightIndex = 2;
-            BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_7;
+            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_6;
             x_123_phi = true;
             break;
           } else {
@@ -184,8 +184,8 @@
           int const x_149 = tree.arr[x_148_save].leftIndex;
           if ((x_149 == -1)) {
             tree.arr[x_148_save].leftIndex = 3;
-            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_8;
+            BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_7;
             x_156_phi = true;
             break;
           } else {
@@ -203,8 +203,8 @@
           int const x_141 = tree.arr[x_140_save].rightIndex;
           if ((x_141 == -1)) {
             tree.arr[x_140_save].rightIndex = 3;
-            BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_9;
+            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_8;
             x_156_phi = true;
             break;
           } else {
@@ -253,8 +253,8 @@
           int const x_182 = tree.arr[x_181_save].leftIndex;
           if ((x_182 == -1)) {
             tree.arr[x_181_save].leftIndex = 4;
-            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_10;
+            BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_9;
             x_189_phi = true;
             break;
           } else {
@@ -272,8 +272,8 @@
           int const x_174 = tree.arr[x_173_save].rightIndex;
           if ((x_174 == -1)) {
             tree.arr[x_173_save].rightIndex = 4;
-            BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_11;
+            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_10;
             x_189_phi = true;
             break;
           } else {
@@ -322,8 +322,8 @@
           int const x_215 = tree.arr[x_214_save].leftIndex;
           if ((x_215 == -1)) {
             tree.arr[x_214_save].leftIndex = 5;
-            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_12;
+            BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_11;
             x_222_phi = true;
             break;
           } else {
@@ -341,8 +341,8 @@
           int const x_207 = tree.arr[x_206_save].rightIndex;
           if ((x_207 == -1)) {
             tree.arr[x_206_save].rightIndex = 5;
-            BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_13;
+            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_12;
             x_222_phi = true;
             break;
           } else {
@@ -391,8 +391,8 @@
           int const x_248 = tree.arr[x_247_save].leftIndex;
           if ((x_248 == -1)) {
             tree.arr[x_247_save].leftIndex = 6;
-            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_14;
+            BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_13;
             x_255_phi = true;
             break;
           } else {
@@ -410,8 +410,8 @@
           int const x_240 = tree.arr[x_239_save].rightIndex;
           if ((x_240 == -1)) {
             tree.arr[x_239_save].rightIndex = 6;
-            BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_15;
+            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_14;
             x_255_phi = true;
             break;
           } else {
@@ -460,8 +460,8 @@
           int const x_281 = tree.arr[x_280_save].leftIndex;
           if ((x_281 == -1)) {
             tree.arr[x_280_save].leftIndex = 7;
-            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_16;
+            BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_15;
             x_288_phi = true;
             break;
           } else {
@@ -479,8 +479,8 @@
           int const x_273 = tree.arr[x_272_save].rightIndex;
           if ((x_273 == -1)) {
             tree.arr[x_272_save].rightIndex = 7;
-            BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_17;
+            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_16;
             x_288_phi = true;
             break;
           } else {
@@ -529,8 +529,8 @@
           int const x_314 = tree.arr[x_313_save].leftIndex;
           if ((x_314 == -1)) {
             tree.arr[x_313_save].leftIndex = 8;
-            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_18;
+            BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_17;
             x_321_phi = true;
             break;
           } else {
@@ -548,8 +548,8 @@
           int const x_306 = tree.arr[x_305_save].rightIndex;
           if ((x_306 == -1)) {
             tree.arr[x_305_save].rightIndex = 8;
-            BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_19;
+            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_18;
             x_321_phi = true;
             break;
           } else {
@@ -598,8 +598,8 @@
           int const x_347 = tree.arr[x_346_save].leftIndex;
           if ((x_347 == -1)) {
             tree.arr[x_346_save].leftIndex = 9;
-            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_20;
+            BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_19;
             x_354_phi = true;
             break;
           } else {
@@ -617,8 +617,8 @@
           int const x_339 = tree.arr[x_338_save].rightIndex;
           if ((x_339 == -1)) {
             tree.arr[x_338_save].rightIndex = 9;
-            BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_21;
+            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_20;
             x_354_phi = true;
             break;
           } else {
@@ -686,7 +686,7 @@
             x_393_phi = true;
             break;
           }
-          float const x_389 = (*(tint_symbol_23))[select(3u, 3u, (3u <= 3u))];
+          float const x_389 = (*(tint_symbol_22))[select(3u, 3u, (3u <= 3u))];
           {
             x_374_phi = select(x_383, x_385, !((x_362 <= x_382)));
           }
@@ -747,18 +747,24 @@
     }
   }
   if ((x_360 == as_type<int>(20))) {
-    *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_23) {
+  main_1(tint_symbol_23);
+  main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)};
+  return tint_symbol_21;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_24 = 0.0f;
-  main_1(&(tint_symbol_24));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24};
-  tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_22;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_24));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl
index 6b3b61f..0d62f20 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.hlsl
@@ -14,8 +14,8 @@
   int x_357_phi = 0;
   int x_360_phi = 0;
   int x_362_phi = 0;
-  const BST tint_symbol_2 = {9, -1, -1};
-  tree[0] = tint_symbol_2;
+  const BST tint_symbol_1 = {9, -1, -1};
+  tree[0] = tint_symbol_1;
   switch(0u) {
     default: {
       x_62_phi = 0;
@@ -36,8 +36,8 @@
           const int x_83 = tree[x_82_save].leftIndex;
           if ((x_83 == -1)) {
             tree[x_82_save].leftIndex = 1;
-            const BST tint_symbol_3 = {5, -1, -1};
-            tree[1] = tint_symbol_3;
+            const BST tint_symbol_2 = {5, -1, -1};
+            tree[1] = tint_symbol_2;
             x_90_phi = true;
             break;
           } else {
@@ -55,8 +55,8 @@
           const int x_75 = tree[x_74_save].rightIndex;
           if ((x_75 == -1)) {
             tree[x_74_save].rightIndex = 1;
-            const BST tint_symbol_4 = {5, -1, -1};
-            tree[1] = tint_symbol_4;
+            const BST tint_symbol_3 = {5, -1, -1};
+            tree[1] = tint_symbol_3;
             x_90_phi = true;
             break;
           } else {
@@ -104,8 +104,8 @@
           const int x_116 = tree[x_115_save].leftIndex;
           if ((x_116 == -1)) {
             tree[x_115_save].leftIndex = 2;
-            const BST tint_symbol_5 = {12, -1, -1};
-            tree[2] = tint_symbol_5;
+            const BST tint_symbol_4 = {12, -1, -1};
+            tree[2] = tint_symbol_4;
             x_123_phi = true;
             break;
           } else {
@@ -123,8 +123,8 @@
           const int x_108 = tree[x_107_save].rightIndex;
           if ((x_108 == -1)) {
             tree[x_107_save].rightIndex = 2;
-            const BST tint_symbol_6 = {12, -1, -1};
-            tree[2] = tint_symbol_6;
+            const BST tint_symbol_5 = {12, -1, -1};
+            tree[2] = tint_symbol_5;
             x_123_phi = true;
             break;
           } else {
@@ -172,8 +172,8 @@
           const int x_149 = tree[x_148_save].leftIndex;
           if ((x_149 == -1)) {
             tree[x_148_save].leftIndex = 3;
-            const BST tint_symbol_7 = {15, -1, -1};
-            tree[3] = tint_symbol_7;
+            const BST tint_symbol_6 = {15, -1, -1};
+            tree[3] = tint_symbol_6;
             x_156_phi = true;
             break;
           } else {
@@ -191,8 +191,8 @@
           const int x_141 = tree[x_140_save].rightIndex;
           if ((x_141 == -1)) {
             tree[x_140_save].rightIndex = 3;
-            const BST tint_symbol_8 = {15, -1, -1};
-            tree[3] = tint_symbol_8;
+            const BST tint_symbol_7 = {15, -1, -1};
+            tree[3] = tint_symbol_7;
             x_156_phi = true;
             break;
           } else {
@@ -240,8 +240,8 @@
           const int x_182 = tree[x_181_save].leftIndex;
           if ((x_182 == -1)) {
             tree[x_181_save].leftIndex = 4;
-            const BST tint_symbol_9 = {7, -1, -1};
-            tree[4] = tint_symbol_9;
+            const BST tint_symbol_8 = {7, -1, -1};
+            tree[4] = tint_symbol_8;
             x_189_phi = true;
             break;
           } else {
@@ -259,8 +259,8 @@
           const int x_174 = tree[x_173_save].rightIndex;
           if ((x_174 == -1)) {
             tree[x_173_save].rightIndex = 4;
-            const BST tint_symbol_10 = {7, -1, -1};
-            tree[4] = tint_symbol_10;
+            const BST tint_symbol_9 = {7, -1, -1};
+            tree[4] = tint_symbol_9;
             x_189_phi = true;
             break;
           } else {
@@ -308,8 +308,8 @@
           const int x_215 = tree[x_214_save].leftIndex;
           if ((x_215 == -1)) {
             tree[x_214_save].leftIndex = 5;
-            const BST tint_symbol_11 = {8, -1, -1};
-            tree[5] = tint_symbol_11;
+            const BST tint_symbol_10 = {8, -1, -1};
+            tree[5] = tint_symbol_10;
             x_222_phi = true;
             break;
           } else {
@@ -327,8 +327,8 @@
           const int x_207 = tree[x_206_save].rightIndex;
           if ((x_207 == -1)) {
             tree[x_206_save].rightIndex = 5;
-            const BST tint_symbol_12 = {8, -1, -1};
-            tree[5] = tint_symbol_12;
+            const BST tint_symbol_11 = {8, -1, -1};
+            tree[5] = tint_symbol_11;
             x_222_phi = true;
             break;
           } else {
@@ -376,8 +376,8 @@
           const int x_248 = tree[x_247_save].leftIndex;
           if ((x_248 == -1)) {
             tree[x_247_save].leftIndex = 6;
-            const BST tint_symbol_13 = {2, -1, -1};
-            tree[6] = tint_symbol_13;
+            const BST tint_symbol_12 = {2, -1, -1};
+            tree[6] = tint_symbol_12;
             x_255_phi = true;
             break;
           } else {
@@ -395,8 +395,8 @@
           const int x_240 = tree[x_239_save].rightIndex;
           if ((x_240 == -1)) {
             tree[x_239_save].rightIndex = 6;
-            const BST tint_symbol_14 = {2, -1, -1};
-            tree[6] = tint_symbol_14;
+            const BST tint_symbol_13 = {2, -1, -1};
+            tree[6] = tint_symbol_13;
             x_255_phi = true;
             break;
           } else {
@@ -444,8 +444,8 @@
           const int x_281 = tree[x_280_save].leftIndex;
           if ((x_281 == -1)) {
             tree[x_280_save].leftIndex = 7;
-            const BST tint_symbol_15 = {6, -1, -1};
-            tree[7] = tint_symbol_15;
+            const BST tint_symbol_14 = {6, -1, -1};
+            tree[7] = tint_symbol_14;
             x_288_phi = true;
             break;
           } else {
@@ -463,8 +463,8 @@
           const int x_273 = tree[x_272_save].rightIndex;
           if ((x_273 == -1)) {
             tree[x_272_save].rightIndex = 7;
-            const BST tint_symbol_16 = {6, -1, -1};
-            tree[7] = tint_symbol_16;
+            const BST tint_symbol_15 = {6, -1, -1};
+            tree[7] = tint_symbol_15;
             x_288_phi = true;
             break;
           } else {
@@ -512,8 +512,8 @@
           const int x_314 = tree[x_313_save].leftIndex;
           if ((x_314 == -1)) {
             tree[x_313_save].leftIndex = 8;
-            const BST tint_symbol_17 = {17, -1, -1};
-            tree[8] = tint_symbol_17;
+            const BST tint_symbol_16 = {17, -1, -1};
+            tree[8] = tint_symbol_16;
             x_321_phi = true;
             break;
           } else {
@@ -531,8 +531,8 @@
           const int x_306 = tree[x_305_save].rightIndex;
           if ((x_306 == -1)) {
             tree[x_305_save].rightIndex = 8;
-            const BST tint_symbol_18 = {17, -1, -1};
-            tree[8] = tint_symbol_18;
+            const BST tint_symbol_17 = {17, -1, -1};
+            tree[8] = tint_symbol_17;
             x_321_phi = true;
             break;
           } else {
@@ -580,8 +580,8 @@
           const int x_347 = tree[x_346_save].leftIndex;
           if ((x_347 == -1)) {
             tree[x_346_save].leftIndex = 9;
-            const BST tint_symbol_19 = {13, -1, -1};
-            tree[9] = tint_symbol_19;
+            const BST tint_symbol_18 = {13, -1, -1};
+            tree[9] = tint_symbol_18;
             x_354_phi = true;
             break;
           } else {
@@ -599,8 +599,8 @@
           const int x_339 = tree[x_338_save].rightIndex;
           if ((x_339 == -1)) {
             tree[x_338_save].rightIndex = 9;
-            const BST tint_symbol_20 = {13, -1, -1};
-            tree[9] = tint_symbol_20;
+            const BST tint_symbol_19 = {13, -1, -1};
+            tree[9] = tint_symbol_19;
             x_354_phi = true;
             break;
           } else {
@@ -742,9 +742,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_21;
+  const main_out tint_symbol_20 = {x_GLF_color};
+  return tint_symbol_20;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl
index 320cbdb..bb781cd 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl
@@ -16,7 +16,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_23) {
+void main_1(thread float4* const tint_symbol_22) {
   tint_array_wrapper tree = {};
   int x_360 = 0;
   int x_62_phi = 0;
@@ -24,8 +24,8 @@
   int x_357_phi = 0;
   int x_360_phi = 0;
   int x_362_phi = 0;
-  BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1};
-  tree.arr[0] = tint_symbol_3;
+  BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1};
+  tree.arr[0] = tint_symbol_2;
   switch(0u) {
     default: {
       x_62_phi = 0;
@@ -46,8 +46,8 @@
           int const x_83 = tree.arr[x_82_save].leftIndex;
           if ((x_83 == -1)) {
             tree.arr[x_82_save].leftIndex = 1;
-            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_4;
+            BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_3;
             x_90_phi = true;
             break;
           } else {
@@ -65,8 +65,8 @@
           int const x_75 = tree.arr[x_74_save].rightIndex;
           if ((x_75 == -1)) {
             tree.arr[x_74_save].rightIndex = 1;
-            BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_5;
+            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_4;
             x_90_phi = true;
             break;
           } else {
@@ -115,8 +115,8 @@
           int const x_116 = tree.arr[x_115_save].leftIndex;
           if ((x_116 == -1)) {
             tree.arr[x_115_save].leftIndex = 2;
-            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_6;
+            BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_5;
             x_123_phi = true;
             break;
           } else {
@@ -134,8 +134,8 @@
           int const x_108 = tree.arr[x_107_save].rightIndex;
           if ((x_108 == -1)) {
             tree.arr[x_107_save].rightIndex = 2;
-            BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_7;
+            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_6;
             x_123_phi = true;
             break;
           } else {
@@ -184,8 +184,8 @@
           int const x_149 = tree.arr[x_148_save].leftIndex;
           if ((x_149 == -1)) {
             tree.arr[x_148_save].leftIndex = 3;
-            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_8;
+            BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_7;
             x_156_phi = true;
             break;
           } else {
@@ -203,8 +203,8 @@
           int const x_141 = tree.arr[x_140_save].rightIndex;
           if ((x_141 == -1)) {
             tree.arr[x_140_save].rightIndex = 3;
-            BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_9;
+            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_8;
             x_156_phi = true;
             break;
           } else {
@@ -253,8 +253,8 @@
           int const x_182 = tree.arr[x_181_save].leftIndex;
           if ((x_182 == -1)) {
             tree.arr[x_181_save].leftIndex = 4;
-            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_10;
+            BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_9;
             x_189_phi = true;
             break;
           } else {
@@ -272,8 +272,8 @@
           int const x_174 = tree.arr[x_173_save].rightIndex;
           if ((x_174 == -1)) {
             tree.arr[x_173_save].rightIndex = 4;
-            BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_11;
+            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_10;
             x_189_phi = true;
             break;
           } else {
@@ -322,8 +322,8 @@
           int const x_215 = tree.arr[x_214_save].leftIndex;
           if ((x_215 == -1)) {
             tree.arr[x_214_save].leftIndex = 5;
-            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_12;
+            BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_11;
             x_222_phi = true;
             break;
           } else {
@@ -341,8 +341,8 @@
           int const x_207 = tree.arr[x_206_save].rightIndex;
           if ((x_207 == -1)) {
             tree.arr[x_206_save].rightIndex = 5;
-            BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_13;
+            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_12;
             x_222_phi = true;
             break;
           } else {
@@ -391,8 +391,8 @@
           int const x_248 = tree.arr[x_247_save].leftIndex;
           if ((x_248 == -1)) {
             tree.arr[x_247_save].leftIndex = 6;
-            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_14;
+            BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_13;
             x_255_phi = true;
             break;
           } else {
@@ -410,8 +410,8 @@
           int const x_240 = tree.arr[x_239_save].rightIndex;
           if ((x_240 == -1)) {
             tree.arr[x_239_save].rightIndex = 6;
-            BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_15;
+            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_14;
             x_255_phi = true;
             break;
           } else {
@@ -460,8 +460,8 @@
           int const x_281 = tree.arr[x_280_save].leftIndex;
           if ((x_281 == -1)) {
             tree.arr[x_280_save].leftIndex = 7;
-            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_16;
+            BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_15;
             x_288_phi = true;
             break;
           } else {
@@ -479,8 +479,8 @@
           int const x_273 = tree.arr[x_272_save].rightIndex;
           if ((x_273 == -1)) {
             tree.arr[x_272_save].rightIndex = 7;
-            BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_17;
+            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_16;
             x_288_phi = true;
             break;
           } else {
@@ -529,8 +529,8 @@
           int const x_314 = tree.arr[x_313_save].leftIndex;
           if ((x_314 == -1)) {
             tree.arr[x_313_save].leftIndex = 8;
-            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_18;
+            BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_17;
             x_321_phi = true;
             break;
           } else {
@@ -548,8 +548,8 @@
           int const x_306 = tree.arr[x_305_save].rightIndex;
           if ((x_306 == -1)) {
             tree.arr[x_305_save].rightIndex = 8;
-            BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_19;
+            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_18;
             x_321_phi = true;
             break;
           } else {
@@ -598,8 +598,8 @@
           int const x_347 = tree.arr[x_346_save].leftIndex;
           if ((x_347 == -1)) {
             tree.arr[x_346_save].leftIndex = 9;
-            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_20;
+            BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_19;
             x_354_phi = true;
             break;
           } else {
@@ -617,8 +617,8 @@
           int const x_339 = tree.arr[x_338_save].rightIndex;
           if ((x_339 == -1)) {
             tree.arr[x_338_save].rightIndex = 9;
-            BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_21;
+            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_20;
             x_354_phi = true;
             break;
           } else {
@@ -686,7 +686,7 @@
             x_393_phi = true;
             break;
           }
-          float const x_389 = (*(tint_symbol_23))[select(3u, 3u, (3u <= 3u))];
+          float const x_389 = (*(tint_symbol_22))[select(3u, 3u, (3u <= 3u))];
           {
             x_374_phi = select(x_383, x_385, !((x_362 <= x_382)));
           }
@@ -747,18 +747,24 @@
     }
   }
   if ((x_360 == as_type<int>(20))) {
-    *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_23) {
+  main_1(tint_symbol_23);
+  main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)};
+  return tint_symbol_21;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_24 = 0.0f;
-  main_1(&(tint_symbol_24));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24};
-  tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_22;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_24));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl
index 0326a9c..038d8ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.hlsl
@@ -29,8 +29,8 @@
       break;
     }
     float4 x_98 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-    const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-    x_77 = tint_symbol_5;
+    const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+    x_77 = tint_symbol_4;
     x_98 = x_77[x_92];
     switch(0u) {
       default: {
@@ -61,14 +61,14 @@
     const bool x_121 = x_121_phi;
     x_90_phi = x_89;
     if (x_121) {
-      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_78 = tint_symbol_6;
+      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_78 = tint_symbol_5;
       const float x_125 = x_78[x_92].x;
-      const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_79 = tint_symbol_7;
+      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_79 = tint_symbol_6;
       const float x_128 = x_79[x_92].y;
-      const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-      x_80 = tint_symbol_8;
+      const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+      x_80 = tint_symbol_7;
       x_136 = x_80[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)];
       x_90_phi = x_136;
     }
@@ -93,11 +93,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl
index 2d12628..6e79a07 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   tint_array_wrapper x_77 = {};
   tint_array_wrapper x_78 = {};
   tint_array_wrapper x_79 = {};
@@ -25,7 +25,7 @@
   float4 x_89 = 0.0f;
   float4 x_89_phi = 0.0f;
   int x_92_phi = 0;
-  float4 const x_81 = *(tint_symbol_9);
+  float4 const x_81 = *(tint_symbol_7);
   float2 const x_84 = x_6.resolution;
   float2 const x_87 = floor(((float2(x_81.x, x_81.y) / x_84) * 32.0f));
   x_89_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
@@ -42,8 +42,8 @@
       break;
     }
     float4 x_98 = 0.0f;
-    tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    x_77 = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    x_77 = tint_symbol_2;
     x_98 = x_77.arr[x_92];
     switch(0u) {
       default: {
@@ -74,14 +74,14 @@
     bool const x_121 = x_121_phi;
     x_90_phi = x_89;
     if (x_121) {
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_78 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_78 = tint_symbol_3;
       float const x_125 = x_78.arr[x_92].x;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_79 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_79 = tint_symbol_4;
       float const x_128 = x_79.arr[x_92].y;
-      tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      x_80 = tint_symbol_7;
+      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      x_80 = tint_symbol_5;
       x_136 = x_80.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_125)) * as_type<uint>(int(x_128))))) + as_type<uint>(as_type<int>((as_type<uint>(x_92) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       x_90_phi = x_136;
     }
@@ -92,17 +92,23 @@
       x_92_phi = x_93;
     }
   }
-  *(tint_symbol_10) = x_89;
+  *(tint_symbol_8) = x_89;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl
index 0326a9c..038d8ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.hlsl
@@ -29,8 +29,8 @@
       break;
     }
     float4 x_98 = float4(0.0f, 0.0f, 0.0f, 0.0f);
-    const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-    x_77 = tint_symbol_5;
+    const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+    x_77 = tint_symbol_4;
     x_98 = x_77[x_92];
     switch(0u) {
       default: {
@@ -61,14 +61,14 @@
     const bool x_121 = x_121_phi;
     x_90_phi = x_89;
     if (x_121) {
-      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_78 = tint_symbol_6;
+      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_78 = tint_symbol_5;
       const float x_125 = x_78[x_92].x;
-      const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_79 = tint_symbol_7;
+      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_79 = tint_symbol_6;
       const float x_128 = x_79[x_92].y;
-      const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-      x_80 = tint_symbol_8;
+      const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+      x_80 = tint_symbol_7;
       x_136 = x_80[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)];
       x_90_phi = x_136;
     }
@@ -93,11 +93,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl
index 2d12628..6e79a07 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   tint_array_wrapper x_77 = {};
   tint_array_wrapper x_78 = {};
   tint_array_wrapper x_79 = {};
@@ -25,7 +25,7 @@
   float4 x_89 = 0.0f;
   float4 x_89_phi = 0.0f;
   int x_92_phi = 0;
-  float4 const x_81 = *(tint_symbol_9);
+  float4 const x_81 = *(tint_symbol_7);
   float2 const x_84 = x_6.resolution;
   float2 const x_87 = floor(((float2(x_81.x, x_81.y) / x_84) * 32.0f));
   x_89_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
@@ -42,8 +42,8 @@
       break;
     }
     float4 x_98 = 0.0f;
-    tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    x_77 = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    x_77 = tint_symbol_2;
     x_98 = x_77.arr[x_92];
     switch(0u) {
       default: {
@@ -74,14 +74,14 @@
     bool const x_121 = x_121_phi;
     x_90_phi = x_89;
     if (x_121) {
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_78 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_78 = tint_symbol_3;
       float const x_125 = x_78.arr[x_92].x;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_79 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_79 = tint_symbol_4;
       float const x_128 = x_79.arr[x_92].y;
-      tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      x_80 = tint_symbol_7;
+      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      x_80 = tint_symbol_5;
       x_136 = x_80.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_125)) * as_type<uint>(int(x_128))))) + as_type<uint>(as_type<int>((as_type<uint>(x_92) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       x_90_phi = x_136;
     }
@@ -92,17 +92,23 @@
       x_92_phi = x_93;
     }
   }
-  *(tint_symbol_10) = x_89;
+  *(tint_symbol_8) = x_89;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl
index 9998415..60a3f69 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.hlsl
@@ -31,11 +31,11 @@
       x_72_phi = x_73;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_80[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_80;
   const float2 x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   const float4 x_83 = indexable[asint((x_69 % 16))];
@@ -53,11 +53,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl
index 5761e9d..44b0187 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   tint_array_wrapper indexable = {};
   int x_69 = 0;
   int x_69_phi = 0;
   int x_72_phi = 0;
-  float4 const x_55 = *(tint_symbol_7);
+  float4 const x_55 = *(tint_symbol_5);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (float2(x_55.x, x_55.y) / x_58);
   int const x_67 = as_type<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
@@ -41,25 +41,31 @@
       x_72_phi = x_73;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_80 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_80;
   float2 const x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   float4 const x_83 = indexable.arr[as_type<int>((x_69 % 16))];
-  *(tint_symbol_8) = x_83;
+  *(tint_symbol_6) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl
index 9998415..60a3f69 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.hlsl
@@ -31,11 +31,11 @@
       x_72_phi = x_73;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_80[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_80;
   const float2 x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   const float4 x_83 = indexable[asint((x_69 % 16))];
@@ -53,11 +53,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl
index 5761e9d..44b0187 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   tint_array_wrapper indexable = {};
   int x_69 = 0;
   int x_69_phi = 0;
   int x_72_phi = 0;
-  float4 const x_55 = *(tint_symbol_7);
+  float4 const x_55 = *(tint_symbol_5);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (float2(x_55.x, x_55.y) / x_58);
   int const x_67 = as_type<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
@@ -41,25 +41,31 @@
       x_72_phi = x_73;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_80 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_80;
   float2 const x_81 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   float4 const x_83 = indexable.arr[as_type<int>((x_69 % 16))];
-  *(tint_symbol_8) = x_83;
+  *(tint_symbol_6) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl
index ac6e8e0..7838ecc 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.hlsl
@@ -31,8 +31,8 @@
       x_72_phi = x_73;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float2 x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   const float4 x_82 = indexable[asint((x_69 % 16))];
   x_GLF_color = x_82;
@@ -49,11 +49,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl
index 1a7dc71..a31a704 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_69 = 0;
   int x_69_phi = 0;
   int x_72_phi = 0;
-  float4 const x_55 = *(tint_symbol_6);
+  float4 const x_55 = *(tint_symbol_4);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (float2(x_55.x, x_55.y) / x_58);
   int const x_67 = as_type<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
@@ -41,21 +41,27 @@
       x_72_phi = x_73;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float2 const x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   float4 const x_82 = indexable.arr[as_type<int>((x_69 % 16))];
-  *(tint_symbol_7) = x_82;
+  *(tint_symbol_5) = x_82;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl
index ac6e8e0..7838ecc 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.hlsl
@@ -31,8 +31,8 @@
       x_72_phi = x_73;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float2 x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   const float4 x_82 = indexable[asint((x_69 % 16))];
   x_GLF_color = x_82;
@@ -49,11 +49,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl
index 1a7dc71..a31a704 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_69 = 0;
   int x_69_phi = 0;
   int x_72_phi = 0;
-  float4 const x_55 = *(tint_symbol_6);
+  float4 const x_55 = *(tint_symbol_4);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (float2(x_55.x, x_55.y) / x_58);
   int const x_67 = as_type<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
@@ -41,21 +41,27 @@
       x_72_phi = x_73;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float2 const x_80 = float2(float4(0.0f, 1.0f, 0.0f, 1.0f).y, float4(0.5f, 0.0f, 0.5f, 1.0f).x);
   float4 const x_82 = indexable.arr[as_type<int>((x_69 % 16))];
-  *(tint_symbol_7) = x_82;
+  *(tint_symbol_5) = x_82;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl
index 5ff3989..f84cad3 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.hlsl
@@ -95,11 +95,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl
index c8ec7ec..7440769 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl
@@ -13,13 +13,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) {
+bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) {
   bool x_144 = false;
-  float const x_146 = (*(tint_symbol_5)).y;
+  float const x_146 = (*(tint_symbol_3)).y;
   float const x_148 = x_9.resolution.y;
   if ((x_146 < (x_148 / 2.0f))) {
     float const x_154 = *(a);
@@ -34,7 +34,7 @@
   return x_160;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i = 0;
   tint_array_wrapper data = {};
   int i_1 = 0;
@@ -88,7 +88,7 @@
       param = x_92;
       float const x_94 = data.arr[x_90];
       param_1 = x_94;
-      bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6);
+      bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4);
       doSwap = x_95;
       bool const x_96 = doSwap;
       if (x_96) {
@@ -113,29 +113,35 @@
       i_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
     }
   }
-  float const x_115 = (*(tint_symbol_6)).x;
+  float const x_115 = (*(tint_symbol_4)).x;
   float const x_117 = x_9.resolution.x;
   if ((x_115 < (x_117 / 2.0f))) {
     float const x_124 = data.arr[0];
     float const x_127 = data.arr[5];
     float const x_130 = data.arr[9];
-    *(tint_symbol_7) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f);
   } else {
     float const x_134 = data.arr[5];
     float const x_137 = data.arr[9];
     float const x_140 = data.arr[0];
-    *(tint_symbol_7) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_13, x_9, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl
index 5ff3989..f84cad3 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.hlsl
@@ -95,11 +95,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl
index c8ec7ec..7440769 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl
@@ -13,13 +13,13 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) {
+bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) {
   bool x_144 = false;
-  float const x_146 = (*(tint_symbol_5)).y;
+  float const x_146 = (*(tint_symbol_3)).y;
   float const x_148 = x_9.resolution.y;
   if ((x_146 < (x_148 / 2.0f))) {
     float const x_154 = *(a);
@@ -34,7 +34,7 @@
   return x_160;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i = 0;
   tint_array_wrapper data = {};
   int i_1 = 0;
@@ -88,7 +88,7 @@
       param = x_92;
       float const x_94 = data.arr[x_90];
       param_1 = x_94;
-      bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6);
+      bool const x_95 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4);
       doSwap = x_95;
       bool const x_96 = doSwap;
       if (x_96) {
@@ -113,29 +113,35 @@
       i_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
     }
   }
-  float const x_115 = (*(tint_symbol_6)).x;
+  float const x_115 = (*(tint_symbol_4)).x;
   float const x_117 = x_9.resolution.x;
   if ((x_115 < (x_117 / 2.0f))) {
     float const x_124 = data.arr[0];
     float const x_127 = data.arr[5];
     float const x_130 = data.arr[9];
-    *(tint_symbol_7) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_124 / 10.0f), (x_127 / 10.0f), (x_130 / 10.0f), 1.0f);
   } else {
     float const x_134 = data.arr[5];
     float const x_137 = data.arr[9];
     float const x_140 = data.arr[0];
-    *(tint_symbol_7) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_134 / 10.0f), (x_137 / 10.0f), (x_140 / 10.0f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_13, x_9, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl
index 8afa23d..9f00d01 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.hlsl
@@ -151,11 +151,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl
index 9d94669..dd5350a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) {
+bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) {
   bool x_147 = false;
   float x_158 = 0.0f;
   float x_159 = 0.0f;
@@ -28,7 +28,7 @@
   float x_160_phi = 0.0f;
   float x_180_phi = 0.0f;
   float x_186_phi = 0.0f;
-  float const x_149 = (*(tint_symbol_5)).y;
+  float const x_149 = (*(tint_symbol_3)).y;
   float const x_151 = x_9.resolution.y;
   bool const x_153 = (x_149 < (x_151 / 2.0f));
   if (x_153) {
@@ -91,7 +91,7 @@
   return x_191;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i = 0;
   tint_array_wrapper data = {};
   int i_1 = 0;
@@ -145,7 +145,7 @@
       param = x_95;
       float const x_97 = data.arr[x_93];
       param_1 = x_97;
-      bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6);
+      bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4);
       doSwap = x_98;
       bool const x_99 = doSwap;
       if (x_99) {
@@ -170,29 +170,35 @@
       i_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(1)));
     }
   }
-  float const x_118 = (*(tint_symbol_6)).x;
+  float const x_118 = (*(tint_symbol_4)).x;
   float const x_120 = x_9.resolution.x;
   if ((x_118 < (x_120 / 2.0f))) {
     float const x_127 = data.arr[0];
     float const x_130 = data.arr[5];
     float const x_133 = data.arr[9];
-    *(tint_symbol_7) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f);
   } else {
     float const x_137 = data.arr[5];
     float const x_140 = data.arr[9];
     float const x_143 = data.arr[0];
-    *(tint_symbol_7) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_13, x_9, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl
index 8afa23d..9f00d01 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.hlsl
@@ -151,11 +151,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl
index 9d94669..dd5350a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_5) {
+bool checkSwap_f1_f1_(constant buf1& x_9, thread float* const a, thread float* const b, thread float4* const tint_symbol_3) {
   bool x_147 = false;
   float x_158 = 0.0f;
   float x_159 = 0.0f;
@@ -28,7 +28,7 @@
   float x_160_phi = 0.0f;
   float x_180_phi = 0.0f;
   float x_186_phi = 0.0f;
-  float const x_149 = (*(tint_symbol_5)).y;
+  float const x_149 = (*(tint_symbol_3)).y;
   float const x_151 = x_9.resolution.y;
   bool const x_153 = (x_149 < (x_151 / 2.0f));
   if (x_153) {
@@ -91,7 +91,7 @@
   return x_191;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int i = 0;
   tint_array_wrapper data = {};
   int i_1 = 0;
@@ -145,7 +145,7 @@
       param = x_95;
       float const x_97 = data.arr[x_93];
       param_1 = x_97;
-      bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_6);
+      bool const x_98 = checkSwap_f1_f1_(x_9, &(param), &(param_1), tint_symbol_4);
       doSwap = x_98;
       bool const x_99 = doSwap;
       if (x_99) {
@@ -170,29 +170,35 @@
       i_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(1)));
     }
   }
-  float const x_118 = (*(tint_symbol_6)).x;
+  float const x_118 = (*(tint_symbol_4)).x;
   float const x_120 = x_9.resolution.x;
   if ((x_118 < (x_120 / 2.0f))) {
     float const x_127 = data.arr[0];
     float const x_130 = data.arr[5];
     float const x_133 = data.arr[9];
-    *(tint_symbol_7) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_127 / 10.0f), (x_130 / 10.0f), (x_133 / 10.0f), 1.0f);
   } else {
     float const x_137 = data.arr[5];
     float const x_140 = data.arr[9];
     float const x_143 = data.arr[0];
-    *(tint_symbol_7) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f);
+    *(tint_symbol_5) = float4((x_137 / 10.0f), (x_140 / 10.0f), (x_143 / 10.0f), 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_9, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_13, x_9, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_13, x_9, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_9, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl
index 74ac34a..38242ee 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.hlsl
@@ -38,8 +38,8 @@
       x_68_phi = x_69;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_83 = indexable[asint((x_65 % 16))];
   x_GLF_color = x_83;
   return;
@@ -55,11 +55,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl
index 561b2f2..a2c1a5f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_65 = 0;
   int x_65_phi = 0;
   int x_68_phi = 0;
-  float4 const x_51 = *(tint_symbol_6);
+  float4 const x_51 = *(tint_symbol_4);
   float2 const x_54 = x_6.resolution;
   float2 const x_57 = floor(((float2(x_51.x, x_51.y) / x_54) * 8.0f));
   int const x_63 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_57.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_57.y))));
@@ -48,20 +48,26 @@
       x_68_phi = x_69;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_83 = indexable.arr[as_type<int>((x_65 % 16))];
-  *(tint_symbol_7) = x_83;
+  *(tint_symbol_5) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl
index 74ac34a..38242ee 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.hlsl
@@ -38,8 +38,8 @@
       x_68_phi = x_69;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_83 = indexable[asint((x_65 % 16))];
   x_GLF_color = x_83;
   return;
@@ -55,11 +55,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl
index 561b2f2..a2c1a5f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int x_65 = 0;
   int x_65_phi = 0;
   int x_68_phi = 0;
-  float4 const x_51 = *(tint_symbol_6);
+  float4 const x_51 = *(tint_symbol_4);
   float2 const x_54 = x_6.resolution;
   float2 const x_57 = floor(((float2(x_51.x, x_51.y) / x_54) * 8.0f));
   int const x_63 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_57.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_57.y))));
@@ -48,20 +48,26 @@
       x_68_phi = x_69;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_83 = indexable.arr[as_type<int>((x_65 % 16))];
-  *(tint_symbol_7) = x_83;
+  *(tint_symbol_5) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl
index 5df85e4..092c154 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.hlsl
@@ -40,14 +40,14 @@
       x_74_phi = x_75;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_88[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_88;
-  const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)};
-  const float4 x_89 = tint_symbol_7[1u];
+  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)};
+  const float4 x_89 = tint_symbol_6[1u];
   const float4 x_90[16] = {float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)};
   const float4 x_92 = indexable[asint((x_71 % 16))];
   x_GLF_color = x_92;
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl
index 9a040b1..59a5904 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper indexable = {};
   int x_71 = 0;
   int x_71_phi = 0;
   int x_74_phi = 0;
-  float4 const x_54 = *(tint_symbol_8);
+  float4 const x_54 = *(tint_symbol_6);
   float2 const x_55 = float2(x_54.x, x_54.y);
   float2 const x_58 = x_6.resolution;
   float2 const x_61 = ((x_55 / x_58) * 8.0f);
@@ -50,27 +50,33 @@
       x_74_phi = x_75;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_88 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_88;
-  tint_array_wrapper const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}};
-  float4 const x_89 = tint_symbol_6.arr[1u];
+  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}};
+  float4 const x_89 = tint_symbol_4.arr[1u];
   tint_array_wrapper const x_90 = {.arr={float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}};
   float4 const x_92 = indexable.arr[as_type<int>((x_71 % 16))];
-  *(tint_symbol_9) = x_92;
+  *(tint_symbol_7) = x_92;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl
index 5df85e4..092c154 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.hlsl
@@ -40,14 +40,14 @@
       x_74_phi = x_75;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_88[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_88;
-  const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)};
-  const float4 x_89 = tint_symbol_7[1u];
+  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)};
+  const float4 x_89 = tint_symbol_6[1u];
   const float4 x_90[16] = {float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)};
   const float4 x_92 = indexable[asint((x_71 % 16))];
   x_GLF_color = x_92;
@@ -64,11 +64,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl
index 9a040b1..59a5904 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl
@@ -10,16 +10,16 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper indexable = {};
   int x_71 = 0;
   int x_71_phi = 0;
   int x_74_phi = 0;
-  float4 const x_54 = *(tint_symbol_8);
+  float4 const x_54 = *(tint_symbol_6);
   float2 const x_55 = float2(x_54.x, x_54.y);
   float2 const x_58 = x_6.resolution;
   float2 const x_61 = ((x_55 / x_58) * 8.0f);
@@ -50,27 +50,33 @@
       x_74_phi = x_75;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_88 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_88;
-  tint_array_wrapper const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}};
-  float4 const x_89 = tint_symbol_6.arr[1u];
+  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}};
+  float4 const x_89 = tint_symbol_4.arr[1u];
   tint_array_wrapper const x_90 = {.arr={float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}};
   float4 const x_92 = indexable.arr[as_type<int>((x_71 % 16))];
-  *(tint_symbol_9) = x_92;
+  *(tint_symbol_7) = x_92;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl
index 0b4750a..ff80e2f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.hlsl
@@ -192,11 +192,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl
index 3576345..685b2ff 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_51 = 0.0f;
   float x_55 = 0.0f;
@@ -31,7 +31,7 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_47 = x_7.resolution.x;
   float const x_49 = rint((x_47 * 0.125f));
-  x_51 = (*(tint_symbol_5)).x;
+  x_51 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_55_phi = -0.5f;
@@ -98,7 +98,7 @@
   bool x_120_phi = false;
   float const x_85 = x_85_phi;
   c.x = x_85;
-  x_88 = (*(tint_symbol_5)).y;
+  x_88 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       x_92_phi = -0.5f;
@@ -182,17 +182,23 @@
   }
   float3 const x_143 = c;
   float3 const x_145 = normalize(fabs(x_143));
-  *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
+  *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl
index 3102fad..fec7d26 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.hlsl
@@ -192,11 +192,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl
index e986722..661207d 100755
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl
@@ -7,11 +7,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_51 = 0.0f;
   float x_55 = 0.0f;
@@ -31,7 +31,7 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_47 = x_7.resolution.x;
   float const x_49 = rint((x_47 * 0.125f));
-  x_51 = (*(tint_symbol_5)).x;
+  x_51 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_55_phi = -0.5f;
@@ -98,7 +98,7 @@
   bool x_120_phi = false;
   float const x_85 = x_85_phi;
   c.x = x_85;
-  x_88 = (*(tint_symbol_5)).y;
+  x_88 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       x_92_phi = -0.5f;
@@ -182,17 +182,23 @@
   }
   float3 const x_143 = c;
   float3 const x_145 = normalize(fabs(x_143));
-  *(tint_symbol_6) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
+  *(tint_symbol_4) = float4(x_145.x, x_145.y, x_145.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl
index 0505c28..1c4efe4 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.hlsl
@@ -201,14 +201,14 @@
         x_303 = map;
         x_305_phi = x_303;
       } else {
-        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        x_304 = tint_symbol_5;
+        const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        x_304 = tint_symbol_4;
         x_305_phi = x_304;
       }
       const int x_305[256] = x_305_phi;
       if (x_282) {
-        const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_6;
+        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_5;
       }
       if (x_282) {
         map = x_305;
@@ -232,8 +232,8 @@
         const int x_341 = p.x;
         const int x_343 = p.y;
         const int x_345[256] = map;
-        const int tint_symbol_7[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_7;
+        const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_6;
         map = x_345;
         map[(x_341 + ((x_343 - 2) * 16))] = 1;
         const int x_350 = p.y;
@@ -328,11 +328,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl
index 51be36d..e567765 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -24,7 +24,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_59 = *(tint_symbol_8);
+  float4 const x_59 = *(tint_symbol_6);
   float2 const x_62 = x_7.resolution;
   pos = (float2(x_59.x, x_59.y) / x_62);
   float const x_65 = pos.x;
@@ -38,7 +38,7 @@
       break;
     }
     int const x_80 = i;
-    (*(tint_symbol_9)).arr[x_80] = 0;
+    (*(tint_symbol_7)).arr[x_80] = 0;
     {
       int const x_82 = i;
       i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
@@ -65,7 +65,7 @@
     if (x_92) {
       int const x_96 = p.x;
       int const x_99 = p.y;
-      int const x_103 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
+      int const x_103 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
       x_104 = (x_103 == 0);
       x_105_phi = x_104;
     }
@@ -80,7 +80,7 @@
     if (x_112) {
       int const x_116 = p.x;
       int const x_118 = p.y;
-      int const x_123 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_123 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_124 = (x_123 == 0);
       x_125_phi = x_124;
     }
@@ -95,7 +95,7 @@
     if (x_132) {
       int const x_136 = p.x;
       int const x_139 = p.y;
-      int const x_143 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
+      int const x_143 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
       x_144 = (x_143 == 0);
       x_145_phi = x_144;
     }
@@ -110,7 +110,7 @@
     if (x_152) {
       int const x_156 = p.x;
       int const x_158 = p.y;
-      int const x_163 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_163 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_164 = (x_163 == 0);
       x_165_phi = x_164;
     }
@@ -164,7 +164,7 @@
           }
           int const x_189 = j;
           int const x_191 = i;
-          int const x_196 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_196 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_196 == 0)) {
             int const x_200 = j;
             p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
@@ -184,7 +184,7 @@
       }
       int const x_211 = p.x;
       int const x_213 = p.y;
-      (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_217 = v;
       int const x_218 = directions;
@@ -205,7 +205,7 @@
       if (x_230) {
         int const x_234 = p.x;
         int const x_237 = p.y;
-        int const x_241 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
+        int const x_241 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
         x_242 = (x_241 == 0);
         x_243_phi = x_242;
       }
@@ -215,13 +215,13 @@
         d = as_type<int>((as_type<uint>(x_246) - as_type<uint>(1)));
         int const x_249 = p.x;
         int const x_251 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
         int const x_256 = p.x;
         int const x_259 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
         int const x_264 = p.x;
         int const x_267 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
         int const x_272 = p.x;
         p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
       }
@@ -252,23 +252,23 @@
       int const x_297 = x_297_phi;
       int const x_299 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_297) - as_type<uint>(2)))) * as_type<uint>(16)));
       if (x_282) {
-        x_303 = *(tint_symbol_9);
+        x_303 = *(tint_symbol_7);
         x_305_phi = x_303;
       } else {
-        tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        x_304 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        x_304 = tint_symbol_2;
         x_305_phi = x_304;
       }
       tint_array_wrapper const x_305 = x_305_phi;
       if (x_282) {
-        tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_9) = tint_symbol_5;
+        tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_7) = tint_symbol_3;
       }
       if (x_282) {
-        *(tint_symbol_9) = x_305;
+        *(tint_symbol_7) = x_305;
       }
       if (x_282) {
-        x_315 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_290) + as_type<uint>(x_299)))];
+        x_315 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_290) + as_type<uint>(x_299)))];
         x_317_phi = x_315;
       } else {
         x_316 = 0;
@@ -281,17 +281,17 @@
         d = as_type<int>((as_type<uint>(x_323) - as_type<uint>(1)));
         int const x_326 = p.x;
         int const x_328 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_326) + as_type<uint>(as_type<int>((as_type<uint>(x_328) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_326) + as_type<uint>(as_type<int>((as_type<uint>(x_328) * as_type<uint>(16))))))] = 1;
         int const x_333 = p.x;
         int const x_335 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_335) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_335) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_341 = p.x;
         int const x_343 = p.y;
-        tint_array_wrapper const x_345 = *(tint_symbol_9);
-        tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_9) = tint_symbol_6;
-        *(tint_symbol_9) = x_345;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_341) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_343) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        tint_array_wrapper const x_345 = *(tint_symbol_7);
+        tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_7) = tint_symbol_4;
+        *(tint_symbol_7) = x_345;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_341) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_343) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_350 = p.y;
         p.y = as_type<int>((as_type<uint>(x_350) - as_type<uint>(2)));
       }
@@ -308,7 +308,7 @@
       if (x_360) {
         int const x_364 = p.x;
         int const x_367 = p.y;
-        int const x_371 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_364) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_367) * as_type<uint>(16))))))];
+        int const x_371 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_364) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_367) * as_type<uint>(16))))))];
         x_372 = (x_371 == 0);
         x_373_phi = x_372;
       }
@@ -318,13 +318,13 @@
         d = as_type<int>((as_type<uint>(x_376) - as_type<uint>(1)));
         int const x_379 = p.x;
         int const x_381 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_379) + as_type<uint>(as_type<int>((as_type<uint>(x_381) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_379) + as_type<uint>(as_type<int>((as_type<uint>(x_381) * as_type<uint>(16))))))] = 1;
         int const x_386 = p.x;
         int const x_389 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_386) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_389) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_386) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_389) * as_type<uint>(16))))))] = 1;
         int const x_394 = p.x;
         int const x_397 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_397) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_397) * as_type<uint>(16))))))] = 1;
         int const x_402 = p.x;
         p.x = as_type<int>((as_type<uint>(x_402) + as_type<uint>(2)));
       }
@@ -341,7 +341,7 @@
       if (x_412) {
         int const x_416 = p.x;
         int const x_418 = p.y;
-        int const x_423 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_416) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_418) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_423 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_416) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_418) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_424 = (x_423 == 0);
         x_425_phi = x_424;
       }
@@ -351,22 +351,22 @@
         d = as_type<int>((as_type<uint>(x_428) - as_type<uint>(1)));
         int const x_431 = p.x;
         int const x_433 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_431) + as_type<uint>(as_type<int>((as_type<uint>(x_433) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_431) + as_type<uint>(as_type<int>((as_type<uint>(x_433) * as_type<uint>(16))))))] = 1;
         int const x_438 = p.x;
         int const x_440 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_438) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_438) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_446 = p.x;
         int const x_448 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_446) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_448) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_446) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_448) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_454 = p.y;
         p.y = as_type<int>((as_type<uint>(x_454) + as_type<uint>(2)));
       }
     }
     int const x_458 = ipos.y;
     int const x_461 = ipos.x;
-    int const x_464 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_458) * as_type<uint>(16)))) + as_type<uint>(x_461)))];
+    int const x_464 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_458) * as_type<uint>(16)))) + as_type<uint>(x_461)))];
     if ((x_464 == 1)) {
-      *(tint_symbol_10) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -377,18 +377,24 @@
       }
     }
   }
-  *(tint_symbol_10) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread tint_array_wrapper tint_symbol_12 = {};
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_9, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread tint_array_wrapper tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl
index 0505c28..1c4efe4 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.hlsl
@@ -201,14 +201,14 @@
         x_303 = map;
         x_305_phi = x_303;
       } else {
-        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        x_304 = tint_symbol_5;
+        const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        x_304 = tint_symbol_4;
         x_305_phi = x_304;
       }
       const int x_305[256] = x_305_phi;
       if (x_282) {
-        const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_6;
+        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_5;
       }
       if (x_282) {
         map = x_305;
@@ -232,8 +232,8 @@
         const int x_341 = p.x;
         const int x_343 = p.y;
         const int x_345[256] = map;
-        const int tint_symbol_7[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_7;
+        const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_6;
         map = x_345;
         map[(x_341 + ((x_343 - 2) * 16))] = 1;
         const int x_350 = p.y;
@@ -328,11 +328,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl
index 51be36d..e567765 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -24,7 +24,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_59 = *(tint_symbol_8);
+  float4 const x_59 = *(tint_symbol_6);
   float2 const x_62 = x_7.resolution;
   pos = (float2(x_59.x, x_59.y) / x_62);
   float const x_65 = pos.x;
@@ -38,7 +38,7 @@
       break;
     }
     int const x_80 = i;
-    (*(tint_symbol_9)).arr[x_80] = 0;
+    (*(tint_symbol_7)).arr[x_80] = 0;
     {
       int const x_82 = i;
       i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
@@ -65,7 +65,7 @@
     if (x_92) {
       int const x_96 = p.x;
       int const x_99 = p.y;
-      int const x_103 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
+      int const x_103 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
       x_104 = (x_103 == 0);
       x_105_phi = x_104;
     }
@@ -80,7 +80,7 @@
     if (x_112) {
       int const x_116 = p.x;
       int const x_118 = p.y;
-      int const x_123 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_123 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_124 = (x_123 == 0);
       x_125_phi = x_124;
     }
@@ -95,7 +95,7 @@
     if (x_132) {
       int const x_136 = p.x;
       int const x_139 = p.y;
-      int const x_143 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
+      int const x_143 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
       x_144 = (x_143 == 0);
       x_145_phi = x_144;
     }
@@ -110,7 +110,7 @@
     if (x_152) {
       int const x_156 = p.x;
       int const x_158 = p.y;
-      int const x_163 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_163 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_164 = (x_163 == 0);
       x_165_phi = x_164;
     }
@@ -164,7 +164,7 @@
           }
           int const x_189 = j;
           int const x_191 = i;
-          int const x_196 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_196 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_196 == 0)) {
             int const x_200 = j;
             p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
@@ -184,7 +184,7 @@
       }
       int const x_211 = p.x;
       int const x_213 = p.y;
-      (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_217 = v;
       int const x_218 = directions;
@@ -205,7 +205,7 @@
       if (x_230) {
         int const x_234 = p.x;
         int const x_237 = p.y;
-        int const x_241 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
+        int const x_241 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
         x_242 = (x_241 == 0);
         x_243_phi = x_242;
       }
@@ -215,13 +215,13 @@
         d = as_type<int>((as_type<uint>(x_246) - as_type<uint>(1)));
         int const x_249 = p.x;
         int const x_251 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
         int const x_256 = p.x;
         int const x_259 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
         int const x_264 = p.x;
         int const x_267 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
         int const x_272 = p.x;
         p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
       }
@@ -252,23 +252,23 @@
       int const x_297 = x_297_phi;
       int const x_299 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_297) - as_type<uint>(2)))) * as_type<uint>(16)));
       if (x_282) {
-        x_303 = *(tint_symbol_9);
+        x_303 = *(tint_symbol_7);
         x_305_phi = x_303;
       } else {
-        tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        x_304 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        x_304 = tint_symbol_2;
         x_305_phi = x_304;
       }
       tint_array_wrapper const x_305 = x_305_phi;
       if (x_282) {
-        tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_9) = tint_symbol_5;
+        tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_7) = tint_symbol_3;
       }
       if (x_282) {
-        *(tint_symbol_9) = x_305;
+        *(tint_symbol_7) = x_305;
       }
       if (x_282) {
-        x_315 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_290) + as_type<uint>(x_299)))];
+        x_315 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_290) + as_type<uint>(x_299)))];
         x_317_phi = x_315;
       } else {
         x_316 = 0;
@@ -281,17 +281,17 @@
         d = as_type<int>((as_type<uint>(x_323) - as_type<uint>(1)));
         int const x_326 = p.x;
         int const x_328 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_326) + as_type<uint>(as_type<int>((as_type<uint>(x_328) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_326) + as_type<uint>(as_type<int>((as_type<uint>(x_328) * as_type<uint>(16))))))] = 1;
         int const x_333 = p.x;
         int const x_335 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_335) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_335) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_341 = p.x;
         int const x_343 = p.y;
-        tint_array_wrapper const x_345 = *(tint_symbol_9);
-        tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_9) = tint_symbol_6;
-        *(tint_symbol_9) = x_345;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_341) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_343) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        tint_array_wrapper const x_345 = *(tint_symbol_7);
+        tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_7) = tint_symbol_4;
+        *(tint_symbol_7) = x_345;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_341) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_343) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_350 = p.y;
         p.y = as_type<int>((as_type<uint>(x_350) - as_type<uint>(2)));
       }
@@ -308,7 +308,7 @@
       if (x_360) {
         int const x_364 = p.x;
         int const x_367 = p.y;
-        int const x_371 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_364) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_367) * as_type<uint>(16))))))];
+        int const x_371 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_364) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_367) * as_type<uint>(16))))))];
         x_372 = (x_371 == 0);
         x_373_phi = x_372;
       }
@@ -318,13 +318,13 @@
         d = as_type<int>((as_type<uint>(x_376) - as_type<uint>(1)));
         int const x_379 = p.x;
         int const x_381 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_379) + as_type<uint>(as_type<int>((as_type<uint>(x_381) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_379) + as_type<uint>(as_type<int>((as_type<uint>(x_381) * as_type<uint>(16))))))] = 1;
         int const x_386 = p.x;
         int const x_389 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_386) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_389) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_386) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_389) * as_type<uint>(16))))))] = 1;
         int const x_394 = p.x;
         int const x_397 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_397) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_397) * as_type<uint>(16))))))] = 1;
         int const x_402 = p.x;
         p.x = as_type<int>((as_type<uint>(x_402) + as_type<uint>(2)));
       }
@@ -341,7 +341,7 @@
       if (x_412) {
         int const x_416 = p.x;
         int const x_418 = p.y;
-        int const x_423 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_416) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_418) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_423 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_416) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_418) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_424 = (x_423 == 0);
         x_425_phi = x_424;
       }
@@ -351,22 +351,22 @@
         d = as_type<int>((as_type<uint>(x_428) - as_type<uint>(1)));
         int const x_431 = p.x;
         int const x_433 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_431) + as_type<uint>(as_type<int>((as_type<uint>(x_433) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_431) + as_type<uint>(as_type<int>((as_type<uint>(x_433) * as_type<uint>(16))))))] = 1;
         int const x_438 = p.x;
         int const x_440 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_438) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_438) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_446 = p.x;
         int const x_448 = p.y;
-        (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(x_446) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_448) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(x_446) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_448) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_454 = p.y;
         p.y = as_type<int>((as_type<uint>(x_454) + as_type<uint>(2)));
       }
     }
     int const x_458 = ipos.y;
     int const x_461 = ipos.x;
-    int const x_464 = (*(tint_symbol_9)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_458) * as_type<uint>(16)))) + as_type<uint>(x_461)))];
+    int const x_464 = (*(tint_symbol_7)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_458) * as_type<uint>(16)))) + as_type<uint>(x_461)))];
     if ((x_464 == 1)) {
-      *(tint_symbol_10) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -377,18 +377,24 @@
       }
     }
   }
-  *(tint_symbol_10) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_8) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread tint_array_wrapper tint_symbol_12 = {};
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_9, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread tint_array_wrapper tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl
index cfe3abd..ac04bb1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.hlsl
@@ -176,8 +176,8 @@
         const int x_286 = p.x;
         const int x_288 = p.y;
         const int x_291[256] = map;
-        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_5;
+        const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_4;
         map = x_291;
         const int x_294 = map[(x_286 + ((x_288 - 2) * 16))];
         x_295 = (x_294 == 0);
@@ -194,8 +194,8 @@
         const int x_317 = p.x;
         const int x_319 = p.y;
         const int x_321[256] = map;
-        const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_6;
+        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_5;
         map = x_321;
         map[(x_317 + ((x_319 - 2) * 16))] = 1;
         const int x_326 = p.y;
@@ -290,11 +290,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl
index 22486d2..bf26bed 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -24,7 +24,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_59 = *(tint_symbol_7);
+  float4 const x_59 = *(tint_symbol_5);
   float2 const x_62 = x_7.resolution;
   pos = (float2(x_59.x, x_59.y) / x_62);
   float const x_65 = pos.x;
@@ -38,7 +38,7 @@
       break;
     }
     int const x_80 = i;
-    (*(tint_symbol_8)).arr[x_80] = 0;
+    (*(tint_symbol_6)).arr[x_80] = 0;
     {
       int const x_82 = i;
       i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
@@ -65,7 +65,7 @@
     if (x_92) {
       int const x_96 = p.x;
       int const x_99 = p.y;
-      int const x_103 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
+      int const x_103 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
       x_104 = (x_103 == 0);
       x_105_phi = x_104;
     }
@@ -80,7 +80,7 @@
     if (x_112) {
       int const x_116 = p.x;
       int const x_118 = p.y;
-      int const x_123 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_123 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_124 = (x_123 == 0);
       x_125_phi = x_124;
     }
@@ -95,7 +95,7 @@
     if (x_132) {
       int const x_136 = p.x;
       int const x_139 = p.y;
-      int const x_143 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
+      int const x_143 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
       x_144 = (x_143 == 0);
       x_145_phi = x_144;
     }
@@ -110,7 +110,7 @@
     if (x_152) {
       int const x_156 = p.x;
       int const x_158 = p.y;
-      int const x_163 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_163 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_164 = (x_163 == 0);
       x_165_phi = x_164;
     }
@@ -154,7 +154,7 @@
           }
           int const x_189 = j;
           int const x_191 = i;
-          int const x_196 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_196 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_196 == 0)) {
             int const x_200 = j;
             p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
@@ -174,7 +174,7 @@
       }
       int const x_211 = p.x;
       int const x_213 = p.y;
-      (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_217 = v;
       int const x_218 = directions;
@@ -195,7 +195,7 @@
       if (x_230) {
         int const x_234 = p.x;
         int const x_237 = p.y;
-        int const x_241 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
+        int const x_241 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
         x_242 = (x_241 == 0);
         x_243_phi = x_242;
       }
@@ -205,13 +205,13 @@
         d = as_type<int>((as_type<uint>(x_246) - as_type<uint>(1)));
         int const x_249 = p.x;
         int const x_251 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
         int const x_256 = p.x;
         int const x_259 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
         int const x_264 = p.x;
         int const x_267 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
         int const x_272 = p.x;
         p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
       }
@@ -228,11 +228,11 @@
       if (x_282) {
         int const x_286 = p.x;
         int const x_288 = p.y;
-        tint_array_wrapper const x_291 = *(tint_symbol_8);
-        tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_8) = tint_symbol_4;
-        *(tint_symbol_8) = x_291;
-        int const x_294 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_286) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_288) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+        tint_array_wrapper const x_291 = *(tint_symbol_6);
+        tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_6) = tint_symbol_2;
+        *(tint_symbol_6) = x_291;
+        int const x_294 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_286) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_288) - as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_295 = (x_294 == 0);
         x_296_phi = x_295;
       }
@@ -242,17 +242,17 @@
         d = as_type<int>((as_type<uint>(x_299) - as_type<uint>(1)));
         int const x_302 = p.x;
         int const x_304 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_302) + as_type<uint>(as_type<int>((as_type<uint>(x_304) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_302) + as_type<uint>(as_type<int>((as_type<uint>(x_304) * as_type<uint>(16))))))] = 1;
         int const x_309 = p.x;
         int const x_311 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_317 = p.x;
         int const x_319 = p.y;
-        tint_array_wrapper const x_321 = *(tint_symbol_8);
-        tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_8) = tint_symbol_5;
-        *(tint_symbol_8) = x_321;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_317) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_319) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        tint_array_wrapper const x_321 = *(tint_symbol_6);
+        tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_6) = tint_symbol_3;
+        *(tint_symbol_6) = x_321;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_317) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_319) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_326 = p.y;
         p.y = as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)));
       }
@@ -269,7 +269,7 @@
       if (x_336) {
         int const x_340 = p.x;
         int const x_343 = p.y;
-        int const x_347 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_340) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_343) * as_type<uint>(16))))))];
+        int const x_347 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_340) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_343) * as_type<uint>(16))))))];
         x_348 = (x_347 == 0);
         x_349_phi = x_348;
       }
@@ -279,13 +279,13 @@
         d = as_type<int>((as_type<uint>(x_352) - as_type<uint>(1)));
         int const x_355 = p.x;
         int const x_357 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(x_357) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(x_357) * as_type<uint>(16))))))] = 1;
         int const x_362 = p.x;
         int const x_365 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_365) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_365) * as_type<uint>(16))))))] = 1;
         int const x_370 = p.x;
         int const x_373 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_370) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_373) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_370) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_373) * as_type<uint>(16))))))] = 1;
         int const x_378 = p.x;
         p.x = as_type<int>((as_type<uint>(x_378) + as_type<uint>(2)));
       }
@@ -302,7 +302,7 @@
       if (x_388) {
         int const x_392 = p.x;
         int const x_394 = p.y;
-        int const x_399 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_392) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_399 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_392) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_400 = (x_399 == 0);
         x_401_phi = x_400;
       }
@@ -312,22 +312,22 @@
         d = as_type<int>((as_type<uint>(x_404) - as_type<uint>(1)));
         int const x_407 = p.x;
         int const x_409 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_407) + as_type<uint>(as_type<int>((as_type<uint>(x_409) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_407) + as_type<uint>(as_type<int>((as_type<uint>(x_409) * as_type<uint>(16))))))] = 1;
         int const x_414 = p.x;
         int const x_416 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_414) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_416) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_414) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_416) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_422 = p.x;
         int const x_424 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_422) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_424) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_422) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_424) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_430 = p.y;
         p.y = as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)));
       }
     }
     int const x_434 = ipos.y;
     int const x_437 = ipos.x;
-    int const x_440 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_434) * as_type<uint>(16)))) + as_type<uint>(x_437)))];
+    int const x_440 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_434) * as_type<uint>(16)))) + as_type<uint>(x_437)))];
     if ((x_440 == 1)) {
-      *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -338,18 +338,24 @@
       }
     }
   }
-  *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_10 = 0.0f;
-  thread tint_array_wrapper tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl
index cfe3abd..ac04bb1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.hlsl
@@ -176,8 +176,8 @@
         const int x_286 = p.x;
         const int x_288 = p.y;
         const int x_291[256] = map;
-        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_5;
+        const int tint_symbol_4[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_4;
         map = x_291;
         const int x_294 = map[(x_286 + ((x_288 - 2) * 16))];
         x_295 = (x_294 == 0);
@@ -194,8 +194,8 @@
         const int x_317 = p.x;
         const int x_319 = p.y;
         const int x_321[256] = map;
-        const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        map = tint_symbol_6;
+        const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        map = tint_symbol_5;
         map = x_321;
         map[(x_317 + ((x_319 - 2) * 16))] = 1;
         const int x_326 = p.y;
@@ -290,11 +290,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl
index 22486d2..bf26bed 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
   float2 pos = 0.0f;
   int2 ipos = 0;
   int i = 0;
@@ -24,7 +24,7 @@
   int directions = 0;
   int j = 0;
   int d = 0;
-  float4 const x_59 = *(tint_symbol_7);
+  float4 const x_59 = *(tint_symbol_5);
   float2 const x_62 = x_7.resolution;
   pos = (float2(x_59.x, x_59.y) / x_62);
   float const x_65 = pos.x;
@@ -38,7 +38,7 @@
       break;
     }
     int const x_80 = i;
-    (*(tint_symbol_8)).arr[x_80] = 0;
+    (*(tint_symbol_6)).arr[x_80] = 0;
     {
       int const x_82 = i;
       i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
@@ -65,7 +65,7 @@
     if (x_92) {
       int const x_96 = p.x;
       int const x_99 = p.y;
-      int const x_103 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
+      int const x_103 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(16))))))];
       x_104 = (x_103 == 0);
       x_105_phi = x_104;
     }
@@ -80,7 +80,7 @@
     if (x_112) {
       int const x_116 = p.x;
       int const x_118 = p.y;
-      int const x_123 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_123 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_124 = (x_123 == 0);
       x_125_phi = x_124;
     }
@@ -95,7 +95,7 @@
     if (x_132) {
       int const x_136 = p.x;
       int const x_139 = p.y;
-      int const x_143 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
+      int const x_143 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(16))))))];
       x_144 = (x_143 == 0);
       x_145_phi = x_144;
     }
@@ -110,7 +110,7 @@
     if (x_152) {
       int const x_156 = p.x;
       int const x_158 = p.y;
-      int const x_163 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+      int const x_163 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(16))))))];
       x_164 = (x_163 == 0);
       x_165_phi = x_164;
     }
@@ -154,7 +154,7 @@
           }
           int const x_189 = j;
           int const x_191 = i;
-          int const x_196 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
+          int const x_196 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
           if ((x_196 == 0)) {
             int const x_200 = j;
             p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
@@ -174,7 +174,7 @@
       }
       int const x_211 = p.x;
       int const x_213 = p.y;
-      (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
+      (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(16))))))] = 1;
     } else {
       int const x_217 = v;
       int const x_218 = directions;
@@ -195,7 +195,7 @@
       if (x_230) {
         int const x_234 = p.x;
         int const x_237 = p.y;
-        int const x_241 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
+        int const x_241 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(16))))))];
         x_242 = (x_241 == 0);
         x_243_phi = x_242;
       }
@@ -205,13 +205,13 @@
         d = as_type<int>((as_type<uint>(x_246) - as_type<uint>(1)));
         int const x_249 = p.x;
         int const x_251 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(16))))))] = 1;
         int const x_256 = p.x;
         int const x_259 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(16))))))] = 1;
         int const x_264 = p.x;
         int const x_267 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
         int const x_272 = p.x;
         p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
       }
@@ -228,11 +228,11 @@
       if (x_282) {
         int const x_286 = p.x;
         int const x_288 = p.y;
-        tint_array_wrapper const x_291 = *(tint_symbol_8);
-        tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_8) = tint_symbol_4;
-        *(tint_symbol_8) = x_291;
-        int const x_294 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_286) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_288) - as_type<uint>(2)))) * as_type<uint>(16))))))];
+        tint_array_wrapper const x_291 = *(tint_symbol_6);
+        tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_6) = tint_symbol_2;
+        *(tint_symbol_6) = x_291;
+        int const x_294 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_286) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_288) - as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_295 = (x_294 == 0);
         x_296_phi = x_295;
       }
@@ -242,17 +242,17 @@
         d = as_type<int>((as_type<uint>(x_299) - as_type<uint>(1)));
         int const x_302 = p.x;
         int const x_304 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_302) + as_type<uint>(as_type<int>((as_type<uint>(x_304) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_302) + as_type<uint>(as_type<int>((as_type<uint>(x_304) * as_type<uint>(16))))))] = 1;
         int const x_309 = p.x;
         int const x_311 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_317 = p.x;
         int const x_319 = p.y;
-        tint_array_wrapper const x_321 = *(tint_symbol_8);
-        tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-        *(tint_symbol_8) = tint_symbol_5;
-        *(tint_symbol_8) = x_321;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_317) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_319) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        tint_array_wrapper const x_321 = *(tint_symbol_6);
+        tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+        *(tint_symbol_6) = tint_symbol_3;
+        *(tint_symbol_6) = x_321;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_317) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_319) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_326 = p.y;
         p.y = as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)));
       }
@@ -269,7 +269,7 @@
       if (x_336) {
         int const x_340 = p.x;
         int const x_343 = p.y;
-        int const x_347 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_340) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_343) * as_type<uint>(16))))))];
+        int const x_347 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_340) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_343) * as_type<uint>(16))))))];
         x_348 = (x_347 == 0);
         x_349_phi = x_348;
       }
@@ -279,13 +279,13 @@
         d = as_type<int>((as_type<uint>(x_352) - as_type<uint>(1)));
         int const x_355 = p.x;
         int const x_357 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(x_357) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(x_357) * as_type<uint>(16))))))] = 1;
         int const x_362 = p.x;
         int const x_365 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_365) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_365) * as_type<uint>(16))))))] = 1;
         int const x_370 = p.x;
         int const x_373 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_370) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_373) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_370) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_373) * as_type<uint>(16))))))] = 1;
         int const x_378 = p.x;
         p.x = as_type<int>((as_type<uint>(x_378) + as_type<uint>(2)));
       }
@@ -302,7 +302,7 @@
       if (x_388) {
         int const x_392 = p.x;
         int const x_394 = p.y;
-        int const x_399 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_392) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) * as_type<uint>(16))))))];
+        int const x_399 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_392) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) * as_type<uint>(16))))))];
         x_400 = (x_399 == 0);
         x_401_phi = x_400;
       }
@@ -312,22 +312,22 @@
         d = as_type<int>((as_type<uint>(x_404) - as_type<uint>(1)));
         int const x_407 = p.x;
         int const x_409 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_407) + as_type<uint>(as_type<int>((as_type<uint>(x_409) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_407) + as_type<uint>(as_type<int>((as_type<uint>(x_409) * as_type<uint>(16))))))] = 1;
         int const x_414 = p.x;
         int const x_416 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_414) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_416) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_414) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_416) + as_type<uint>(1)))) * as_type<uint>(16))))))] = 1;
         int const x_422 = p.x;
         int const x_424 = p.y;
-        (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(x_422) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_424) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
+        (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(x_422) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_424) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
         int const x_430 = p.y;
         p.y = as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)));
       }
     }
     int const x_434 = ipos.y;
     int const x_437 = ipos.x;
-    int const x_440 = (*(tint_symbol_8)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_434) * as_type<uint>(16)))) + as_type<uint>(x_437)))];
+    int const x_440 = (*(tint_symbol_6)).arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_434) * as_type<uint>(16)))) + as_type<uint>(x_437)))];
     if ((x_440 == 1)) {
-      *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       return;
     }
     {
@@ -338,18 +338,24 @@
       }
     }
   }
-  *(tint_symbol_9) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
-  thread float4 tint_symbol_10 = 0.0f;
-  thread tint_array_wrapper tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl
index 6c28e9e..f2d5a90 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl
@@ -30,8 +30,8 @@
     int x_64_phi = 0;
     const int x_63 = x_63_phi;
     const int x_68[10] = data;
-    const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    data = tint_symbol_5;
+    const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    data = tint_symbol_4;
     data = x_68;
     const int x_69 = (x_63 + 1);
     x_64_phi = x_69;
@@ -338,11 +338,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl
index 13fa0cf..56dceaa 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper temp = {};
   tint_array_wrapper data = {};
   float x_190 = 0.0f;
@@ -40,8 +40,8 @@
     int x_64_phi = 0;
     int const x_63 = x_63_phi;
     tint_array_wrapper const x_68 = data;
-    tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    data = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    data = tint_symbol_2;
     data = x_68;
     int const x_69 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
     x_64_phi = x_69;
@@ -251,7 +251,7 @@
   float x_199 = 0.0f;
   float x_261 = 0.0f;
   float x_262_phi = 0.0f;
-  float const x_180 = (*(tint_symbol_6)).y;
+  float const x_180 = (*(tint_symbol_4)).y;
   x_181 = int(x_180);
   if ((x_181 < 30)) {
     int const x_187 = data.arr[0];
@@ -334,17 +334,23 @@
     x_263_phi = x_262;
   }
   float const x_263 = x_263_phi;
-  *(tint_symbol_7) = float4(x_263, x_263, x_263, 1.0f);
+  *(tint_symbol_5) = float4(x_263, x_263, x_263, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl
index 975a0e5..12e14f0 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.hlsl
@@ -30,8 +30,8 @@
     int x_64_phi = 0;
     const int x_63 = x_63_phi;
     const int x_68[10] = data;
-    const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    data = tint_symbol_5;
+    const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    data = tint_symbol_4;
     data = x_68;
     const int x_69 = (x_63 + 1);
     x_64_phi = x_69;
@@ -346,11 +346,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl
index 261784f..98ee292 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper temp = {};
   tint_array_wrapper data = {};
   float x_190 = 0.0f;
@@ -40,8 +40,8 @@
     int x_64_phi = 0;
     int const x_63 = x_63_phi;
     tint_array_wrapper const x_68 = data;
-    tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    data = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    data = tint_symbol_2;
     data = x_68;
     int const x_69 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
     x_64_phi = x_69;
@@ -251,7 +251,7 @@
   float x_199 = 0.0f;
   float x_261 = 0.0f;
   float x_262_phi = 0.0f;
-  float const x_180 = (*(tint_symbol_6)).y;
+  float const x_180 = (*(tint_symbol_4)).y;
   x_181 = int(x_180);
   if ((x_181 < 30)) {
     int const x_187 = data.arr[0];
@@ -334,17 +334,23 @@
     x_263_phi = x_262;
   }
   float const x_263 = x_263_phi;
-  *(tint_symbol_7) = float4(x_263, x_263, x_263, 1.0f);
+  *(tint_symbol_5) = float4(x_263, x_263, x_263, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl
index 40b050e..8ea7a19 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl
@@ -334,11 +334,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl
index 3feada0..4b8d917 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper temp = {};
   tint_array_wrapper data = {};
   float x_189 = 0.0f;
@@ -247,7 +247,7 @@
   float x_198 = 0.0f;
   float x_260 = 0.0f;
   float x_261_phi = 0.0f;
-  float const x_179 = (*(tint_symbol_5)).y;
+  float const x_179 = (*(tint_symbol_3)).y;
   x_180 = int(x_179);
   if ((x_180 < 30)) {
     int const x_186 = data.arr[0];
@@ -330,17 +330,23 @@
     x_262_phi = x_261;
   }
   float const x_262 = x_262_phi;
-  *(tint_symbol_6) = float4(x_262, x_262, x_262, 1.0f);
+  *(tint_symbol_4) = float4(x_262, x_262, x_262, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl
index 3b86173..a73d085 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.hlsl
@@ -342,11 +342,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl
index 13ce0fd..2071bd1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper temp = {};
   tint_array_wrapper data = {};
   float x_189 = 0.0f;
@@ -247,7 +247,7 @@
   float x_198 = 0.0f;
   float x_260 = 0.0f;
   float x_261_phi = 0.0f;
-  float const x_179 = (*(tint_symbol_5)).y;
+  float const x_179 = (*(tint_symbol_3)).y;
   x_180 = int(x_179);
   if ((x_180 < 30)) {
     int const x_186 = data.arr[0];
@@ -330,17 +330,23 @@
     x_262_phi = x_261;
   }
   float const x_262 = x_262_phi;
-  *(tint_symbol_6) = float4(x_262, x_262, x_262, 1.0f);
+  *(tint_symbol_4) = float4(x_262, x_262, x_262, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl
index d473288..0e81ca2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl
@@ -250,11 +250,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl
index 2403796..eead08d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_267 = i;
-    int const x_269 = (*(tint_symbol_5)).arr[x_267];
+    int const x_269 = (*(tint_symbol_3)).arr[x_267];
     int const x_270 = j;
-    int const x_272 = (*(tint_symbol_5)).arr[x_270];
+    int const x_272 = (*(tint_symbol_3)).arr[x_270];
     if ((x_269 < x_272)) {
       int const x_277 = k;
       k = as_type<int>((as_type<uint>(x_277) + as_type<uint>(1)));
       int const x_279 = i;
       i = as_type<int>((as_type<uint>(x_279) + as_type<uint>(1)));
-      int const x_282 = (*(tint_symbol_5)).arr[x_279];
-      (*(tint_symbol_6)).arr[x_277] = x_282;
+      int const x_282 = (*(tint_symbol_3)).arr[x_279];
+      (*(tint_symbol_4)).arr[x_277] = x_282;
     } else {
       int const x_284 = k;
       k = as_type<int>((as_type<uint>(x_284) + as_type<uint>(1)));
       int const x_286 = j;
       j = as_type<int>((as_type<uint>(x_286) + as_type<uint>(1)));
-      int const x_289 = (*(tint_symbol_5)).arr[x_286];
-      (*(tint_symbol_6)).arr[x_284] = x_289;
+      int const x_289 = (*(tint_symbol_3)).arr[x_286];
+      (*(tint_symbol_4)).arr[x_284] = x_289;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_302) + as_type<uint>(1)));
     int const x_304 = i;
     i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
-    int const x_307 = (*(tint_symbol_5)).arr[x_304];
-    (*(tint_symbol_6)).arr[x_302] = x_307;
+    int const x_307 = (*(tint_symbol_3)).arr[x_304];
+    (*(tint_symbol_4)).arr[x_302] = x_307;
   }
   int const x_309 = *(from);
   i_1 = x_309;
@@ -80,8 +80,8 @@
     }
     int const x_318 = i_1;
     int const x_319 = i_1;
-    int const x_321 = (*(tint_symbol_6)).arr[x_319];
-    (*(tint_symbol_5)).arr[x_318] = x_321;
+    int const x_321 = (*(tint_symbol_4)).arr[x_319];
+    (*(tint_symbol_3)).arr[x_318] = x_321;
     {
       int const x_323 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_323) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -135,7 +135,7 @@
       param_1 = x_356;
       int const x_357 = to_1;
       param_2 = x_357;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_359 = m;
         int const x_361 = i_2;
@@ -150,7 +150,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -161,52 +161,52 @@
     switch(x_90) {
       case 9: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -5;
+        (*(tint_symbol_7)).arr[x_120] = -5;
         break;
       }
       case 8: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -4;
+        (*(tint_symbol_7)).arr[x_118] = -4;
         break;
       }
       case 7: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -3;
+        (*(tint_symbol_7)).arr[x_116] = -3;
         break;
       }
       case 6: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = -2;
+        (*(tint_symbol_7)).arr[x_114] = -2;
         break;
       }
       case 5: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = -1;
+        (*(tint_symbol_7)).arr[x_112] = -1;
         break;
       }
       case 4: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 0;
+        (*(tint_symbol_7)).arr[x_110] = 0;
         break;
       }
       case 3: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 1;
+        (*(tint_symbol_7)).arr[x_108] = 1;
         break;
       }
       case 2: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 2;
+        (*(tint_symbol_7)).arr[x_106] = 2;
         break;
       }
       case 1: {
         int const x_104 = i_3;
-        (*(tint_symbol_9)).arr[x_104] = 3;
+        (*(tint_symbol_7)).arr[x_104] = 3;
         break;
       }
       case 0: {
         int const x_102 = i_3;
-        (*(tint_symbol_9)).arr[x_102] = 4;
+        (*(tint_symbol_7)).arr[x_102] = 4;
         break;
       }
       default: {
@@ -232,56 +232,56 @@
     }
     int const x_133 = j_1;
     int const x_134 = j_1;
-    int const x_136 = (*(tint_symbol_9)).arr[x_134];
-    (*(tint_symbol_10)).arr[x_133] = x_136;
+    int const x_136 = (*(tint_symbol_7)).arr[x_134];
+    (*(tint_symbol_8)).arr[x_133] = x_136;
     {
       int const x_138 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_138) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_142 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_142 = (*(tint_symbol_9)).y;
   if ((int(x_142) < 30)) {
-    int const x_149 = (*(tint_symbol_9)).arr[0];
+    int const x_149 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_149) / 10.0f));
   } else {
-    float const x_154 = (*(tint_symbol_11)).y;
+    float const x_154 = (*(tint_symbol_9)).y;
     if ((int(x_154) < 60)) {
-      int const x_161 = (*(tint_symbol_9)).arr[1];
+      int const x_161 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_161) / 10.0f));
     } else {
-      float const x_166 = (*(tint_symbol_11)).y;
+      float const x_166 = (*(tint_symbol_9)).y;
       if ((int(x_166) < 90)) {
-        int const x_173 = (*(tint_symbol_9)).arr[2];
+        int const x_173 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_173) / 10.0f));
       } else {
-        float const x_178 = (*(tint_symbol_11)).y;
+        float const x_178 = (*(tint_symbol_9)).y;
         if ((int(x_178) < 120)) {
-          int const x_185 = (*(tint_symbol_9)).arr[3];
+          int const x_185 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_185) / 10.0f));
         } else {
-          float const x_190 = (*(tint_symbol_11)).y;
+          float const x_190 = (*(tint_symbol_9)).y;
           if ((int(x_190) < 150)) {
             discard_fragment();
           } else {
-            float const x_197 = (*(tint_symbol_11)).y;
+            float const x_197 = (*(tint_symbol_9)).y;
             if ((int(x_197) < 180)) {
-              int const x_204 = (*(tint_symbol_9)).arr[5];
+              int const x_204 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_204) / 10.0f));
             } else {
-              float const x_209 = (*(tint_symbol_11)).y;
+              float const x_209 = (*(tint_symbol_9)).y;
               if ((int(x_209) < 210)) {
-                int const x_216 = (*(tint_symbol_9)).arr[6];
+                int const x_216 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_216) / 10.0f));
               } else {
-                float const x_221 = (*(tint_symbol_11)).y;
+                float const x_221 = (*(tint_symbol_9)).y;
                 if ((int(x_221) < 240)) {
-                  int const x_228 = (*(tint_symbol_9)).arr[7];
+                  int const x_228 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_228) / 10.0f));
                 } else {
-                  float const x_233 = (*(tint_symbol_11)).y;
+                  float const x_233 = (*(tint_symbol_9)).y;
                   if ((int(x_233) < 270)) {
-                    int const x_240 = (*(tint_symbol_9)).arr[8];
+                    int const x_240 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_240) / 10.0f));
                   } else {
                     discard_fragment();
@@ -296,19 +296,25 @@
   }
   float const x_244 = grey;
   float3 const x_245 = float3(x_244, x_244, x_244);
-  *(tint_symbol_12) = float4(x_245.x, x_245.y, x_245.z, 1.0f);
+  *(tint_symbol_10) = float4(x_245.x, x_245.y, x_245.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl
index 6a30ba4..d127e3e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.hlsl
@@ -258,11 +258,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl
index 7d925d1..5970567 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_267 = i;
-    int const x_269 = (*(tint_symbol_5)).arr[x_267];
+    int const x_269 = (*(tint_symbol_3)).arr[x_267];
     int const x_270 = j;
-    int const x_272 = (*(tint_symbol_5)).arr[x_270];
+    int const x_272 = (*(tint_symbol_3)).arr[x_270];
     if ((x_269 < x_272)) {
       int const x_277 = k;
       k = as_type<int>((as_type<uint>(x_277) + as_type<uint>(1)));
       int const x_279 = i;
       i = as_type<int>((as_type<uint>(x_279) + as_type<uint>(1)));
-      int const x_282 = (*(tint_symbol_5)).arr[x_279];
-      (*(tint_symbol_6)).arr[x_277] = x_282;
+      int const x_282 = (*(tint_symbol_3)).arr[x_279];
+      (*(tint_symbol_4)).arr[x_277] = x_282;
     } else {
       int const x_284 = k;
       k = as_type<int>((as_type<uint>(x_284) + as_type<uint>(1)));
       int const x_286 = j;
       j = as_type<int>((as_type<uint>(x_286) + as_type<uint>(1)));
-      int const x_289 = (*(tint_symbol_5)).arr[x_286];
-      (*(tint_symbol_6)).arr[x_284] = x_289;
+      int const x_289 = (*(tint_symbol_3)).arr[x_286];
+      (*(tint_symbol_4)).arr[x_284] = x_289;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_302) + as_type<uint>(1)));
     int const x_304 = i;
     i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
-    int const x_307 = (*(tint_symbol_5)).arr[x_304];
-    (*(tint_symbol_6)).arr[x_302] = x_307;
+    int const x_307 = (*(tint_symbol_3)).arr[x_304];
+    (*(tint_symbol_4)).arr[x_302] = x_307;
   }
   int const x_309 = *(from);
   i_1 = x_309;
@@ -80,8 +80,8 @@
     }
     int const x_318 = i_1;
     int const x_319 = i_1;
-    int const x_321 = (*(tint_symbol_6)).arr[x_319];
-    (*(tint_symbol_5)).arr[x_318] = x_321;
+    int const x_321 = (*(tint_symbol_4)).arr[x_319];
+    (*(tint_symbol_3)).arr[x_318] = x_321;
     {
       int const x_323 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_323) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -135,7 +135,7 @@
       param_1 = x_356;
       int const x_357 = to_1;
       param_2 = x_357;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_359 = m;
         int const x_361 = i_2;
@@ -150,7 +150,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -161,52 +161,52 @@
     switch(x_90) {
       case 9: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -5;
+        (*(tint_symbol_7)).arr[x_120] = -5;
         break;
       }
       case 8: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -4;
+        (*(tint_symbol_7)).arr[x_118] = -4;
         break;
       }
       case 7: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -3;
+        (*(tint_symbol_7)).arr[x_116] = -3;
         break;
       }
       case 6: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = -2;
+        (*(tint_symbol_7)).arr[x_114] = -2;
         break;
       }
       case 5: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = -1;
+        (*(tint_symbol_7)).arr[x_112] = -1;
         break;
       }
       case 4: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 0;
+        (*(tint_symbol_7)).arr[x_110] = 0;
         break;
       }
       case 3: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 1;
+        (*(tint_symbol_7)).arr[x_108] = 1;
         break;
       }
       case 2: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 2;
+        (*(tint_symbol_7)).arr[x_106] = 2;
         break;
       }
       case 1: {
         int const x_104 = i_3;
-        (*(tint_symbol_9)).arr[x_104] = 3;
+        (*(tint_symbol_7)).arr[x_104] = 3;
         break;
       }
       case 0: {
         int const x_102 = i_3;
-        (*(tint_symbol_9)).arr[x_102] = 4;
+        (*(tint_symbol_7)).arr[x_102] = 4;
         break;
       }
       default: {
@@ -232,56 +232,56 @@
     }
     int const x_133 = j_1;
     int const x_134 = j_1;
-    int const x_136 = (*(tint_symbol_9)).arr[x_134];
-    (*(tint_symbol_10)).arr[x_133] = x_136;
+    int const x_136 = (*(tint_symbol_7)).arr[x_134];
+    (*(tint_symbol_8)).arr[x_133] = x_136;
     {
       int const x_138 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_138) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_142 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_142 = (*(tint_symbol_9)).y;
   if ((int(x_142) < 30)) {
-    int const x_149 = (*(tint_symbol_9)).arr[0];
+    int const x_149 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_149) / 10.0f));
   } else {
-    float const x_154 = (*(tint_symbol_11)).y;
+    float const x_154 = (*(tint_symbol_9)).y;
     if ((int(x_154) < 60)) {
-      int const x_161 = (*(tint_symbol_9)).arr[1];
+      int const x_161 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_161) / 10.0f));
     } else {
-      float const x_166 = (*(tint_symbol_11)).y;
+      float const x_166 = (*(tint_symbol_9)).y;
       if ((int(x_166) < 90)) {
-        int const x_173 = (*(tint_symbol_9)).arr[2];
+        int const x_173 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_173) / 10.0f));
       } else {
-        float const x_178 = (*(tint_symbol_11)).y;
+        float const x_178 = (*(tint_symbol_9)).y;
         if ((int(x_178) < 120)) {
-          int const x_185 = (*(tint_symbol_9)).arr[3];
+          int const x_185 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_185) / 10.0f));
         } else {
-          float const x_190 = (*(tint_symbol_11)).y;
+          float const x_190 = (*(tint_symbol_9)).y;
           if ((int(x_190) < 150)) {
             discard_fragment();
           } else {
-            float const x_197 = (*(tint_symbol_11)).y;
+            float const x_197 = (*(tint_symbol_9)).y;
             if ((int(x_197) < 180)) {
-              int const x_204 = (*(tint_symbol_9)).arr[5];
+              int const x_204 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_204) / 10.0f));
             } else {
-              float const x_209 = (*(tint_symbol_11)).y;
+              float const x_209 = (*(tint_symbol_9)).y;
               if ((int(x_209) < 210)) {
-                int const x_216 = (*(tint_symbol_9)).arr[6];
+                int const x_216 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_216) / 10.0f));
               } else {
-                float const x_221 = (*(tint_symbol_11)).y;
+                float const x_221 = (*(tint_symbol_9)).y;
                 if ((int(x_221) < 240)) {
-                  int const x_228 = (*(tint_symbol_9)).arr[7];
+                  int const x_228 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_228) / 10.0f));
                 } else {
-                  float const x_233 = (*(tint_symbol_11)).y;
+                  float const x_233 = (*(tint_symbol_9)).y;
                   if ((int(x_233) < 270)) {
-                    int const x_240 = (*(tint_symbol_9)).arr[8];
+                    int const x_240 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_240) / 10.0f));
                   } else {
                     discard_fragment();
@@ -296,19 +296,25 @@
   }
   float const x_244 = grey;
   float3 const x_245 = float3(x_244, x_244, x_244);
-  *(tint_symbol_12) = float4(x_245.x, x_245.y, x_245.z, 1.0f);
+  *(tint_symbol_10) = float4(x_245.x, x_245.y, x_245.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl
index 500e49e..fc8977b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl
@@ -270,11 +270,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl
index dcb5f46..9077451 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_278 = i;
-    int const x_280 = (*(tint_symbol_5)).arr[x_278];
+    int const x_280 = (*(tint_symbol_3)).arr[x_278];
     int const x_281 = j;
-    int const x_283 = (*(tint_symbol_5)).arr[x_281];
+    int const x_283 = (*(tint_symbol_3)).arr[x_281];
     if ((x_280 < x_283)) {
       int const x_288 = k;
       k = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
       int const x_290 = i;
       i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
-      int const x_293 = (*(tint_symbol_5)).arr[x_290];
-      (*(tint_symbol_6)).arr[x_288] = x_293;
+      int const x_293 = (*(tint_symbol_3)).arr[x_290];
+      (*(tint_symbol_4)).arr[x_288] = x_293;
     } else {
       int const x_295 = k;
       k = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
       int const x_297 = j;
       j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
-      int const x_300 = (*(tint_symbol_5)).arr[x_297];
-      (*(tint_symbol_6)).arr[x_295] = x_300;
+      int const x_300 = (*(tint_symbol_3)).arr[x_297];
+      (*(tint_symbol_4)).arr[x_295] = x_300;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
     int const x_315 = i;
     i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
-    int const x_318 = (*(tint_symbol_5)).arr[x_315];
-    (*(tint_symbol_6)).arr[x_313] = x_318;
+    int const x_318 = (*(tint_symbol_3)).arr[x_315];
+    (*(tint_symbol_4)).arr[x_313] = x_318;
   }
   int const x_320 = *(from);
   i_1 = x_320;
@@ -80,8 +80,8 @@
     }
     int const x_329 = i_1;
     int const x_330 = i_1;
-    int const x_332 = (*(tint_symbol_6)).arr[x_330];
-    (*(tint_symbol_5)).arr[x_329] = x_332;
+    int const x_332 = (*(tint_symbol_4)).arr[x_330];
+    (*(tint_symbol_3)).arr[x_329] = x_332;
     {
       int const x_334 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -135,7 +135,7 @@
       param_1 = x_367;
       int const x_368 = to_1;
       param_2 = x_368;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_370 = m;
         int const x_372 = i_2;
@@ -150,7 +150,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -161,52 +161,52 @@
     switch(x_92) {
       case 9: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -5;
+        (*(tint_symbol_7)).arr[x_122] = -5;
         break;
       }
       case 8: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -4;
+        (*(tint_symbol_7)).arr[x_120] = -4;
         break;
       }
       case 7: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -3;
+        (*(tint_symbol_7)).arr[x_118] = -3;
         break;
       }
       case 6: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -2;
+        (*(tint_symbol_7)).arr[x_116] = -2;
         break;
       }
       case 5: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = -1;
+        (*(tint_symbol_7)).arr[x_114] = -1;
         break;
       }
       case 4: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 0;
+        (*(tint_symbol_7)).arr[x_112] = 0;
         break;
       }
       case 3: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 1;
+        (*(tint_symbol_7)).arr[x_110] = 1;
         break;
       }
       case 2: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 2;
+        (*(tint_symbol_7)).arr[x_108] = 2;
         break;
       }
       case 1: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 3;
+        (*(tint_symbol_7)).arr[x_106] = 3;
         break;
       }
       case 0: {
         int const x_104 = i_3;
-        (*(tint_symbol_9)).arr[x_104] = 4;
+        (*(tint_symbol_7)).arr[x_104] = 4;
         break;
       }
       default: {
@@ -237,57 +237,57 @@
     }
     int const x_140 = j_1;
     int const x_141 = j_1;
-    int const x_143 = (*(tint_symbol_9)).arr[x_141];
-    (*(tint_symbol_10)).arr[x_140] = x_143;
+    int const x_143 = (*(tint_symbol_7)).arr[x_141];
+    (*(tint_symbol_8)).arr[x_140] = x_143;
     {
       int const x_145 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_145) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_149 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_149 = (*(tint_symbol_9)).y;
   if ((int(x_149) < 30)) {
-    int const x_156 = (*(tint_symbol_9)).arr[0];
+    int const x_156 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_156) / 10.0f));
   } else {
-    float const x_161 = (*(tint_symbol_11)).y;
+    float const x_161 = (*(tint_symbol_9)).y;
     if ((int(x_161) < 60)) {
-      int const x_168 = (*(tint_symbol_9)).arr[1];
+      int const x_168 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_168) / 10.0f));
     } else {
-      float const x_173 = (*(tint_symbol_11)).y;
+      float const x_173 = (*(tint_symbol_9)).y;
       if ((int(x_173) < 90)) {
-        int const x_180 = (*(tint_symbol_9)).arr[2];
+        int const x_180 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_180) / 10.0f));
       } else {
-        float const x_185 = (*(tint_symbol_11)).y;
+        float const x_185 = (*(tint_symbol_9)).y;
         if ((int(x_185) < 120)) {
-          int const x_192 = (*(tint_symbol_9)).arr[3];
+          int const x_192 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_192) / 10.0f));
         } else {
-          float const x_197 = (*(tint_symbol_11)).y;
+          float const x_197 = (*(tint_symbol_9)).y;
           if ((int(x_197) < 150)) {
             discard_fragment();
           } else {
-            float const x_204 = (*(tint_symbol_11)).y;
+            float const x_204 = (*(tint_symbol_9)).y;
             if ((int(x_204) < 180)) {
-              int const x_211 = (*(tint_symbol_9)).arr[5];
+              int const x_211 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_211) / 10.0f));
             } else {
-              float const x_216 = (*(tint_symbol_11)).y;
+              float const x_216 = (*(tint_symbol_9)).y;
               if ((int(x_216) < 210)) {
-                int const x_223 = (*(tint_symbol_9)).arr[6];
+                int const x_223 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_223) / 10.0f));
               } else {
-                float const x_228 = (*(tint_symbol_11)).y;
+                float const x_228 = (*(tint_symbol_9)).y;
                 if ((int(x_228) < 240)) {
-                  int const x_235 = (*(tint_symbol_9)).arr[7];
+                  int const x_235 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_235) / 10.0f));
                 } else {
-                  float const x_240 = (*(tint_symbol_11)).y;
+                  float const x_240 = (*(tint_symbol_9)).y;
                   bool guard233 = true;
                   if ((int(x_240) < 270)) {
-                    int const x_247 = (*(tint_symbol_9)).arr[8];
+                    int const x_247 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_247) / 10.0f));
                     guard233 = false;
                   } else {
@@ -311,19 +311,25 @@
   }
   float const x_255 = grey;
   float3 const x_256 = float3(x_255, x_255, x_255);
-  *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
+  *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl
index b21b248..5b6b83e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.hlsl
@@ -278,11 +278,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl
index 45b927b..2330957 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_278 = i;
-    int const x_280 = (*(tint_symbol_5)).arr[x_278];
+    int const x_280 = (*(tint_symbol_3)).arr[x_278];
     int const x_281 = j;
-    int const x_283 = (*(tint_symbol_5)).arr[x_281];
+    int const x_283 = (*(tint_symbol_3)).arr[x_281];
     if ((x_280 < x_283)) {
       int const x_288 = k;
       k = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
       int const x_290 = i;
       i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
-      int const x_293 = (*(tint_symbol_5)).arr[x_290];
-      (*(tint_symbol_6)).arr[x_288] = x_293;
+      int const x_293 = (*(tint_symbol_3)).arr[x_290];
+      (*(tint_symbol_4)).arr[x_288] = x_293;
     } else {
       int const x_295 = k;
       k = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
       int const x_297 = j;
       j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
-      int const x_300 = (*(tint_symbol_5)).arr[x_297];
-      (*(tint_symbol_6)).arr[x_295] = x_300;
+      int const x_300 = (*(tint_symbol_3)).arr[x_297];
+      (*(tint_symbol_4)).arr[x_295] = x_300;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
     int const x_315 = i;
     i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
-    int const x_318 = (*(tint_symbol_5)).arr[x_315];
-    (*(tint_symbol_6)).arr[x_313] = x_318;
+    int const x_318 = (*(tint_symbol_3)).arr[x_315];
+    (*(tint_symbol_4)).arr[x_313] = x_318;
   }
   int const x_320 = *(from);
   i_1 = x_320;
@@ -80,8 +80,8 @@
     }
     int const x_329 = i_1;
     int const x_330 = i_1;
-    int const x_332 = (*(tint_symbol_6)).arr[x_330];
-    (*(tint_symbol_5)).arr[x_329] = x_332;
+    int const x_332 = (*(tint_symbol_4)).arr[x_330];
+    (*(tint_symbol_3)).arr[x_329] = x_332;
     {
       int const x_334 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -135,7 +135,7 @@
       param_1 = x_367;
       int const x_368 = to_1;
       param_2 = x_368;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_370 = m;
         int const x_372 = i_2;
@@ -150,7 +150,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -161,52 +161,52 @@
     switch(x_92) {
       case 9: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -5;
+        (*(tint_symbol_7)).arr[x_122] = -5;
         break;
       }
       case 8: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -4;
+        (*(tint_symbol_7)).arr[x_120] = -4;
         break;
       }
       case 7: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -3;
+        (*(tint_symbol_7)).arr[x_118] = -3;
         break;
       }
       case 6: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -2;
+        (*(tint_symbol_7)).arr[x_116] = -2;
         break;
       }
       case 5: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = -1;
+        (*(tint_symbol_7)).arr[x_114] = -1;
         break;
       }
       case 4: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 0;
+        (*(tint_symbol_7)).arr[x_112] = 0;
         break;
       }
       case 3: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 1;
+        (*(tint_symbol_7)).arr[x_110] = 1;
         break;
       }
       case 2: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 2;
+        (*(tint_symbol_7)).arr[x_108] = 2;
         break;
       }
       case 1: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 3;
+        (*(tint_symbol_7)).arr[x_106] = 3;
         break;
       }
       case 0: {
         int const x_104 = i_3;
-        (*(tint_symbol_9)).arr[x_104] = 4;
+        (*(tint_symbol_7)).arr[x_104] = 4;
         break;
       }
       default: {
@@ -237,57 +237,57 @@
     }
     int const x_140 = j_1;
     int const x_141 = j_1;
-    int const x_143 = (*(tint_symbol_9)).arr[x_141];
-    (*(tint_symbol_10)).arr[x_140] = x_143;
+    int const x_143 = (*(tint_symbol_7)).arr[x_141];
+    (*(tint_symbol_8)).arr[x_140] = x_143;
     {
       int const x_145 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_145) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_149 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_149 = (*(tint_symbol_9)).y;
   if ((int(x_149) < 30)) {
-    int const x_156 = (*(tint_symbol_9)).arr[0];
+    int const x_156 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_156) / 10.0f));
   } else {
-    float const x_161 = (*(tint_symbol_11)).y;
+    float const x_161 = (*(tint_symbol_9)).y;
     if ((int(x_161) < 60)) {
-      int const x_168 = (*(tint_symbol_9)).arr[1];
+      int const x_168 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_168) / 10.0f));
     } else {
-      float const x_173 = (*(tint_symbol_11)).y;
+      float const x_173 = (*(tint_symbol_9)).y;
       if ((int(x_173) < 90)) {
-        int const x_180 = (*(tint_symbol_9)).arr[2];
+        int const x_180 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_180) / 10.0f));
       } else {
-        float const x_185 = (*(tint_symbol_11)).y;
+        float const x_185 = (*(tint_symbol_9)).y;
         if ((int(x_185) < 120)) {
-          int const x_192 = (*(tint_symbol_9)).arr[3];
+          int const x_192 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_192) / 10.0f));
         } else {
-          float const x_197 = (*(tint_symbol_11)).y;
+          float const x_197 = (*(tint_symbol_9)).y;
           if ((int(x_197) < 150)) {
             discard_fragment();
           } else {
-            float const x_204 = (*(tint_symbol_11)).y;
+            float const x_204 = (*(tint_symbol_9)).y;
             if ((int(x_204) < 180)) {
-              int const x_211 = (*(tint_symbol_9)).arr[5];
+              int const x_211 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_211) / 10.0f));
             } else {
-              float const x_216 = (*(tint_symbol_11)).y;
+              float const x_216 = (*(tint_symbol_9)).y;
               if ((int(x_216) < 210)) {
-                int const x_223 = (*(tint_symbol_9)).arr[6];
+                int const x_223 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_223) / 10.0f));
               } else {
-                float const x_228 = (*(tint_symbol_11)).y;
+                float const x_228 = (*(tint_symbol_9)).y;
                 if ((int(x_228) < 240)) {
-                  int const x_235 = (*(tint_symbol_9)).arr[7];
+                  int const x_235 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_235) / 10.0f));
                 } else {
-                  float const x_240 = (*(tint_symbol_11)).y;
+                  float const x_240 = (*(tint_symbol_9)).y;
                   bool guard233 = true;
                   if ((int(x_240) < 270)) {
-                    int const x_247 = (*(tint_symbol_9)).arr[8];
+                    int const x_247 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_247) / 10.0f));
                     guard233 = false;
                   } else {
@@ -311,19 +311,25 @@
   }
   float const x_255 = grey;
   float3 const x_256 = float3(x_255, x_255, x_255);
-  *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
+  *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl
index 53b5eb3..22bc5fd 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl
@@ -355,11 +355,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl
index e9de4df..2fa6daa 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -58,9 +58,9 @@
       break;
     }
     int const x_274 = i;
-    int const x_276 = (*(tint_symbol_5)).arr[x_274];
+    int const x_276 = (*(tint_symbol_3)).arr[x_274];
     int const x_277 = j;
-    int const x_279 = (*(tint_symbol_5)).arr[x_277];
+    int const x_279 = (*(tint_symbol_3)).arr[x_277];
     bool const x_280 = (x_276 < x_279);
     if (x_280) {
       x_285 = k;
@@ -99,7 +99,7 @@
     }
     int const x_315 = 0;
     if (x_280) {
-      x_320 = (*(tint_symbol_5)).arr[x_309];
+      x_320 = (*(tint_symbol_3)).arr[x_309];
       float const x_322 = x_28.injectionSwitch.y;
       x_328_phi = x_320;
       if (!((0.0f <= x_322))) {
@@ -116,7 +116,7 @@
     }
     int const x_328 = x_328_phi;
     if (x_280) {
-      (*(tint_symbol_6)).arr[x_287] = select(x_315, x_328, x_280);
+      (*(tint_symbol_4)).arr[x_287] = select(x_315, x_328, x_280);
     }
     if (x_280) {
       x_339 = 0;
@@ -153,13 +153,13 @@
       x_366 = 0;
       x_367_phi = x_366;
     } else {
-      x_365 = (*(tint_symbol_5)).arr[x_357];
+      x_365 = (*(tint_symbol_3)).arr[x_357];
       x_367_phi = x_365;
     }
     int const x_367 = x_367_phi;
     if (x_280) {
     } else {
-      (*(tint_symbol_6)).arr[x_340] = x_367;
+      (*(tint_symbol_4)).arr[x_340] = x_367;
     }
   }
   while (true) {
@@ -174,8 +174,8 @@
     k = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
     int const x_385 = i;
     i = as_type<int>((as_type<uint>(x_385) + as_type<uint>(1)));
-    int const x_388 = (*(tint_symbol_5)).arr[x_385];
-    (*(tint_symbol_6)).arr[x_383] = x_388;
+    int const x_388 = (*(tint_symbol_3)).arr[x_385];
+    (*(tint_symbol_4)).arr[x_383] = x_388;
   }
   int const x_390 = *(from);
   i_1 = x_390;
@@ -188,8 +188,8 @@
     }
     int const x_399 = i_1;
     int const x_400 = i_1;
-    int const x_402 = (*(tint_symbol_6)).arr[x_400];
-    (*(tint_symbol_5)).arr[x_399] = x_402;
+    int const x_402 = (*(tint_symbol_4)).arr[x_400];
+    (*(tint_symbol_3)).arr[x_399] = x_402;
     {
       int const x_404 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_404) + as_type<uint>(1)));
@@ -198,7 +198,7 @@
   return;
 }
 
-void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -243,7 +243,7 @@
       param_1 = x_437;
       int const x_438 = to_1;
       param_2 = x_438;
-      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_440 = m;
         int const x_442 = i_2;
@@ -258,7 +258,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -269,52 +269,52 @@
     switch(x_94) {
       case 9: {
         int const x_124 = i_3;
-        (*(tint_symbol_9)).arr[x_124] = -5;
+        (*(tint_symbol_7)).arr[x_124] = -5;
         break;
       }
       case 8: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -4;
+        (*(tint_symbol_7)).arr[x_122] = -4;
         break;
       }
       case 7: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -3;
+        (*(tint_symbol_7)).arr[x_120] = -3;
         break;
       }
       case 6: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -2;
+        (*(tint_symbol_7)).arr[x_118] = -2;
         break;
       }
       case 5: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -1;
+        (*(tint_symbol_7)).arr[x_116] = -1;
         break;
       }
       case 4: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = 0;
+        (*(tint_symbol_7)).arr[x_114] = 0;
         break;
       }
       case 3: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 1;
+        (*(tint_symbol_7)).arr[x_112] = 1;
         break;
       }
       case 2: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 2;
+        (*(tint_symbol_7)).arr[x_110] = 2;
         break;
       }
       case 1: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 3;
+        (*(tint_symbol_7)).arr[x_108] = 3;
         break;
       }
       case 0: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 4;
+        (*(tint_symbol_7)).arr[x_106] = 4;
         break;
       }
       default: {
@@ -340,56 +340,56 @@
     }
     int const x_137 = j_1;
     int const x_138 = j_1;
-    int const x_140 = (*(tint_symbol_9)).arr[x_138];
-    (*(tint_symbol_10)).arr[x_137] = x_140;
+    int const x_140 = (*(tint_symbol_7)).arr[x_138];
+    (*(tint_symbol_8)).arr[x_137] = x_140;
     {
       int const x_142 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
     }
   }
-  mergeSort_(x_28, tint_symbol_9, tint_symbol_10);
-  float const x_146 = (*(tint_symbol_11)).y;
+  mergeSort_(x_28, tint_symbol_7, tint_symbol_8);
+  float const x_146 = (*(tint_symbol_9)).y;
   if ((int(x_146) < 30)) {
-    int const x_153 = (*(tint_symbol_9)).arr[0];
+    int const x_153 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_153) / 10.0f));
   } else {
-    float const x_158 = (*(tint_symbol_11)).y;
+    float const x_158 = (*(tint_symbol_9)).y;
     if ((int(x_158) < 60)) {
-      int const x_165 = (*(tint_symbol_9)).arr[1];
+      int const x_165 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_165) / 10.0f));
     } else {
-      float const x_170 = (*(tint_symbol_11)).y;
+      float const x_170 = (*(tint_symbol_9)).y;
       if ((int(x_170) < 90)) {
-        int const x_177 = (*(tint_symbol_9)).arr[2];
+        int const x_177 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_177) / 10.0f));
       } else {
-        float const x_182 = (*(tint_symbol_11)).y;
+        float const x_182 = (*(tint_symbol_9)).y;
         if ((int(x_182) < 120)) {
-          int const x_189 = (*(tint_symbol_9)).arr[3];
+          int const x_189 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_189) / 10.0f));
         } else {
-          float const x_194 = (*(tint_symbol_11)).y;
+          float const x_194 = (*(tint_symbol_9)).y;
           if ((int(x_194) < 150)) {
             discard_fragment();
           } else {
-            float const x_201 = (*(tint_symbol_11)).y;
+            float const x_201 = (*(tint_symbol_9)).y;
             if ((int(x_201) < 180)) {
-              int const x_208 = (*(tint_symbol_9)).arr[5];
+              int const x_208 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_208) / 10.0f));
             } else {
-              float const x_213 = (*(tint_symbol_11)).y;
+              float const x_213 = (*(tint_symbol_9)).y;
               if ((int(x_213) < 210)) {
-                int const x_220 = (*(tint_symbol_9)).arr[6];
+                int const x_220 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_220) / 10.0f));
               } else {
-                float const x_225 = (*(tint_symbol_11)).y;
+                float const x_225 = (*(tint_symbol_9)).y;
                 if ((int(x_225) < 240)) {
-                  int const x_232 = (*(tint_symbol_9)).arr[7];
+                  int const x_232 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_232) / 10.0f));
                 } else {
-                  float const x_237 = (*(tint_symbol_11)).y;
+                  float const x_237 = (*(tint_symbol_9)).y;
                   if ((int(x_237) < 270)) {
-                    int const x_244 = (*(tint_symbol_9)).arr[8];
+                    int const x_244 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_244) / 10.0f));
                   } else {
                     discard_fragment();
@@ -404,19 +404,25 @@
   }
   float const x_248 = grey;
   float3 const x_249 = float3(x_248, x_248, x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl
index 5cccfe9..8e26fc7 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.hlsl
@@ -363,11 +363,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl
index 95f51be..c9324dd 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -58,9 +58,9 @@
       break;
     }
     int const x_274 = i;
-    int const x_276 = (*(tint_symbol_5)).arr[x_274];
+    int const x_276 = (*(tint_symbol_3)).arr[x_274];
     int const x_277 = j;
-    int const x_279 = (*(tint_symbol_5)).arr[x_277];
+    int const x_279 = (*(tint_symbol_3)).arr[x_277];
     bool const x_280 = (x_276 < x_279);
     if (x_280) {
       x_285 = k;
@@ -99,7 +99,7 @@
     }
     int const x_315 = 0;
     if (x_280) {
-      x_320 = (*(tint_symbol_5)).arr[x_309];
+      x_320 = (*(tint_symbol_3)).arr[x_309];
       float const x_322 = x_28.injectionSwitch.y;
       x_328_phi = x_320;
       if (!((0.0f <= x_322))) {
@@ -116,7 +116,7 @@
     }
     int const x_328 = x_328_phi;
     if (x_280) {
-      (*(tint_symbol_6)).arr[x_287] = select(x_315, x_328, x_280);
+      (*(tint_symbol_4)).arr[x_287] = select(x_315, x_328, x_280);
     }
     if (x_280) {
       x_339 = 0;
@@ -153,13 +153,13 @@
       x_366 = 0;
       x_367_phi = x_366;
     } else {
-      x_365 = (*(tint_symbol_5)).arr[x_357];
+      x_365 = (*(tint_symbol_3)).arr[x_357];
       x_367_phi = x_365;
     }
     int const x_367 = x_367_phi;
     if (x_280) {
     } else {
-      (*(tint_symbol_6)).arr[x_340] = x_367;
+      (*(tint_symbol_4)).arr[x_340] = x_367;
     }
   }
   while (true) {
@@ -174,8 +174,8 @@
     k = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
     int const x_385 = i;
     i = as_type<int>((as_type<uint>(x_385) + as_type<uint>(1)));
-    int const x_388 = (*(tint_symbol_5)).arr[x_385];
-    (*(tint_symbol_6)).arr[x_383] = x_388;
+    int const x_388 = (*(tint_symbol_3)).arr[x_385];
+    (*(tint_symbol_4)).arr[x_383] = x_388;
   }
   int const x_390 = *(from);
   i_1 = x_390;
@@ -188,8 +188,8 @@
     }
     int const x_399 = i_1;
     int const x_400 = i_1;
-    int const x_402 = (*(tint_symbol_6)).arr[x_400];
-    (*(tint_symbol_5)).arr[x_399] = x_402;
+    int const x_402 = (*(tint_symbol_4)).arr[x_400];
+    (*(tint_symbol_3)).arr[x_399] = x_402;
     {
       int const x_404 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_404) + as_type<uint>(1)));
@@ -198,7 +198,7 @@
   return;
 }
 
-void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -243,7 +243,7 @@
       param_1 = x_437;
       int const x_438 = to_1;
       param_2 = x_438;
-      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_440 = m;
         int const x_442 = i_2;
@@ -258,7 +258,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -269,52 +269,52 @@
     switch(x_94) {
       case 9: {
         int const x_124 = i_3;
-        (*(tint_symbol_9)).arr[x_124] = -5;
+        (*(tint_symbol_7)).arr[x_124] = -5;
         break;
       }
       case 8: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -4;
+        (*(tint_symbol_7)).arr[x_122] = -4;
         break;
       }
       case 7: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -3;
+        (*(tint_symbol_7)).arr[x_120] = -3;
         break;
       }
       case 6: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -2;
+        (*(tint_symbol_7)).arr[x_118] = -2;
         break;
       }
       case 5: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -1;
+        (*(tint_symbol_7)).arr[x_116] = -1;
         break;
       }
       case 4: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = 0;
+        (*(tint_symbol_7)).arr[x_114] = 0;
         break;
       }
       case 3: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 1;
+        (*(tint_symbol_7)).arr[x_112] = 1;
         break;
       }
       case 2: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 2;
+        (*(tint_symbol_7)).arr[x_110] = 2;
         break;
       }
       case 1: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 3;
+        (*(tint_symbol_7)).arr[x_108] = 3;
         break;
       }
       case 0: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 4;
+        (*(tint_symbol_7)).arr[x_106] = 4;
         break;
       }
       default: {
@@ -340,56 +340,56 @@
     }
     int const x_137 = j_1;
     int const x_138 = j_1;
-    int const x_140 = (*(tint_symbol_9)).arr[x_138];
-    (*(tint_symbol_10)).arr[x_137] = x_140;
+    int const x_140 = (*(tint_symbol_7)).arr[x_138];
+    (*(tint_symbol_8)).arr[x_137] = x_140;
     {
       int const x_142 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
     }
   }
-  mergeSort_(x_28, tint_symbol_9, tint_symbol_10);
-  float const x_146 = (*(tint_symbol_11)).y;
+  mergeSort_(x_28, tint_symbol_7, tint_symbol_8);
+  float const x_146 = (*(tint_symbol_9)).y;
   if ((int(x_146) < 30)) {
-    int const x_153 = (*(tint_symbol_9)).arr[0];
+    int const x_153 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_153) / 10.0f));
   } else {
-    float const x_158 = (*(tint_symbol_11)).y;
+    float const x_158 = (*(tint_symbol_9)).y;
     if ((int(x_158) < 60)) {
-      int const x_165 = (*(tint_symbol_9)).arr[1];
+      int const x_165 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_165) / 10.0f));
     } else {
-      float const x_170 = (*(tint_symbol_11)).y;
+      float const x_170 = (*(tint_symbol_9)).y;
       if ((int(x_170) < 90)) {
-        int const x_177 = (*(tint_symbol_9)).arr[2];
+        int const x_177 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_177) / 10.0f));
       } else {
-        float const x_182 = (*(tint_symbol_11)).y;
+        float const x_182 = (*(tint_symbol_9)).y;
         if ((int(x_182) < 120)) {
-          int const x_189 = (*(tint_symbol_9)).arr[3];
+          int const x_189 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_189) / 10.0f));
         } else {
-          float const x_194 = (*(tint_symbol_11)).y;
+          float const x_194 = (*(tint_symbol_9)).y;
           if ((int(x_194) < 150)) {
             discard_fragment();
           } else {
-            float const x_201 = (*(tint_symbol_11)).y;
+            float const x_201 = (*(tint_symbol_9)).y;
             if ((int(x_201) < 180)) {
-              int const x_208 = (*(tint_symbol_9)).arr[5];
+              int const x_208 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_208) / 10.0f));
             } else {
-              float const x_213 = (*(tint_symbol_11)).y;
+              float const x_213 = (*(tint_symbol_9)).y;
               if ((int(x_213) < 210)) {
-                int const x_220 = (*(tint_symbol_9)).arr[6];
+                int const x_220 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_220) / 10.0f));
               } else {
-                float const x_225 = (*(tint_symbol_11)).y;
+                float const x_225 = (*(tint_symbol_9)).y;
                 if ((int(x_225) < 240)) {
-                  int const x_232 = (*(tint_symbol_9)).arr[7];
+                  int const x_232 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_232) / 10.0f));
                 } else {
-                  float const x_237 = (*(tint_symbol_11)).y;
+                  float const x_237 = (*(tint_symbol_9)).y;
                   if ((int(x_237) < 270)) {
-                    int const x_244 = (*(tint_symbol_9)).arr[8];
+                    int const x_244 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_244) / 10.0f));
                   } else {
                     discard_fragment();
@@ -404,19 +404,25 @@
   }
   float const x_248 = grey;
   float3 const x_249 = float3(x_248, x_248, x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl
index 316ccb0..47787ab 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl
@@ -354,11 +354,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl
index a814f01..a7866a2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -57,9 +57,9 @@
       break;
     }
     int const x_272 = i;
-    int const x_274 = (*(tint_symbol_5)).arr[x_272];
+    int const x_274 = (*(tint_symbol_3)).arr[x_272];
     int const x_275 = j;
-    int const x_277 = (*(tint_symbol_5)).arr[x_275];
+    int const x_277 = (*(tint_symbol_3)).arr[x_275];
     bool const x_278 = (x_274 < x_277);
     if (x_278) {
       x_283 = k;
@@ -98,7 +98,7 @@
     }
     int const x_313 = 0;
     if (x_278) {
-      x_318 = (*(tint_symbol_5)).arr[x_307];
+      x_318 = (*(tint_symbol_3)).arr[x_307];
       float const x_320 = x_28.injectionSwitch.y;
       x_326_phi = x_318;
       if (!((0.0f <= x_320))) {
@@ -115,7 +115,7 @@
     }
     int const x_326 = x_326_phi;
     if (x_278) {
-      (*(tint_symbol_6)).arr[x_285] = select(x_313, x_326, x_278);
+      (*(tint_symbol_4)).arr[x_285] = select(x_313, x_326, x_278);
     }
     if (x_278) {
       x_337 = 0;
@@ -152,13 +152,13 @@
       x_364 = 0;
       x_365_phi = x_364;
     } else {
-      x_363 = (*(tint_symbol_5)).arr[x_355];
+      x_363 = (*(tint_symbol_3)).arr[x_355];
       x_365_phi = x_363;
     }
     int const x_365 = x_365_phi;
     if (x_278) {
     } else {
-      (*(tint_symbol_6)).arr[x_338] = x_365;
+      (*(tint_symbol_4)).arr[x_338] = x_365;
     }
   }
   while (true) {
@@ -173,8 +173,8 @@
     k = as_type<int>((as_type<uint>(x_381) + as_type<uint>(1)));
     int const x_383 = i;
     i = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
-    int const x_386 = (*(tint_symbol_5)).arr[x_383];
-    (*(tint_symbol_6)).arr[x_381] = x_386;
+    int const x_386 = (*(tint_symbol_3)).arr[x_383];
+    (*(tint_symbol_4)).arr[x_381] = x_386;
   }
   int const x_388 = *(from);
   i_1 = x_388;
@@ -187,8 +187,8 @@
     }
     int const x_397 = i_1;
     int const x_398 = i_1;
-    int const x_400 = (*(tint_symbol_6)).arr[x_398];
-    (*(tint_symbol_5)).arr[x_397] = x_400;
+    int const x_400 = (*(tint_symbol_4)).arr[x_398];
+    (*(tint_symbol_3)).arr[x_397] = x_400;
     {
       int const x_402 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_402) + as_type<uint>(1)));
@@ -197,7 +197,7 @@
   return;
 }
 
-void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -242,7 +242,7 @@
       param_1 = x_435;
       int const x_436 = to_1;
       param_2 = x_436;
-      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_438 = m;
         int const x_440 = i_2;
@@ -257,7 +257,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -268,52 +268,52 @@
     switch(x_94) {
       case 9: {
         int const x_124 = i_3;
-        (*(tint_symbol_9)).arr[x_124] = -5;
+        (*(tint_symbol_7)).arr[x_124] = -5;
         break;
       }
       case 8: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -4;
+        (*(tint_symbol_7)).arr[x_122] = -4;
         break;
       }
       case 7: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -3;
+        (*(tint_symbol_7)).arr[x_120] = -3;
         break;
       }
       case 6: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -2;
+        (*(tint_symbol_7)).arr[x_118] = -2;
         break;
       }
       case 5: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -1;
+        (*(tint_symbol_7)).arr[x_116] = -1;
         break;
       }
       case 4: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = 0;
+        (*(tint_symbol_7)).arr[x_114] = 0;
         break;
       }
       case 3: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 1;
+        (*(tint_symbol_7)).arr[x_112] = 1;
         break;
       }
       case 2: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 2;
+        (*(tint_symbol_7)).arr[x_110] = 2;
         break;
       }
       case 1: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 3;
+        (*(tint_symbol_7)).arr[x_108] = 3;
         break;
       }
       case 0: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 4;
+        (*(tint_symbol_7)).arr[x_106] = 4;
         break;
       }
       default: {
@@ -339,56 +339,56 @@
     }
     int const x_137 = j_1;
     int const x_138 = j_1;
-    int const x_140 = (*(tint_symbol_9)).arr[x_138];
-    (*(tint_symbol_10)).arr[x_137] = x_140;
+    int const x_140 = (*(tint_symbol_7)).arr[x_138];
+    (*(tint_symbol_8)).arr[x_137] = x_140;
     {
       int const x_142 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
     }
   }
-  mergeSort_(x_28, tint_symbol_9, tint_symbol_10);
-  float const x_146 = (*(tint_symbol_11)).y;
+  mergeSort_(x_28, tint_symbol_7, tint_symbol_8);
+  float const x_146 = (*(tint_symbol_9)).y;
   if ((int(x_146) < 30)) {
-    int const x_153 = (*(tint_symbol_9)).arr[0];
+    int const x_153 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_153) / 10.0f));
   } else {
-    float const x_158 = (*(tint_symbol_11)).y;
+    float const x_158 = (*(tint_symbol_9)).y;
     if ((int(x_158) < 60)) {
-      int const x_165 = (*(tint_symbol_9)).arr[1];
+      int const x_165 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_165) / 10.0f));
     } else {
-      float const x_170 = (*(tint_symbol_11)).y;
+      float const x_170 = (*(tint_symbol_9)).y;
       if ((int(x_170) < 90)) {
-        int const x_177 = (*(tint_symbol_9)).arr[2];
+        int const x_177 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_177) / 10.0f));
       } else {
-        float const x_182 = (*(tint_symbol_11)).y;
+        float const x_182 = (*(tint_symbol_9)).y;
         if ((int(x_182) < 120)) {
-          int const x_189 = (*(tint_symbol_9)).arr[3];
+          int const x_189 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_189) / 10.0f));
         } else {
-          float const x_194 = (*(tint_symbol_11)).y;
+          float const x_194 = (*(tint_symbol_9)).y;
           if ((int(x_194) < 150)) {
             discard_fragment();
           } else {
-            float const x_201 = (*(tint_symbol_11)).y;
+            float const x_201 = (*(tint_symbol_9)).y;
             if ((int(x_201) < 180)) {
-              int const x_208 = (*(tint_symbol_9)).arr[5];
+              int const x_208 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_208) / 10.0f));
             } else {
-              float const x_213 = (*(tint_symbol_11)).y;
+              float const x_213 = (*(tint_symbol_9)).y;
               if ((int(x_213) < 210)) {
-                int const x_220 = (*(tint_symbol_9)).arr[6];
+                int const x_220 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_220) / 10.0f));
               } else {
-                float const x_225 = (*(tint_symbol_11)).y;
+                float const x_225 = (*(tint_symbol_9)).y;
                 if ((int(x_225) < 240)) {
-                  int const x_232 = (*(tint_symbol_9)).arr[7];
+                  int const x_232 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_232) / 10.0f));
                 } else {
-                  float const x_237 = (*(tint_symbol_11)).y;
+                  float const x_237 = (*(tint_symbol_9)).y;
                   if ((int(x_237) < 270)) {
-                    int const x_244 = (*(tint_symbol_9)).arr[8];
+                    int const x_244 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_244) / 10.0f));
                   } else {
                     discard_fragment();
@@ -403,19 +403,25 @@
   }
   float const x_248 = grey;
   float3 const x_249 = float3(x_248, x_248, x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl
index 9cf6e4b..5f44e60 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.hlsl
@@ -362,11 +362,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl
index ce84bf6..82af62c 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -57,9 +57,9 @@
       break;
     }
     int const x_272 = i;
-    int const x_274 = (*(tint_symbol_5)).arr[x_272];
+    int const x_274 = (*(tint_symbol_3)).arr[x_272];
     int const x_275 = j;
-    int const x_277 = (*(tint_symbol_5)).arr[x_275];
+    int const x_277 = (*(tint_symbol_3)).arr[x_275];
     bool const x_278 = (x_274 < x_277);
     if (x_278) {
       x_283 = k;
@@ -98,7 +98,7 @@
     }
     int const x_313 = 0;
     if (x_278) {
-      x_318 = (*(tint_symbol_5)).arr[x_307];
+      x_318 = (*(tint_symbol_3)).arr[x_307];
       float const x_320 = x_28.injectionSwitch.y;
       x_326_phi = x_318;
       if (!((0.0f <= x_320))) {
@@ -115,7 +115,7 @@
     }
     int const x_326 = x_326_phi;
     if (x_278) {
-      (*(tint_symbol_6)).arr[x_285] = select(x_313, x_326, x_278);
+      (*(tint_symbol_4)).arr[x_285] = select(x_313, x_326, x_278);
     }
     if (x_278) {
       x_337 = 0;
@@ -152,13 +152,13 @@
       x_364 = 0;
       x_365_phi = x_364;
     } else {
-      x_363 = (*(tint_symbol_5)).arr[x_355];
+      x_363 = (*(tint_symbol_3)).arr[x_355];
       x_365_phi = x_363;
     }
     int const x_365 = x_365_phi;
     if (x_278) {
     } else {
-      (*(tint_symbol_6)).arr[x_338] = x_365;
+      (*(tint_symbol_4)).arr[x_338] = x_365;
     }
   }
   while (true) {
@@ -173,8 +173,8 @@
     k = as_type<int>((as_type<uint>(x_381) + as_type<uint>(1)));
     int const x_383 = i;
     i = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
-    int const x_386 = (*(tint_symbol_5)).arr[x_383];
-    (*(tint_symbol_6)).arr[x_381] = x_386;
+    int const x_386 = (*(tint_symbol_3)).arr[x_383];
+    (*(tint_symbol_4)).arr[x_381] = x_386;
   }
   int const x_388 = *(from);
   i_1 = x_388;
@@ -187,8 +187,8 @@
     }
     int const x_397 = i_1;
     int const x_398 = i_1;
-    int const x_400 = (*(tint_symbol_6)).arr[x_398];
-    (*(tint_symbol_5)).arr[x_397] = x_400;
+    int const x_400 = (*(tint_symbol_4)).arr[x_398];
+    (*(tint_symbol_3)).arr[x_397] = x_400;
     {
       int const x_402 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_402) + as_type<uint>(1)));
@@ -197,7 +197,7 @@
   return;
 }
 
-void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -242,7 +242,7 @@
       param_1 = x_435;
       int const x_436 = to_1;
       param_2 = x_436;
-      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(x_28, &(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_438 = m;
         int const x_440 = i_2;
@@ -257,7 +257,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -268,52 +268,52 @@
     switch(x_94) {
       case 9: {
         int const x_124 = i_3;
-        (*(tint_symbol_9)).arr[x_124] = -5;
+        (*(tint_symbol_7)).arr[x_124] = -5;
         break;
       }
       case 8: {
         int const x_122 = i_3;
-        (*(tint_symbol_9)).arr[x_122] = -4;
+        (*(tint_symbol_7)).arr[x_122] = -4;
         break;
       }
       case 7: {
         int const x_120 = i_3;
-        (*(tint_symbol_9)).arr[x_120] = -3;
+        (*(tint_symbol_7)).arr[x_120] = -3;
         break;
       }
       case 6: {
         int const x_118 = i_3;
-        (*(tint_symbol_9)).arr[x_118] = -2;
+        (*(tint_symbol_7)).arr[x_118] = -2;
         break;
       }
       case 5: {
         int const x_116 = i_3;
-        (*(tint_symbol_9)).arr[x_116] = -1;
+        (*(tint_symbol_7)).arr[x_116] = -1;
         break;
       }
       case 4: {
         int const x_114 = i_3;
-        (*(tint_symbol_9)).arr[x_114] = 0;
+        (*(tint_symbol_7)).arr[x_114] = 0;
         break;
       }
       case 3: {
         int const x_112 = i_3;
-        (*(tint_symbol_9)).arr[x_112] = 1;
+        (*(tint_symbol_7)).arr[x_112] = 1;
         break;
       }
       case 2: {
         int const x_110 = i_3;
-        (*(tint_symbol_9)).arr[x_110] = 2;
+        (*(tint_symbol_7)).arr[x_110] = 2;
         break;
       }
       case 1: {
         int const x_108 = i_3;
-        (*(tint_symbol_9)).arr[x_108] = 3;
+        (*(tint_symbol_7)).arr[x_108] = 3;
         break;
       }
       case 0: {
         int const x_106 = i_3;
-        (*(tint_symbol_9)).arr[x_106] = 4;
+        (*(tint_symbol_7)).arr[x_106] = 4;
         break;
       }
       default: {
@@ -339,56 +339,56 @@
     }
     int const x_137 = j_1;
     int const x_138 = j_1;
-    int const x_140 = (*(tint_symbol_9)).arr[x_138];
-    (*(tint_symbol_10)).arr[x_137] = x_140;
+    int const x_140 = (*(tint_symbol_7)).arr[x_138];
+    (*(tint_symbol_8)).arr[x_137] = x_140;
     {
       int const x_142 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
     }
   }
-  mergeSort_(x_28, tint_symbol_9, tint_symbol_10);
-  float const x_146 = (*(tint_symbol_11)).y;
+  mergeSort_(x_28, tint_symbol_7, tint_symbol_8);
+  float const x_146 = (*(tint_symbol_9)).y;
   if ((int(x_146) < 30)) {
-    int const x_153 = (*(tint_symbol_9)).arr[0];
+    int const x_153 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_153) / 10.0f));
   } else {
-    float const x_158 = (*(tint_symbol_11)).y;
+    float const x_158 = (*(tint_symbol_9)).y;
     if ((int(x_158) < 60)) {
-      int const x_165 = (*(tint_symbol_9)).arr[1];
+      int const x_165 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_165) / 10.0f));
     } else {
-      float const x_170 = (*(tint_symbol_11)).y;
+      float const x_170 = (*(tint_symbol_9)).y;
       if ((int(x_170) < 90)) {
-        int const x_177 = (*(tint_symbol_9)).arr[2];
+        int const x_177 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_177) / 10.0f));
       } else {
-        float const x_182 = (*(tint_symbol_11)).y;
+        float const x_182 = (*(tint_symbol_9)).y;
         if ((int(x_182) < 120)) {
-          int const x_189 = (*(tint_symbol_9)).arr[3];
+          int const x_189 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_189) / 10.0f));
         } else {
-          float const x_194 = (*(tint_symbol_11)).y;
+          float const x_194 = (*(tint_symbol_9)).y;
           if ((int(x_194) < 150)) {
             discard_fragment();
           } else {
-            float const x_201 = (*(tint_symbol_11)).y;
+            float const x_201 = (*(tint_symbol_9)).y;
             if ((int(x_201) < 180)) {
-              int const x_208 = (*(tint_symbol_9)).arr[5];
+              int const x_208 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_208) / 10.0f));
             } else {
-              float const x_213 = (*(tint_symbol_11)).y;
+              float const x_213 = (*(tint_symbol_9)).y;
               if ((int(x_213) < 210)) {
-                int const x_220 = (*(tint_symbol_9)).arr[6];
+                int const x_220 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_220) / 10.0f));
               } else {
-                float const x_225 = (*(tint_symbol_11)).y;
+                float const x_225 = (*(tint_symbol_9)).y;
                 if ((int(x_225) < 240)) {
-                  int const x_232 = (*(tint_symbol_9)).arr[7];
+                  int const x_232 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_232) / 10.0f));
                 } else {
-                  float const x_237 = (*(tint_symbol_11)).y;
+                  float const x_237 = (*(tint_symbol_9)).y;
                   if ((int(x_237) < 270)) {
-                    int const x_244 = (*(tint_symbol_9)).arr[8];
+                    int const x_244 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_244) / 10.0f));
                   } else {
                     discard_fragment();
@@ -403,19 +403,25 @@
   }
   float const x_248 = grey;
   float3 const x_249 = float3(x_248, x_248, x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  *(tint_symbol_10) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl
index 11f7dec..926a578 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl
@@ -168,8 +168,8 @@
           const int x_170 = x_91;
           const int x_171 = x_92;
           const int x_173[10] = data;
-          const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-          data = tint_symbol_5;
+          const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+          data = tint_symbol_4;
           data = x_173;
           x_89 = ((x_170 + x_171) - 1);
           x_88 = min(((x_91 + (2 * x_92)) - 1), x_93);
@@ -251,13 +251,18 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 void mergeSort_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl
index 4f62633..98f46a0 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_319 = i;
-    int const x_321 = (*(tint_symbol_6)).arr[x_319];
+    int const x_321 = (*(tint_symbol_4)).arr[x_319];
     int const x_322 = j;
-    int const x_324 = (*(tint_symbol_6)).arr[x_322];
+    int const x_324 = (*(tint_symbol_4)).arr[x_322];
     if ((x_321 < x_324)) {
       int const x_329 = k;
       k = as_type<int>((as_type<uint>(x_329) + as_type<uint>(1)));
       int const x_331 = i;
       i = as_type<int>((as_type<uint>(x_331) + as_type<uint>(1)));
-      int const x_334 = (*(tint_symbol_6)).arr[x_331];
-      (*(tint_symbol_7)).arr[x_329] = x_334;
+      int const x_334 = (*(tint_symbol_4)).arr[x_331];
+      (*(tint_symbol_5)).arr[x_329] = x_334;
     } else {
       int const x_336 = k;
       k = as_type<int>((as_type<uint>(x_336) + as_type<uint>(1)));
       int const x_338 = j;
       j = as_type<int>((as_type<uint>(x_338) + as_type<uint>(1)));
-      int const x_341 = (*(tint_symbol_6)).arr[x_338];
-      (*(tint_symbol_7)).arr[x_336] = x_341;
+      int const x_341 = (*(tint_symbol_4)).arr[x_338];
+      (*(tint_symbol_5)).arr[x_336] = x_341;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_354) + as_type<uint>(1)));
     int const x_356 = i;
     i = as_type<int>((as_type<uint>(x_356) + as_type<uint>(1)));
-    int const x_359 = (*(tint_symbol_6)).arr[x_356];
-    (*(tint_symbol_7)).arr[x_354] = x_359;
+    int const x_359 = (*(tint_symbol_4)).arr[x_356];
+    (*(tint_symbol_5)).arr[x_354] = x_359;
   }
   int const x_361 = *(from);
   i_1 = x_361;
@@ -80,8 +80,8 @@
     }
     int const x_370 = i_1;
     int const x_371 = i_1;
-    int const x_373 = (*(tint_symbol_7)).arr[x_371];
-    (*(tint_symbol_6)).arr[x_370] = x_373;
+    int const x_373 = (*(tint_symbol_5)).arr[x_371];
+    (*(tint_symbol_4)).arr[x_370] = x_373;
     {
       int const x_375 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_375) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int x_85 = 0;
   int x_86 = 0;
   int x_87 = 0;
@@ -111,52 +111,52 @@
     switch(x_102) {
       case 9: {
         int const x_132 = i_3;
-        (*(tint_symbol_8)).arr[x_132] = -5;
+        (*(tint_symbol_6)).arr[x_132] = -5;
         break;
       }
       case 8: {
         int const x_130 = i_3;
-        (*(tint_symbol_8)).arr[x_130] = -4;
+        (*(tint_symbol_6)).arr[x_130] = -4;
         break;
       }
       case 7: {
         int const x_128 = i_3;
-        (*(tint_symbol_8)).arr[x_128] = -3;
+        (*(tint_symbol_6)).arr[x_128] = -3;
         break;
       }
       case 6: {
         int const x_126 = i_3;
-        (*(tint_symbol_8)).arr[x_126] = -2;
+        (*(tint_symbol_6)).arr[x_126] = -2;
         break;
       }
       case 5: {
         int const x_124 = i_3;
-        (*(tint_symbol_8)).arr[x_124] = -1;
+        (*(tint_symbol_6)).arr[x_124] = -1;
         break;
       }
       case 4: {
         int const x_122 = i_3;
-        (*(tint_symbol_8)).arr[x_122] = 0;
+        (*(tint_symbol_6)).arr[x_122] = 0;
         break;
       }
       case 3: {
         int const x_120 = i_3;
-        (*(tint_symbol_8)).arr[x_120] = 1;
+        (*(tint_symbol_6)).arr[x_120] = 1;
         break;
       }
       case 2: {
         int const x_118 = i_3;
-        (*(tint_symbol_8)).arr[x_118] = 2;
+        (*(tint_symbol_6)).arr[x_118] = 2;
         break;
       }
       case 1: {
         int const x_116 = i_3;
-        (*(tint_symbol_8)).arr[x_116] = 3;
+        (*(tint_symbol_6)).arr[x_116] = 3;
         break;
       }
       case 0: {
         int const x_114 = i_3;
-        (*(tint_symbol_8)).arr[x_114] = 4;
+        (*(tint_symbol_6)).arr[x_114] = 4;
         break;
       }
       default: {
@@ -182,8 +182,8 @@
     }
     int const x_145 = j_1;
     int const x_146 = j_1;
-    int const x_148 = (*(tint_symbol_8)).arr[x_146];
-    (*(tint_symbol_9)).arr[x_145] = x_148;
+    int const x_148 = (*(tint_symbol_6)).arr[x_146];
+    (*(tint_symbol_7)).arr[x_145] = x_148;
     {
       int const x_150 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
@@ -212,10 +212,10 @@
       x_90 = x_169;
       int const x_170 = x_91;
       int const x_171 = x_92;
-      tint_array_wrapper const x_173 = *(tint_symbol_8);
-      tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      *(tint_symbol_8) = tint_symbol_4;
-      *(tint_symbol_8) = x_173;
+      tint_array_wrapper const x_173 = *(tint_symbol_6);
+      tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      *(tint_symbol_6) = tint_symbol_2;
+      *(tint_symbol_6) = x_173;
       x_89 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_170) + as_type<uint>(x_171)))) - as_type<uint>(1)));
       int const x_175 = x_91;
       int const x_176 = x_92;
@@ -227,7 +227,7 @@
       x_86 = x_183;
       int const x_184 = x_88;
       x_85 = x_184;
-      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_8, tint_symbol_9);
+      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_6, tint_symbol_7);
       {
         int const x_186 = x_92;
         int const x_188 = x_91;
@@ -239,48 +239,48 @@
       x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_190)));
     }
   }
-  float const x_194 = (*(tint_symbol_10)).y;
+  float const x_194 = (*(tint_symbol_8)).y;
   if ((int(x_194) < 30)) {
-    int const x_201 = (*(tint_symbol_8)).arr[0];
+    int const x_201 = (*(tint_symbol_6)).arr[0];
     grey = (0.5f + (float(x_201) / 10.0f));
   } else {
-    float const x_206 = (*(tint_symbol_10)).y;
+    float const x_206 = (*(tint_symbol_8)).y;
     if ((int(x_206) < 60)) {
-      int const x_213 = (*(tint_symbol_8)).arr[1];
+      int const x_213 = (*(tint_symbol_6)).arr[1];
       grey = (0.5f + (float(x_213) / 10.0f));
     } else {
-      float const x_218 = (*(tint_symbol_10)).y;
+      float const x_218 = (*(tint_symbol_8)).y;
       if ((int(x_218) < 90)) {
-        int const x_225 = (*(tint_symbol_8)).arr[2];
+        int const x_225 = (*(tint_symbol_6)).arr[2];
         grey = (0.5f + (float(x_225) / 10.0f));
       } else {
-        float const x_230 = (*(tint_symbol_10)).y;
+        float const x_230 = (*(tint_symbol_8)).y;
         if ((int(x_230) < 120)) {
-          int const x_237 = (*(tint_symbol_8)).arr[3];
+          int const x_237 = (*(tint_symbol_6)).arr[3];
           grey = (0.5f + (float(x_237) / 10.0f));
         } else {
-          float const x_242 = (*(tint_symbol_10)).y;
+          float const x_242 = (*(tint_symbol_8)).y;
           if ((int(x_242) < 150)) {
             discard_fragment();
           } else {
-            float const x_249 = (*(tint_symbol_10)).y;
+            float const x_249 = (*(tint_symbol_8)).y;
             if ((int(x_249) < 180)) {
-              int const x_256 = (*(tint_symbol_8)).arr[5];
+              int const x_256 = (*(tint_symbol_6)).arr[5];
               grey = (0.5f + (float(x_256) / 10.0f));
             } else {
-              float const x_261 = (*(tint_symbol_10)).y;
+              float const x_261 = (*(tint_symbol_8)).y;
               if ((int(x_261) < 210)) {
-                int const x_268 = (*(tint_symbol_8)).arr[6];
+                int const x_268 = (*(tint_symbol_6)).arr[6];
                 grey = (0.5f + (float(x_268) / 10.0f));
               } else {
-                float const x_273 = (*(tint_symbol_10)).y;
+                float const x_273 = (*(tint_symbol_8)).y;
                 if ((int(x_273) < 240)) {
-                  int const x_280 = (*(tint_symbol_8)).arr[7];
+                  int const x_280 = (*(tint_symbol_6)).arr[7];
                   grey = (0.5f + (float(x_280) / 10.0f));
                 } else {
-                  float const x_285 = (*(tint_symbol_10)).y;
+                  float const x_285 = (*(tint_symbol_8)).y;
                   if ((int(x_285) < 270)) {
-                    int const x_292 = (*(tint_symbol_8)).arr[8];
+                    int const x_292 = (*(tint_symbol_6)).arr[8];
                     grey = (0.5f + (float(x_292) / 10.0f));
                   } else {
                     discard_fragment();
@@ -295,23 +295,29 @@
   }
   float const x_296 = grey;
   float3 const x_297 = float3(x_296, x_296, x_296);
-  *(tint_symbol_11) = float4(x_297.x, x_297.y, x_297.z, 1.0f);
+  *(tint_symbol_9) = float4(x_297.x, x_297.y, x_297.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread tint_array_wrapper tint_symbol_13 = {};
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread float4 tint_symbol_15 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_12), &(tint_symbol_15));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_11, tint_symbol_12, tint_symbol_10, tint_symbol_13);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_13)};
+  return tint_symbol_3;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_array_wrapper* const tint_symbol_17) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_14 = 0.0f;
+  thread tint_array_wrapper tint_symbol_15 = {};
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread float4 tint_symbol_17 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
+}
+
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_18, thread tint_array_wrapper* const tint_symbol_19) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -356,7 +362,7 @@
       param_1 = x_408;
       int const x_409 = to_1;
       param_2 = x_409;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_16, tint_symbol_17);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_18, tint_symbol_19);
       {
         int const x_411 = m;
         int const x_413 = i_2;
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl
index 03b86e8..f0bce55 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.hlsl
@@ -176,8 +176,8 @@
           const int x_170 = x_91;
           const int x_171 = x_92;
           const int x_173[10] = data;
-          const int tint_symbol_5[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-          data = tint_symbol_5;
+          const int tint_symbol_4[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+          data = tint_symbol_4;
           data = x_173;
           x_89 = ((x_170 + x_171) - 1);
           x_88 = min(((x_91 + (2 * x_92)) - 1), x_93);
@@ -259,13 +259,18 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 void mergeSort_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl
index 13c5382..49f299e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_4, thread tint_array_wrapper* const tint_symbol_5) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_319 = i;
-    int const x_321 = (*(tint_symbol_6)).arr[x_319];
+    int const x_321 = (*(tint_symbol_4)).arr[x_319];
     int const x_322 = j;
-    int const x_324 = (*(tint_symbol_6)).arr[x_322];
+    int const x_324 = (*(tint_symbol_4)).arr[x_322];
     if ((x_321 < x_324)) {
       int const x_329 = k;
       k = as_type<int>((as_type<uint>(x_329) + as_type<uint>(1)));
       int const x_331 = i;
       i = as_type<int>((as_type<uint>(x_331) + as_type<uint>(1)));
-      int const x_334 = (*(tint_symbol_6)).arr[x_331];
-      (*(tint_symbol_7)).arr[x_329] = x_334;
+      int const x_334 = (*(tint_symbol_4)).arr[x_331];
+      (*(tint_symbol_5)).arr[x_329] = x_334;
     } else {
       int const x_336 = k;
       k = as_type<int>((as_type<uint>(x_336) + as_type<uint>(1)));
       int const x_338 = j;
       j = as_type<int>((as_type<uint>(x_338) + as_type<uint>(1)));
-      int const x_341 = (*(tint_symbol_6)).arr[x_338];
-      (*(tint_symbol_7)).arr[x_336] = x_341;
+      int const x_341 = (*(tint_symbol_4)).arr[x_338];
+      (*(tint_symbol_5)).arr[x_336] = x_341;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_354) + as_type<uint>(1)));
     int const x_356 = i;
     i = as_type<int>((as_type<uint>(x_356) + as_type<uint>(1)));
-    int const x_359 = (*(tint_symbol_6)).arr[x_356];
-    (*(tint_symbol_7)).arr[x_354] = x_359;
+    int const x_359 = (*(tint_symbol_4)).arr[x_356];
+    (*(tint_symbol_5)).arr[x_354] = x_359;
   }
   int const x_361 = *(from);
   i_1 = x_361;
@@ -80,8 +80,8 @@
     }
     int const x_370 = i_1;
     int const x_371 = i_1;
-    int const x_373 = (*(tint_symbol_7)).arr[x_371];
-    (*(tint_symbol_6)).arr[x_370] = x_373;
+    int const x_373 = (*(tint_symbol_5)).arr[x_371];
+    (*(tint_symbol_4)).arr[x_370] = x_373;
     {
       int const x_375 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_375) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int x_85 = 0;
   int x_86 = 0;
   int x_87 = 0;
@@ -111,52 +111,52 @@
     switch(x_102) {
       case 9: {
         int const x_132 = i_3;
-        (*(tint_symbol_8)).arr[x_132] = -5;
+        (*(tint_symbol_6)).arr[x_132] = -5;
         break;
       }
       case 8: {
         int const x_130 = i_3;
-        (*(tint_symbol_8)).arr[x_130] = -4;
+        (*(tint_symbol_6)).arr[x_130] = -4;
         break;
       }
       case 7: {
         int const x_128 = i_3;
-        (*(tint_symbol_8)).arr[x_128] = -3;
+        (*(tint_symbol_6)).arr[x_128] = -3;
         break;
       }
       case 6: {
         int const x_126 = i_3;
-        (*(tint_symbol_8)).arr[x_126] = -2;
+        (*(tint_symbol_6)).arr[x_126] = -2;
         break;
       }
       case 5: {
         int const x_124 = i_3;
-        (*(tint_symbol_8)).arr[x_124] = -1;
+        (*(tint_symbol_6)).arr[x_124] = -1;
         break;
       }
       case 4: {
         int const x_122 = i_3;
-        (*(tint_symbol_8)).arr[x_122] = 0;
+        (*(tint_symbol_6)).arr[x_122] = 0;
         break;
       }
       case 3: {
         int const x_120 = i_3;
-        (*(tint_symbol_8)).arr[x_120] = 1;
+        (*(tint_symbol_6)).arr[x_120] = 1;
         break;
       }
       case 2: {
         int const x_118 = i_3;
-        (*(tint_symbol_8)).arr[x_118] = 2;
+        (*(tint_symbol_6)).arr[x_118] = 2;
         break;
       }
       case 1: {
         int const x_116 = i_3;
-        (*(tint_symbol_8)).arr[x_116] = 3;
+        (*(tint_symbol_6)).arr[x_116] = 3;
         break;
       }
       case 0: {
         int const x_114 = i_3;
-        (*(tint_symbol_8)).arr[x_114] = 4;
+        (*(tint_symbol_6)).arr[x_114] = 4;
         break;
       }
       default: {
@@ -182,8 +182,8 @@
     }
     int const x_145 = j_1;
     int const x_146 = j_1;
-    int const x_148 = (*(tint_symbol_8)).arr[x_146];
-    (*(tint_symbol_9)).arr[x_145] = x_148;
+    int const x_148 = (*(tint_symbol_6)).arr[x_146];
+    (*(tint_symbol_7)).arr[x_145] = x_148;
     {
       int const x_150 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
@@ -212,10 +212,10 @@
       x_90 = x_169;
       int const x_170 = x_91;
       int const x_171 = x_92;
-      tint_array_wrapper const x_173 = *(tint_symbol_8);
-      tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-      *(tint_symbol_8) = tint_symbol_4;
-      *(tint_symbol_8) = x_173;
+      tint_array_wrapper const x_173 = *(tint_symbol_6);
+      tint_array_wrapper const tint_symbol_2 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+      *(tint_symbol_6) = tint_symbol_2;
+      *(tint_symbol_6) = x_173;
       x_89 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_170) + as_type<uint>(x_171)))) - as_type<uint>(1)));
       int const x_175 = x_91;
       int const x_176 = x_92;
@@ -227,7 +227,7 @@
       x_86 = x_183;
       int const x_184 = x_88;
       x_85 = x_184;
-      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_8, tint_symbol_9);
+      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_6, tint_symbol_7);
       {
         int const x_186 = x_92;
         int const x_188 = x_91;
@@ -239,48 +239,48 @@
       x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_190)));
     }
   }
-  float const x_194 = (*(tint_symbol_10)).y;
+  float const x_194 = (*(tint_symbol_8)).y;
   if ((int(x_194) < 30)) {
-    int const x_201 = (*(tint_symbol_8)).arr[0];
+    int const x_201 = (*(tint_symbol_6)).arr[0];
     grey = (0.5f + (float(x_201) / 10.0f));
   } else {
-    float const x_206 = (*(tint_symbol_10)).y;
+    float const x_206 = (*(tint_symbol_8)).y;
     if ((int(x_206) < 60)) {
-      int const x_213 = (*(tint_symbol_8)).arr[1];
+      int const x_213 = (*(tint_symbol_6)).arr[1];
       grey = (0.5f + (float(x_213) / 10.0f));
     } else {
-      float const x_218 = (*(tint_symbol_10)).y;
+      float const x_218 = (*(tint_symbol_8)).y;
       if ((int(x_218) < 90)) {
-        int const x_225 = (*(tint_symbol_8)).arr[2];
+        int const x_225 = (*(tint_symbol_6)).arr[2];
         grey = (0.5f + (float(x_225) / 10.0f));
       } else {
-        float const x_230 = (*(tint_symbol_10)).y;
+        float const x_230 = (*(tint_symbol_8)).y;
         if ((int(x_230) < 120)) {
-          int const x_237 = (*(tint_symbol_8)).arr[3];
+          int const x_237 = (*(tint_symbol_6)).arr[3];
           grey = (0.5f + (float(x_237) / 10.0f));
         } else {
-          float const x_242 = (*(tint_symbol_10)).y;
+          float const x_242 = (*(tint_symbol_8)).y;
           if ((int(x_242) < 150)) {
             discard_fragment();
           } else {
-            float const x_249 = (*(tint_symbol_10)).y;
+            float const x_249 = (*(tint_symbol_8)).y;
             if ((int(x_249) < 180)) {
-              int const x_256 = (*(tint_symbol_8)).arr[5];
+              int const x_256 = (*(tint_symbol_6)).arr[5];
               grey = (0.5f + (float(x_256) / 10.0f));
             } else {
-              float const x_261 = (*(tint_symbol_10)).y;
+              float const x_261 = (*(tint_symbol_8)).y;
               if ((int(x_261) < 210)) {
-                int const x_268 = (*(tint_symbol_8)).arr[6];
+                int const x_268 = (*(tint_symbol_6)).arr[6];
                 grey = (0.5f + (float(x_268) / 10.0f));
               } else {
-                float const x_273 = (*(tint_symbol_10)).y;
+                float const x_273 = (*(tint_symbol_8)).y;
                 if ((int(x_273) < 240)) {
-                  int const x_280 = (*(tint_symbol_8)).arr[7];
+                  int const x_280 = (*(tint_symbol_6)).arr[7];
                   grey = (0.5f + (float(x_280) / 10.0f));
                 } else {
-                  float const x_285 = (*(tint_symbol_10)).y;
+                  float const x_285 = (*(tint_symbol_8)).y;
                   if ((int(x_285) < 270)) {
-                    int const x_292 = (*(tint_symbol_8)).arr[8];
+                    int const x_292 = (*(tint_symbol_6)).arr[8];
                     grey = (0.5f + (float(x_292) / 10.0f));
                   } else {
                     discard_fragment();
@@ -295,23 +295,29 @@
   }
   float const x_296 = grey;
   float3 const x_297 = float3(x_296, x_296, x_296);
-  *(tint_symbol_11) = float4(x_297.x, x_297.y, x_297.z, 1.0f);
+  *(tint_symbol_9) = float4(x_297.x, x_297.y, x_297.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread tint_array_wrapper tint_symbol_13 = {};
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread float4 tint_symbol_15 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_12), &(tint_symbol_15));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_15};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_11, tint_symbol_12, tint_symbol_10, tint_symbol_13);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_13)};
+  return tint_symbol_3;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_array_wrapper* const tint_symbol_17) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_14 = 0.0f;
+  thread tint_array_wrapper tint_symbol_15 = {};
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread float4 tint_symbol_17 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
+}
+
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_18, thread tint_array_wrapper* const tint_symbol_19) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -356,7 +362,7 @@
       param_1 = x_408;
       int const x_409 = to_1;
       param_2 = x_409;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_16, tint_symbol_17);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_18, tint_symbol_19);
       {
         int const x_411 = m;
         int const x_413 = i_2;
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl
index 4e85af2..8b5199a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl
@@ -245,13 +245,18 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 void mergeSort_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl
index 865de8f..765912d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_318 = i;
-    int const x_320 = (*(tint_symbol_5)).arr[x_318];
+    int const x_320 = (*(tint_symbol_3)).arr[x_318];
     int const x_321 = j;
-    int const x_323 = (*(tint_symbol_5)).arr[x_321];
+    int const x_323 = (*(tint_symbol_3)).arr[x_321];
     if ((x_320 < x_323)) {
       int const x_328 = k;
       k = as_type<int>((as_type<uint>(x_328) + as_type<uint>(1)));
       int const x_330 = i;
       i = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
-      int const x_333 = (*(tint_symbol_5)).arr[x_330];
-      (*(tint_symbol_6)).arr[x_328] = x_333;
+      int const x_333 = (*(tint_symbol_3)).arr[x_330];
+      (*(tint_symbol_4)).arr[x_328] = x_333;
     } else {
       int const x_335 = k;
       k = as_type<int>((as_type<uint>(x_335) + as_type<uint>(1)));
       int const x_337 = j;
       j = as_type<int>((as_type<uint>(x_337) + as_type<uint>(1)));
-      int const x_340 = (*(tint_symbol_5)).arr[x_337];
-      (*(tint_symbol_6)).arr[x_335] = x_340;
+      int const x_340 = (*(tint_symbol_3)).arr[x_337];
+      (*(tint_symbol_4)).arr[x_335] = x_340;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_353) + as_type<uint>(1)));
     int const x_355 = i;
     i = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
-    int const x_358 = (*(tint_symbol_5)).arr[x_355];
-    (*(tint_symbol_6)).arr[x_353] = x_358;
+    int const x_358 = (*(tint_symbol_3)).arr[x_355];
+    (*(tint_symbol_4)).arr[x_353] = x_358;
   }
   int const x_360 = *(from);
   i_1 = x_360;
@@ -80,8 +80,8 @@
     }
     int const x_369 = i_1;
     int const x_370 = i_1;
-    int const x_372 = (*(tint_symbol_6)).arr[x_370];
-    (*(tint_symbol_5)).arr[x_369] = x_372;
+    int const x_372 = (*(tint_symbol_4)).arr[x_370];
+    (*(tint_symbol_3)).arr[x_369] = x_372;
     {
       int const x_374 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_374) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int x_85 = 0;
   int x_86 = 0;
   int x_87 = 0;
@@ -111,52 +111,52 @@
     switch(x_102) {
       case 9: {
         int const x_132 = i_3;
-        (*(tint_symbol_7)).arr[x_132] = -5;
+        (*(tint_symbol_5)).arr[x_132] = -5;
         break;
       }
       case 8: {
         int const x_130 = i_3;
-        (*(tint_symbol_7)).arr[x_130] = -4;
+        (*(tint_symbol_5)).arr[x_130] = -4;
         break;
       }
       case 7: {
         int const x_128 = i_3;
-        (*(tint_symbol_7)).arr[x_128] = -3;
+        (*(tint_symbol_5)).arr[x_128] = -3;
         break;
       }
       case 6: {
         int const x_126 = i_3;
-        (*(tint_symbol_7)).arr[x_126] = -2;
+        (*(tint_symbol_5)).arr[x_126] = -2;
         break;
       }
       case 5: {
         int const x_124 = i_3;
-        (*(tint_symbol_7)).arr[x_124] = -1;
+        (*(tint_symbol_5)).arr[x_124] = -1;
         break;
       }
       case 4: {
         int const x_122 = i_3;
-        (*(tint_symbol_7)).arr[x_122] = 0;
+        (*(tint_symbol_5)).arr[x_122] = 0;
         break;
       }
       case 3: {
         int const x_120 = i_3;
-        (*(tint_symbol_7)).arr[x_120] = 1;
+        (*(tint_symbol_5)).arr[x_120] = 1;
         break;
       }
       case 2: {
         int const x_118 = i_3;
-        (*(tint_symbol_7)).arr[x_118] = 2;
+        (*(tint_symbol_5)).arr[x_118] = 2;
         break;
       }
       case 1: {
         int const x_116 = i_3;
-        (*(tint_symbol_7)).arr[x_116] = 3;
+        (*(tint_symbol_5)).arr[x_116] = 3;
         break;
       }
       case 0: {
         int const x_114 = i_3;
-        (*(tint_symbol_7)).arr[x_114] = 4;
+        (*(tint_symbol_5)).arr[x_114] = 4;
         break;
       }
       default: {
@@ -182,8 +182,8 @@
     }
     int const x_145 = j_1;
     int const x_146 = j_1;
-    int const x_148 = (*(tint_symbol_7)).arr[x_146];
-    (*(tint_symbol_8)).arr[x_145] = x_148;
+    int const x_148 = (*(tint_symbol_5)).arr[x_146];
+    (*(tint_symbol_6)).arr[x_145] = x_148;
     {
       int const x_150 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
@@ -223,7 +223,7 @@
       x_86 = x_182;
       int const x_183 = x_88;
       x_85 = x_183;
-      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_5, tint_symbol_6);
       {
         int const x_185 = x_92;
         int const x_187 = x_91;
@@ -235,48 +235,48 @@
       x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_189)));
     }
   }
-  float const x_193 = (*(tint_symbol_9)).y;
+  float const x_193 = (*(tint_symbol_7)).y;
   if ((int(x_193) < 30)) {
-    int const x_200 = (*(tint_symbol_7)).arr[0];
+    int const x_200 = (*(tint_symbol_5)).arr[0];
     grey = (0.5f + (float(x_200) / 10.0f));
   } else {
-    float const x_205 = (*(tint_symbol_9)).y;
+    float const x_205 = (*(tint_symbol_7)).y;
     if ((int(x_205) < 60)) {
-      int const x_212 = (*(tint_symbol_7)).arr[1];
+      int const x_212 = (*(tint_symbol_5)).arr[1];
       grey = (0.5f + (float(x_212) / 10.0f));
     } else {
-      float const x_217 = (*(tint_symbol_9)).y;
+      float const x_217 = (*(tint_symbol_7)).y;
       if ((int(x_217) < 90)) {
-        int const x_224 = (*(tint_symbol_7)).arr[2];
+        int const x_224 = (*(tint_symbol_5)).arr[2];
         grey = (0.5f + (float(x_224) / 10.0f));
       } else {
-        float const x_229 = (*(tint_symbol_9)).y;
+        float const x_229 = (*(tint_symbol_7)).y;
         if ((int(x_229) < 120)) {
-          int const x_236 = (*(tint_symbol_7)).arr[3];
+          int const x_236 = (*(tint_symbol_5)).arr[3];
           grey = (0.5f + (float(x_236) / 10.0f));
         } else {
-          float const x_241 = (*(tint_symbol_9)).y;
+          float const x_241 = (*(tint_symbol_7)).y;
           if ((int(x_241) < 150)) {
             discard_fragment();
           } else {
-            float const x_248 = (*(tint_symbol_9)).y;
+            float const x_248 = (*(tint_symbol_7)).y;
             if ((int(x_248) < 180)) {
-              int const x_255 = (*(tint_symbol_7)).arr[5];
+              int const x_255 = (*(tint_symbol_5)).arr[5];
               grey = (0.5f + (float(x_255) / 10.0f));
             } else {
-              float const x_260 = (*(tint_symbol_9)).y;
+              float const x_260 = (*(tint_symbol_7)).y;
               if ((int(x_260) < 210)) {
-                int const x_267 = (*(tint_symbol_7)).arr[6];
+                int const x_267 = (*(tint_symbol_5)).arr[6];
                 grey = (0.5f + (float(x_267) / 10.0f));
               } else {
-                float const x_272 = (*(tint_symbol_9)).y;
+                float const x_272 = (*(tint_symbol_7)).y;
                 if ((int(x_272) < 240)) {
-                  int const x_279 = (*(tint_symbol_7)).arr[7];
+                  int const x_279 = (*(tint_symbol_5)).arr[7];
                   grey = (0.5f + (float(x_279) / 10.0f));
                 } else {
-                  float const x_284 = (*(tint_symbol_9)).y;
+                  float const x_284 = (*(tint_symbol_7)).y;
                   if ((int(x_284) < 270)) {
-                    int const x_291 = (*(tint_symbol_7)).arr[8];
+                    int const x_291 = (*(tint_symbol_5)).arr[8];
                     grey = (0.5f + (float(x_291) / 10.0f));
                   } else {
                     discard_fragment();
@@ -291,23 +291,29 @@
   }
   float const x_295 = grey;
   float3 const x_296 = float3(x_295, x_295, x_295);
-  *(tint_symbol_10) = float4(x_296.x, x_296.y, x_296.z, 1.0f);
+  *(tint_symbol_8) = float4(x_296.x, x_296.y, x_296.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread tint_array_wrapper tint_symbol_12 = {};
-  thread tint_array_wrapper tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11), &(tint_symbol_14));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread float4* const tint_symbol_12) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_10, tint_symbol_11, tint_symbol_9, tint_symbol_12);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)};
+  return tint_symbol_2;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_array_wrapper* const tint_symbol_16) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread tint_array_wrapper tint_symbol_14 = {};
+  thread tint_array_wrapper tint_symbol_15 = {};
+  thread float4 tint_symbol_16 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
+}
+
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_17, thread tint_array_wrapper* const tint_symbol_18) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -352,7 +358,7 @@
       param_1 = x_407;
       int const x_408 = to_1;
       param_2 = x_408;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_15, tint_symbol_16);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_17, tint_symbol_18);
       {
         int const x_410 = m;
         int const x_412 = i_2;
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl
index 30e945e..a6b3a4a 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.hlsl
@@ -253,13 +253,18 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
 void mergeSort_() {
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl
index c9c9307..0a20d93 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_318 = i;
-    int const x_320 = (*(tint_symbol_5)).arr[x_318];
+    int const x_320 = (*(tint_symbol_3)).arr[x_318];
     int const x_321 = j;
-    int const x_323 = (*(tint_symbol_5)).arr[x_321];
+    int const x_323 = (*(tint_symbol_3)).arr[x_321];
     if ((x_320 < x_323)) {
       int const x_328 = k;
       k = as_type<int>((as_type<uint>(x_328) + as_type<uint>(1)));
       int const x_330 = i;
       i = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
-      int const x_333 = (*(tint_symbol_5)).arr[x_330];
-      (*(tint_symbol_6)).arr[x_328] = x_333;
+      int const x_333 = (*(tint_symbol_3)).arr[x_330];
+      (*(tint_symbol_4)).arr[x_328] = x_333;
     } else {
       int const x_335 = k;
       k = as_type<int>((as_type<uint>(x_335) + as_type<uint>(1)));
       int const x_337 = j;
       j = as_type<int>((as_type<uint>(x_337) + as_type<uint>(1)));
-      int const x_340 = (*(tint_symbol_5)).arr[x_337];
-      (*(tint_symbol_6)).arr[x_335] = x_340;
+      int const x_340 = (*(tint_symbol_3)).arr[x_337];
+      (*(tint_symbol_4)).arr[x_335] = x_340;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_353) + as_type<uint>(1)));
     int const x_355 = i;
     i = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
-    int const x_358 = (*(tint_symbol_5)).arr[x_355];
-    (*(tint_symbol_6)).arr[x_353] = x_358;
+    int const x_358 = (*(tint_symbol_3)).arr[x_355];
+    (*(tint_symbol_4)).arr[x_353] = x_358;
   }
   int const x_360 = *(from);
   i_1 = x_360;
@@ -80,8 +80,8 @@
     }
     int const x_369 = i_1;
     int const x_370 = i_1;
-    int const x_372 = (*(tint_symbol_6)).arr[x_370];
-    (*(tint_symbol_5)).arr[x_369] = x_372;
+    int const x_372 = (*(tint_symbol_4)).arr[x_370];
+    (*(tint_symbol_3)).arr[x_369] = x_372;
     {
       int const x_374 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_374) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int x_85 = 0;
   int x_86 = 0;
   int x_87 = 0;
@@ -111,52 +111,52 @@
     switch(x_102) {
       case 9: {
         int const x_132 = i_3;
-        (*(tint_symbol_7)).arr[x_132] = -5;
+        (*(tint_symbol_5)).arr[x_132] = -5;
         break;
       }
       case 8: {
         int const x_130 = i_3;
-        (*(tint_symbol_7)).arr[x_130] = -4;
+        (*(tint_symbol_5)).arr[x_130] = -4;
         break;
       }
       case 7: {
         int const x_128 = i_3;
-        (*(tint_symbol_7)).arr[x_128] = -3;
+        (*(tint_symbol_5)).arr[x_128] = -3;
         break;
       }
       case 6: {
         int const x_126 = i_3;
-        (*(tint_symbol_7)).arr[x_126] = -2;
+        (*(tint_symbol_5)).arr[x_126] = -2;
         break;
       }
       case 5: {
         int const x_124 = i_3;
-        (*(tint_symbol_7)).arr[x_124] = -1;
+        (*(tint_symbol_5)).arr[x_124] = -1;
         break;
       }
       case 4: {
         int const x_122 = i_3;
-        (*(tint_symbol_7)).arr[x_122] = 0;
+        (*(tint_symbol_5)).arr[x_122] = 0;
         break;
       }
       case 3: {
         int const x_120 = i_3;
-        (*(tint_symbol_7)).arr[x_120] = 1;
+        (*(tint_symbol_5)).arr[x_120] = 1;
         break;
       }
       case 2: {
         int const x_118 = i_3;
-        (*(tint_symbol_7)).arr[x_118] = 2;
+        (*(tint_symbol_5)).arr[x_118] = 2;
         break;
       }
       case 1: {
         int const x_116 = i_3;
-        (*(tint_symbol_7)).arr[x_116] = 3;
+        (*(tint_symbol_5)).arr[x_116] = 3;
         break;
       }
       case 0: {
         int const x_114 = i_3;
-        (*(tint_symbol_7)).arr[x_114] = 4;
+        (*(tint_symbol_5)).arr[x_114] = 4;
         break;
       }
       default: {
@@ -182,8 +182,8 @@
     }
     int const x_145 = j_1;
     int const x_146 = j_1;
-    int const x_148 = (*(tint_symbol_7)).arr[x_146];
-    (*(tint_symbol_8)).arr[x_145] = x_148;
+    int const x_148 = (*(tint_symbol_5)).arr[x_146];
+    (*(tint_symbol_6)).arr[x_145] = x_148;
     {
       int const x_150 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
@@ -223,7 +223,7 @@
       x_86 = x_182;
       int const x_183 = x_88;
       x_85 = x_183;
-      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(x_87), &(x_86), &(x_85), tint_symbol_5, tint_symbol_6);
       {
         int const x_185 = x_92;
         int const x_187 = x_91;
@@ -235,48 +235,48 @@
       x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_189)));
     }
   }
-  float const x_193 = (*(tint_symbol_9)).y;
+  float const x_193 = (*(tint_symbol_7)).y;
   if ((int(x_193) < 30)) {
-    int const x_200 = (*(tint_symbol_7)).arr[0];
+    int const x_200 = (*(tint_symbol_5)).arr[0];
     grey = (0.5f + (float(x_200) / 10.0f));
   } else {
-    float const x_205 = (*(tint_symbol_9)).y;
+    float const x_205 = (*(tint_symbol_7)).y;
     if ((int(x_205) < 60)) {
-      int const x_212 = (*(tint_symbol_7)).arr[1];
+      int const x_212 = (*(tint_symbol_5)).arr[1];
       grey = (0.5f + (float(x_212) / 10.0f));
     } else {
-      float const x_217 = (*(tint_symbol_9)).y;
+      float const x_217 = (*(tint_symbol_7)).y;
       if ((int(x_217) < 90)) {
-        int const x_224 = (*(tint_symbol_7)).arr[2];
+        int const x_224 = (*(tint_symbol_5)).arr[2];
         grey = (0.5f + (float(x_224) / 10.0f));
       } else {
-        float const x_229 = (*(tint_symbol_9)).y;
+        float const x_229 = (*(tint_symbol_7)).y;
         if ((int(x_229) < 120)) {
-          int const x_236 = (*(tint_symbol_7)).arr[3];
+          int const x_236 = (*(tint_symbol_5)).arr[3];
           grey = (0.5f + (float(x_236) / 10.0f));
         } else {
-          float const x_241 = (*(tint_symbol_9)).y;
+          float const x_241 = (*(tint_symbol_7)).y;
           if ((int(x_241) < 150)) {
             discard_fragment();
           } else {
-            float const x_248 = (*(tint_symbol_9)).y;
+            float const x_248 = (*(tint_symbol_7)).y;
             if ((int(x_248) < 180)) {
-              int const x_255 = (*(tint_symbol_7)).arr[5];
+              int const x_255 = (*(tint_symbol_5)).arr[5];
               grey = (0.5f + (float(x_255) / 10.0f));
             } else {
-              float const x_260 = (*(tint_symbol_9)).y;
+              float const x_260 = (*(tint_symbol_7)).y;
               if ((int(x_260) < 210)) {
-                int const x_267 = (*(tint_symbol_7)).arr[6];
+                int const x_267 = (*(tint_symbol_5)).arr[6];
                 grey = (0.5f + (float(x_267) / 10.0f));
               } else {
-                float const x_272 = (*(tint_symbol_9)).y;
+                float const x_272 = (*(tint_symbol_7)).y;
                 if ((int(x_272) < 240)) {
-                  int const x_279 = (*(tint_symbol_7)).arr[7];
+                  int const x_279 = (*(tint_symbol_5)).arr[7];
                   grey = (0.5f + (float(x_279) / 10.0f));
                 } else {
-                  float const x_284 = (*(tint_symbol_9)).y;
+                  float const x_284 = (*(tint_symbol_7)).y;
                   if ((int(x_284) < 270)) {
-                    int const x_291 = (*(tint_symbol_7)).arr[8];
+                    int const x_291 = (*(tint_symbol_5)).arr[8];
                     grey = (0.5f + (float(x_291) / 10.0f));
                   } else {
                     discard_fragment();
@@ -291,23 +291,29 @@
   }
   float const x_295 = grey;
   float3 const x_296 = float3(x_295, x_295, x_295);
-  *(tint_symbol_10) = float4(x_296.x, x_296.y, x_296.z, 1.0f);
+  *(tint_symbol_8) = float4(x_296.x, x_296.y, x_296.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread tint_array_wrapper tint_symbol_12 = {};
-  thread tint_array_wrapper tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11), &(tint_symbol_14));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread tint_array_wrapper* const tint_symbol_11, thread float4* const tint_symbol_12) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_10, tint_symbol_11, tint_symbol_9, tint_symbol_12);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)};
+  return tint_symbol_2;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_array_wrapper* const tint_symbol_16) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread tint_array_wrapper tint_symbol_14 = {};
+  thread tint_array_wrapper tint_symbol_15 = {};
+  thread float4 tint_symbol_16 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
+}
+
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_17, thread tint_array_wrapper* const tint_symbol_18) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -352,7 +358,7 @@
       param_1 = x_407;
       int const x_408 = to_1;
       param_2 = x_408;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_15, tint_symbol_16);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_17, tint_symbol_18);
       {
         int const x_410 = m;
         int const x_412 = i_2;
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl
index 5a6f9c4..074ee65 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.hlsl
@@ -77,8 +77,8 @@
       x_113_phi = x_114;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_121 = indexable[x_116];
   x_GLF_color = x_121;
   return;
@@ -94,11 +94,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl
index f711d31..79268ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int2 x_77 = 0;
   int2 x_110 = 0;
@@ -28,7 +28,7 @@
   int x_80_phi = 0;
   int2 x_111_phi = 0;
   int2 x_113_phi = 0;
-  float4 const x_56 = *(tint_symbol_6);
+  float4 const x_56 = *(tint_symbol_4);
   float2 const x_59 = x_6.resolution;
   float2 const x_60 = (float2(x_56.x, x_56.y) / x_59);
   int const x_63 = int((x_60.x * 8.0f));
@@ -94,20 +94,26 @@
       x_113_phi = x_114;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_121 = indexable.arr[x_116];
-  *(tint_symbol_7) = x_121;
+  *(tint_symbol_5) = x_121;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl
index 5a6f9c4..074ee65 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.hlsl
@@ -77,8 +77,8 @@
       x_113_phi = x_114;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_121 = indexable[x_116];
   x_GLF_color = x_121;
   return;
@@ -94,11 +94,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl
index f711d31..79268ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int2 x_77 = 0;
   int2 x_110 = 0;
@@ -28,7 +28,7 @@
   int x_80_phi = 0;
   int2 x_111_phi = 0;
   int2 x_113_phi = 0;
-  float4 const x_56 = *(tint_symbol_6);
+  float4 const x_56 = *(tint_symbol_4);
   float2 const x_59 = x_6.resolution;
   float2 const x_60 = (float2(x_56.x, x_56.y) / x_59);
   int const x_63 = int((x_60.x * 8.0f));
@@ -94,20 +94,26 @@
       x_113_phi = x_114;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_121 = indexable.arr[x_116];
-  *(tint_symbol_7) = x_121;
+  *(tint_symbol_5) = x_121;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl
index 9baedc8..9e536da 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.hlsl
@@ -77,11 +77,11 @@
       x_116_phi = x_117;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_123[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_123;
   const float4 x_125 = indexable[x_119];
   x_GLF_color = x_125;
@@ -98,11 +98,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl
index 49c5889..2740551 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   tint_array_wrapper indexable = {};
   int2 x_80 = 0;
   int2 x_113 = 0;
@@ -28,7 +28,7 @@
   int x_83_phi = 0;
   int2 x_114_phi = 0;
   int2 x_116_phi = 0;
-  float4 const x_59 = *(tint_symbol_7);
+  float4 const x_59 = *(tint_symbol_5);
   float2 const x_62 = x_6.resolution;
   float2 const x_63 = (float2(x_59.x, x_59.y) / x_62);
   int const x_66 = int((x_63.x * 8.0f));
@@ -94,24 +94,30 @@
       x_116_phi = x_117;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_123 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_123;
   float4 const x_125 = indexable.arr[x_119];
-  *(tint_symbol_8) = x_125;
+  *(tint_symbol_6) = x_125;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl
index 9baedc8..9e536da 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.hlsl
@@ -77,11 +77,11 @@
       x_116_phi = x_117;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_123[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_123;
   const float4 x_125 = indexable[x_119];
   x_GLF_color = x_125;
@@ -98,11 +98,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl
index 49c5889..2740551 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   tint_array_wrapper indexable = {};
   int2 x_80 = 0;
   int2 x_113 = 0;
@@ -28,7 +28,7 @@
   int x_83_phi = 0;
   int2 x_114_phi = 0;
   int2 x_116_phi = 0;
-  float4 const x_59 = *(tint_symbol_7);
+  float4 const x_59 = *(tint_symbol_5);
   float2 const x_62 = x_6.resolution;
   float2 const x_63 = (float2(x_59.x, x_59.y) / x_62);
   int const x_66 = int((x_63.x * 8.0f));
@@ -94,24 +94,30 @@
       x_116_phi = x_117;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_123 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_123;
   float4 const x_125 = indexable.arr[x_119];
-  *(tint_symbol_8) = x_125;
+  *(tint_symbol_6) = x_125;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl
index d58e8dc..f697ee2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.hlsl
@@ -78,8 +78,8 @@
       x_112_phi = x_113;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_120 = indexable[x_115];
   x_GLF_color = x_120;
   return;
@@ -95,11 +95,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl
index 15febd0..f592466 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int2 x_76 = 0;
   int2 x_109 = 0;
@@ -28,7 +28,7 @@
   int x_79_phi = 0;
   int2 x_110_phi = 0;
   int2 x_112_phi = 0;
-  float4 const x_55 = *(tint_symbol_6);
+  float4 const x_55 = *(tint_symbol_4);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (float2(x_55.x, x_55.y) / x_58);
   int const x_62 = int((x_59.x * 8.0f));
@@ -94,20 +94,26 @@
       x_112_phi = x_113;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_120 = indexable.arr[x_115];
-  *(tint_symbol_7) = x_120;
+  *(tint_symbol_5) = x_120;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl
index d58e8dc..f697ee2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.hlsl
@@ -78,8 +78,8 @@
       x_112_phi = x_113;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_120 = indexable[x_115];
   x_GLF_color = x_120;
   return;
@@ -95,11 +95,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl
index 15febd0..f592466 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int2 x_76 = 0;
   int2 x_109 = 0;
@@ -28,7 +28,7 @@
   int x_79_phi = 0;
   int2 x_110_phi = 0;
   int2 x_112_phi = 0;
-  float4 const x_55 = *(tint_symbol_6);
+  float4 const x_55 = *(tint_symbol_4);
   float2 const x_58 = x_6.resolution;
   float2 const x_59 = (float2(x_55.x, x_55.y) / x_58);
   int const x_62 = int((x_59.x * 8.0f));
@@ -94,20 +94,26 @@
       x_112_phi = x_113;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_120 = indexable.arr[x_115];
-  *(tint_symbol_7) = x_120;
+  *(tint_symbol_5) = x_120;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl
index 64c4e84..7136ec9 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.hlsl
@@ -78,11 +78,11 @@
       x_116_phi = x_117;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_124[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_124;
   const float4 x_125 = indexable[x_119];
   x_GLF_color = x_125;
@@ -99,11 +99,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl
index c082298..91a8951 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   tint_array_wrapper indexable = {};
   int2 x_80 = 0;
   int2 x_113 = 0;
@@ -28,7 +28,7 @@
   int x_83_phi = 0;
   int2 x_114_phi = 0;
   int2 x_116_phi = 0;
-  float4 const x_58 = *(tint_symbol_7);
+  float4 const x_58 = *(tint_symbol_5);
   float2 const x_61 = x_6.resolution;
   float2 const x_62 = (float2(x_58.x, x_58.y) / x_61);
   int const x_65 = int((x_62.x * 8.0f));
@@ -94,24 +94,30 @@
       x_116_phi = x_117;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_124 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_124;
   float4 const x_125 = indexable.arr[x_119];
-  *(tint_symbol_8) = x_125;
+  *(tint_symbol_6) = x_125;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl
index 64c4e84..7136ec9 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.hlsl
@@ -78,11 +78,11 @@
       x_116_phi = x_117;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_124[16] = indexable;
-  const float4 tint_symbol_6[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-  indexable = tint_symbol_6;
+  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+  indexable = tint_symbol_5;
   indexable = x_124;
   const float4 x_125 = indexable[x_119];
   x_GLF_color = x_125;
@@ -99,11 +99,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_7 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl
index c082298..91a8951 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
   tint_array_wrapper indexable = {};
   int2 x_80 = 0;
   int2 x_113 = 0;
@@ -28,7 +28,7 @@
   int x_83_phi = 0;
   int2 x_114_phi = 0;
   int2 x_116_phi = 0;
-  float4 const x_58 = *(tint_symbol_7);
+  float4 const x_58 = *(tint_symbol_5);
   float2 const x_61 = x_6.resolution;
   float2 const x_62 = (float2(x_58.x, x_58.y) / x_61);
   int const x_65 = int((x_62.x * 8.0f));
@@ -94,24 +94,30 @@
       x_116_phi = x_117;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   tint_array_wrapper const x_124 = indexable;
-  tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-  indexable = tint_symbol_5;
+  tint_array_wrapper const tint_symbol_3 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+  indexable = tint_symbol_3;
   indexable = x_124;
   float4 const x_125 = indexable.arr[x_119];
-  *(tint_symbol_8) = x_125;
+  *(tint_symbol_6) = x_125;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_9 = 0.0f;
   thread float4 tint_symbol_10 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_6 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl
index d1b1da5..8ee9d11 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.hlsl
@@ -78,8 +78,8 @@
       x_116_phi = x_117;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_124 = indexable[x_119];
   x_GLF_color = x_124;
   return;
@@ -95,11 +95,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl
index ca93b97..ee53aba 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int2 x_80 = 0;
   int2 x_113 = 0;
@@ -28,7 +28,7 @@
   int x_83_phi = 0;
   int2 x_114_phi = 0;
   int2 x_116_phi = 0;
-  float4 const x_58 = *(tint_symbol_6);
+  float4 const x_58 = *(tint_symbol_4);
   float2 const x_61 = x_6.resolution;
   float2 const x_62 = (float2(x_58.x, x_58.y) / x_61);
   int const x_65 = int((x_62.x * 8.0f));
@@ -94,20 +94,26 @@
       x_116_phi = x_117;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_124 = indexable.arr[x_119];
-  *(tint_symbol_7) = x_124;
+  *(tint_symbol_5) = x_124;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl
index d1b1da5..8ee9d11 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.hlsl
@@ -78,8 +78,8 @@
       x_116_phi = x_117;
     }
   }
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_124 = indexable[x_119];
   x_GLF_color = x_124;
   return;
@@ -95,11 +95,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl
index ca93b97..ee53aba 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   tint_array_wrapper indexable = {};
   int2 x_80 = 0;
   int2 x_113 = 0;
@@ -28,7 +28,7 @@
   int x_83_phi = 0;
   int2 x_114_phi = 0;
   int2 x_116_phi = 0;
-  float4 const x_58 = *(tint_symbol_6);
+  float4 const x_58 = *(tint_symbol_4);
   float2 const x_61 = x_6.resolution;
   float2 const x_62 = (float2(x_58.x, x_58.y) / x_61);
   int const x_65 = int((x_62.x * 8.0f));
@@ -94,20 +94,26 @@
       x_116_phi = x_117;
     }
   }
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_124 = indexable.arr[x_119];
-  *(tint_symbol_7) = x_124;
+  *(tint_symbol_5) = x_124;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl
index 375d755..83b3b09 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.hlsl
@@ -36,13 +36,13 @@
           break;
         }
         const int x_221 = x_214.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_196 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_196 = tint_symbol_4;
         const int x_223 = x_196[x_217];
         const bool x_225 = (x_221 < (x_223 + 15));
         if (x_225) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_5;
         }
         if (x_225) {
           x_233 = x_197[x_217];
@@ -58,8 +58,8 @@
           x_241_phi = x_225;
         }
         if (x_241_phi) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_198 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_198 = tint_symbol_6;
           const int x_245 = x_198[x_217];
           const float x_250 = ((15.0f - abs(float((x_221 - x_245)))) * 0.06666667f);
           x_251 = float4(x_250, x_250, x_250, 1.0f);
@@ -98,11 +98,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl
index bd5afe6..042ed0c 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
   tint_array_wrapper x_198 = {};
@@ -25,7 +25,7 @@
   float4 x_253_phi = 0.0f;
   bool x_254_phi = false;
   float4 x_256_phi = 0.0f;
-  float4 const x_199 = *(tint_symbol_8);
+  float4 const x_199 = *(tint_symbol_6);
   float2 const x_202 = x_6.resolution;
   float2 const x_203 = (float2(x_199.x, x_199.y) / x_202);
   x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f)));
@@ -46,13 +46,13 @@
           break;
         }
         int const x_221 = x_214.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_196 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_196 = tint_symbol_2;
         int const x_223 = x_196.arr[x_217];
         bool const x_225 = (x_221 < as_type<int>((as_type<uint>(x_223) + as_type<uint>(15))));
         if (x_225) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_3;
         }
         if (x_225) {
           x_233 = x_197.arr[x_217];
@@ -70,8 +70,8 @@
         }
         bool const x_241 = x_241_phi;
         if (x_241) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_198 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_198 = tint_symbol_4;
           int const x_245 = x_198.arr[x_217];
           float const x_250 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_221) - as_type<uint>(x_245)))))) * 0.06666667f);
           x_251 = float4(x_250, x_250, x_250, 1.0f);
@@ -97,17 +97,23 @@
     }
   }
   float4 const x_256 = x_256_phi;
-  *(tint_symbol_9) = x_256;
+  *(tint_symbol_7) = x_256;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl
index 375d755..83b3b09 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.hlsl
@@ -36,13 +36,13 @@
           break;
         }
         const int x_221 = x_214.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_196 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_196 = tint_symbol_4;
         const int x_223 = x_196[x_217];
         const bool x_225 = (x_221 < (x_223 + 15));
         if (x_225) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_5;
         }
         if (x_225) {
           x_233 = x_197[x_217];
@@ -58,8 +58,8 @@
           x_241_phi = x_225;
         }
         if (x_241_phi) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_198 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_198 = tint_symbol_6;
           const int x_245 = x_198[x_217];
           const float x_250 = ((15.0f - abs(float((x_221 - x_245)))) * 0.06666667f);
           x_251 = float4(x_250, x_250, x_250, 1.0f);
@@ -98,11 +98,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl
index bd5afe6..042ed0c 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
   tint_array_wrapper x_198 = {};
@@ -25,7 +25,7 @@
   float4 x_253_phi = 0.0f;
   bool x_254_phi = false;
   float4 x_256_phi = 0.0f;
-  float4 const x_199 = *(tint_symbol_8);
+  float4 const x_199 = *(tint_symbol_6);
   float2 const x_202 = x_6.resolution;
   float2 const x_203 = (float2(x_199.x, x_199.y) / x_202);
   x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f)));
@@ -46,13 +46,13 @@
           break;
         }
         int const x_221 = x_214.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_196 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_196 = tint_symbol_2;
         int const x_223 = x_196.arr[x_217];
         bool const x_225 = (x_221 < as_type<int>((as_type<uint>(x_223) + as_type<uint>(15))));
         if (x_225) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_3;
         }
         if (x_225) {
           x_233 = x_197.arr[x_217];
@@ -70,8 +70,8 @@
         }
         bool const x_241 = x_241_phi;
         if (x_241) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_198 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_198 = tint_symbol_4;
           int const x_245 = x_198.arr[x_217];
           float const x_250 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_221) - as_type<uint>(x_245)))))) * 0.06666667f);
           x_251 = float4(x_250, x_250, x_250, 1.0f);
@@ -97,17 +97,23 @@
     }
   }
   float4 const x_256 = x_256_phi;
-  *(tint_symbol_9) = x_256;
+  *(tint_symbol_7) = x_256;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl
index 0614b0d..b185dbb 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.hlsl
@@ -35,13 +35,13 @@
           break;
         }
         const int x_221 = x_214.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_196 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_196 = tint_symbol_4;
         const int x_223 = x_196[x_217];
         const bool x_225 = (x_221 < (x_223 + 15));
         if (x_225) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_5;
         }
         if (x_225) {
           x_233 = x_197[x_217];
@@ -52,8 +52,8 @@
         }
         const bool x_237 = (x_221 > (x_235_phi - 15));
         if ((x_225 ? x_237 : x_225)) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_198 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_198 = tint_symbol_6;
           const int x_243 = x_198[x_217];
           const float x_248 = ((15.0f - abs(float((x_221 - x_243)))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
@@ -92,11 +92,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl
index da2762d..122125f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
   tint_array_wrapper x_198 = {};
@@ -25,7 +25,7 @@
   float4 x_251_phi = 0.0f;
   bool x_252_phi = false;
   float4 x_254_phi = 0.0f;
-  float4 const x_199 = *(tint_symbol_8);
+  float4 const x_199 = *(tint_symbol_6);
   float2 const x_202 = x_6.resolution;
   float2 const x_203 = (float2(x_199.x, x_199.y) / x_202);
   x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f)));
@@ -45,13 +45,13 @@
           break;
         }
         int const x_221 = x_214.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_196 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_196 = tint_symbol_2;
         int const x_223 = x_196.arr[x_217];
         bool const x_225 = (x_221 < as_type<int>((as_type<uint>(x_223) + as_type<uint>(15))));
         if (x_225) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_3;
         }
         if (x_225) {
           x_233 = x_197.arr[x_217];
@@ -63,8 +63,8 @@
         int const x_235 = x_235_phi;
         bool const x_237 = (x_221 > as_type<int>((as_type<uint>(x_235) - as_type<uint>(15))));
         if (select(x_225, x_237, x_225)) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_198 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_198 = tint_symbol_4;
           int const x_243 = x_198.arr[x_217];
           float const x_248 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_221) - as_type<uint>(x_243)))))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
@@ -90,17 +90,23 @@
     }
   }
   float4 const x_254 = x_254_phi;
-  *(tint_symbol_9) = x_254;
+  *(tint_symbol_7) = x_254;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl
index 0614b0d..b185dbb 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.hlsl
@@ -35,13 +35,13 @@
           break;
         }
         const int x_221 = x_214.x;
-        const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-        x_196 = tint_symbol_5;
+        const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+        x_196 = tint_symbol_4;
         const int x_223 = x_196[x_217];
         const bool x_225 = (x_221 < (x_223 + 15));
         if (x_225) {
-          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_197 = tint_symbol_6;
+          const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_197 = tint_symbol_5;
         }
         if (x_225) {
           x_233 = x_197[x_217];
@@ -52,8 +52,8 @@
         }
         const bool x_237 = (x_221 > (x_235_phi - 15));
         if ((x_225 ? x_237 : x_225)) {
-          const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-          x_198 = tint_symbol_7;
+          const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+          x_198 = tint_symbol_6;
           const int x_243 = x_198[x_217];
           const float x_248 = ((15.0f - abs(float((x_221 - x_243)))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
@@ -92,11 +92,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl
index da2762d..122125f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   tint_array_wrapper x_196 = {};
   tint_array_wrapper x_197 = {};
   tint_array_wrapper x_198 = {};
@@ -25,7 +25,7 @@
   float4 x_251_phi = 0.0f;
   bool x_252_phi = false;
   float4 x_254_phi = 0.0f;
-  float4 const x_199 = *(tint_symbol_8);
+  float4 const x_199 = *(tint_symbol_6);
   float2 const x_202 = x_6.resolution;
   float2 const x_203 = (float2(x_199.x, x_199.y) / x_202);
   x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f)));
@@ -45,13 +45,13 @@
           break;
         }
         int const x_221 = x_214.x;
-        tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-        x_196 = tint_symbol_4;
+        tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+        x_196 = tint_symbol_2;
         int const x_223 = x_196.arr[x_217];
         bool const x_225 = (x_221 < as_type<int>((as_type<uint>(x_223) + as_type<uint>(15))));
         if (x_225) {
-          tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_197 = tint_symbol_5;
+          tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_197 = tint_symbol_3;
         }
         if (x_225) {
           x_233 = x_197.arr[x_217];
@@ -63,8 +63,8 @@
         int const x_235 = x_235_phi;
         bool const x_237 = (x_221 > as_type<int>((as_type<uint>(x_235) - as_type<uint>(15))));
         if (select(x_225, x_237, x_225)) {
-          tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-          x_198 = tint_symbol_6;
+          tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+          x_198 = tint_symbol_4;
           int const x_243 = x_198.arr[x_217];
           float const x_248 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_221) - as_type<uint>(x_243)))))) * 0.06666667f);
           x_249 = float4(x_248, x_248, x_248, 1.0f);
@@ -90,17 +90,23 @@
     }
   }
   float4 const x_254 = x_254_phi;
-  *(tint_symbol_9) = x_254;
+  *(tint_symbol_7) = x_254;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl
index 7b7c9a4..687698f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.hlsl
@@ -19,16 +19,16 @@
     }
     const int x_231 = pos.x;
     const int x_233 = pos.y;
-    const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-    indexable = tint_symbol_5;
+    const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+    indexable = tint_symbol_4;
     const int x_235 = indexable[x_233];
     const bool x_237 = (x_231 < (x_235 + 15));
     x_248_phi = x_237;
     if (x_237) {
       const int x_241 = pos.x;
       const int x_243 = pos.y;
-      const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_1 = tint_symbol_6;
+      const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_1 = tint_symbol_5;
       const int x_245 = indexable_1[x_243];
       x_247 = (x_241 > (x_245 - 15));
       x_248_phi = x_247;
@@ -36,8 +36,8 @@
     if (x_248_phi) {
       const int x_252 = pos.x;
       const int x_254 = pos.y;
-      const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_2 = tint_symbol_7;
+      const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_2 = tint_symbol_6;
       const int x_256 = indexable_2[x_254];
       p = ((15.0f - abs(float((x_252 - x_256)))) / 15.0f);
       return float4(p, p, p, 1.0f);
@@ -74,11 +74,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl
index 3ed9534..db78398 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -29,16 +29,16 @@
     }
     int const x_231 = (*(pos)).x;
     int const x_233 = (*(pos)).y;
-    tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+    indexable = tint_symbol_2;
     int const x_235 = indexable.arr[x_233];
     bool const x_237 = (x_231 < as_type<int>((as_type<uint>(x_235) + as_type<uint>(15))));
     x_248_phi = x_237;
     if (x_237) {
       int const x_241 = (*(pos)).x;
       int const x_243 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_1 = tint_symbol_3;
       int const x_245 = indexable_1.arr[x_243];
       x_247 = (x_241 > as_type<int>((as_type<uint>(x_245) - as_type<uint>(15))));
       x_248_phi = x_247;
@@ -47,8 +47,8 @@
     if (x_248) {
       int const x_252 = (*(pos)).x;
       int const x_254 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_2 = tint_symbol_4;
       int const x_256 = indexable_2.arr[x_254];
       p = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_252) - as_type<uint>(x_256)))))) / 15.0f);
       float const x_262 = p;
@@ -62,11 +62,11 @@
   return float4(0.0f, 0.0f, 0.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   float2 pos_1 = 0.0f;
   int2 ipos = 0;
   int2 param = 0;
-  float4 const x_205 = *(tint_symbol_8);
+  float4 const x_205 = *(tint_symbol_6);
   float2 const x_208 = x_13.resolution;
   pos_1 = (float2(x_205.x, x_205.y) / x_208);
   float const x_211 = pos_1.x;
@@ -75,17 +75,23 @@
   int2 const x_219 = ipos;
   param = x_219;
   float4 const x_220 = trace_vi2_(&(param));
-  *(tint_symbol_9) = x_220;
+  *(tint_symbol_7) = x_220;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl
index 7b7c9a4..687698f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.hlsl
@@ -19,16 +19,16 @@
     }
     const int x_231 = pos.x;
     const int x_233 = pos.y;
-    const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-    indexable = tint_symbol_5;
+    const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+    indexable = tint_symbol_4;
     const int x_235 = indexable[x_233];
     const bool x_237 = (x_231 < (x_235 + 15));
     x_248_phi = x_237;
     if (x_237) {
       const int x_241 = pos.x;
       const int x_243 = pos.y;
-      const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_1 = tint_symbol_6;
+      const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_1 = tint_symbol_5;
       const int x_245 = indexable_1[x_243];
       x_247 = (x_241 > (x_245 - 15));
       x_248_phi = x_247;
@@ -36,8 +36,8 @@
     if (x_248_phi) {
       const int x_252 = pos.x;
       const int x_254 = pos.y;
-      const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_2 = tint_symbol_7;
+      const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_2 = tint_symbol_6;
       const int x_256 = indexable_2[x_254];
       p = ((15.0f - abs(float((x_252 - x_256)))) / 15.0f);
       return float4(p, p, p, 1.0f);
@@ -74,11 +74,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_8 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  const main_out tint_symbol_7 = {x_GLF_color};
+  return tint_symbol_7;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl
index 3ed9534..db78398 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -29,16 +29,16 @@
     }
     int const x_231 = (*(pos)).x;
     int const x_233 = (*(pos)).y;
-    tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+    indexable = tint_symbol_2;
     int const x_235 = indexable.arr[x_233];
     bool const x_237 = (x_231 < as_type<int>((as_type<uint>(x_235) + as_type<uint>(15))));
     x_248_phi = x_237;
     if (x_237) {
       int const x_241 = (*(pos)).x;
       int const x_243 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_1 = tint_symbol_3;
       int const x_245 = indexable_1.arr[x_243];
       x_247 = (x_241 > as_type<int>((as_type<uint>(x_245) - as_type<uint>(15))));
       x_248_phi = x_247;
@@ -47,8 +47,8 @@
     if (x_248) {
       int const x_252 = (*(pos)).x;
       int const x_254 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_2 = tint_symbol_4;
       int const x_256 = indexable_2.arr[x_254];
       p = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_252) - as_type<uint>(x_256)))))) / 15.0f);
       float const x_262 = p;
@@ -62,11 +62,11 @@
   return float4(0.0f, 0.0f, 0.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   float2 pos_1 = 0.0f;
   int2 ipos = 0;
   int2 param = 0;
-  float4 const x_205 = *(tint_symbol_8);
+  float4 const x_205 = *(tint_symbol_6);
   float2 const x_208 = x_13.resolution;
   pos_1 = (float2(x_205.x, x_205.y) / x_208);
   float const x_211 = pos_1.x;
@@ -75,17 +75,23 @@
   int2 const x_219 = ipos;
   param = x_219;
   float4 const x_220 = trace_vi2_(&(param));
-  *(tint_symbol_9) = x_220;
+  *(tint_symbol_7) = x_220;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_5 = {.x_GLF_color_1=*(tint_symbol_9)};
+  return tint_symbol_5;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_10 = 0.0f;
   thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_7;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl
index f284cbd..ac064f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.hlsl
@@ -19,12 +19,12 @@
     }
     const int x_233 = pos.x;
     const int x_235 = pos.y;
-    const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-    indexable = tint_symbol_5;
+    const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+    indexable = tint_symbol_4;
     const int x_237 = indexable[x_235];
     const int x_238[256] = indexable;
-    const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    indexable = tint_symbol_6;
+    const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    indexable = tint_symbol_5;
     const int x_239 = pos.y;
     pos.y = 0;
     pos.y = x_239;
@@ -34,8 +34,8 @@
     if (x_241) {
       const int x_245 = pos.x;
       const int x_247 = pos.y;
-      const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_1 = tint_symbol_7;
+      const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_1 = tint_symbol_6;
       const int x_249 = indexable_1[x_247];
       x_251 = (x_245 > (x_249 - 15));
       x_252_phi = x_251;
@@ -43,8 +43,8 @@
     if (x_252_phi) {
       const int x_256 = pos.x;
       const int x_258 = pos.y;
-      const int tint_symbol_8[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_2 = tint_symbol_8;
+      const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_2 = tint_symbol_7;
       const int x_260 = indexable_2[x_258];
       p = ((15.0f - abs(float((x_256 - x_260)))) / 15.0f);
       return float4(p, p, p, 1.0f);
@@ -81,11 +81,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl
index 7ecfd1f..6ac12f1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -29,12 +29,12 @@
     }
     int const x_233 = (*(pos)).x;
     int const x_235 = (*(pos)).y;
-    tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+    indexable = tint_symbol_2;
     int const x_237 = indexable.arr[x_235];
     tint_array_wrapper const x_238 = indexable;
-    tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    indexable = tint_symbol_5;
+    tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    indexable = tint_symbol_3;
     int const x_239 = (*(pos)).y;
     (*(pos)).y = 0;
     (*(pos)).y = x_239;
@@ -44,8 +44,8 @@
     if (x_241) {
       int const x_245 = (*(pos)).x;
       int const x_247 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_1 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_1 = tint_symbol_4;
       int const x_249 = indexable_1.arr[x_247];
       x_251 = (x_245 > as_type<int>((as_type<uint>(x_249) - as_type<uint>(15))));
       x_252_phi = x_251;
@@ -54,8 +54,8 @@
     if (x_252) {
       int const x_256 = (*(pos)).x;
       int const x_258 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_7 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_2 = tint_symbol_7;
+      tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_2 = tint_symbol_5;
       int const x_260 = indexable_2.arr[x_258];
       p = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_256) - as_type<uint>(x_260)))))) / 15.0f);
       float const x_266 = p;
@@ -69,11 +69,11 @@
   return float4(0.0f, 0.0f, 0.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 pos_1 = 0.0f;
   int2 ipos = 0;
   int2 param = 0;
-  float4 const x_207 = *(tint_symbol_9);
+  float4 const x_207 = *(tint_symbol_7);
   float2 const x_210 = x_13.resolution;
   pos_1 = (float2(x_207.x, x_207.y) / x_210);
   float const x_213 = pos_1.x;
@@ -82,17 +82,23 @@
   int2 const x_221 = ipos;
   param = x_221;
   float4 const x_222 = trace_vi2_(&(param));
-  *(tint_symbol_10) = x_222;
+  *(tint_symbol_8) = x_222;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl
index f284cbd..ac064f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.hlsl
@@ -19,12 +19,12 @@
     }
     const int x_233 = pos.x;
     const int x_235 = pos.y;
-    const int tint_symbol_5[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-    indexable = tint_symbol_5;
+    const int tint_symbol_4[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+    indexable = tint_symbol_4;
     const int x_237 = indexable[x_235];
     const int x_238[256] = indexable;
-    const int tint_symbol_6[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    indexable = tint_symbol_6;
+    const int tint_symbol_5[256] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    indexable = tint_symbol_5;
     const int x_239 = pos.y;
     pos.y = 0;
     pos.y = x_239;
@@ -34,8 +34,8 @@
     if (x_241) {
       const int x_245 = pos.x;
       const int x_247 = pos.y;
-      const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_1 = tint_symbol_7;
+      const int tint_symbol_6[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_1 = tint_symbol_6;
       const int x_249 = indexable_1[x_247];
       x_251 = (x_245 > (x_249 - 15));
       x_252_phi = x_251;
@@ -43,8 +43,8 @@
     if (x_252_phi) {
       const int x_256 = pos.x;
       const int x_258 = pos.y;
-      const int tint_symbol_8[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
-      indexable_2 = tint_symbol_8;
+      const int tint_symbol_7[256] = {115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94};
+      indexable_2 = tint_symbol_7;
       const int x_260 = indexable_2[x_258];
       p = ((15.0f - abs(float((x_256 - x_260)))) / 15.0f);
       return float4(p, p, p, 1.0f);
@@ -81,11 +81,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl
index 7ecfd1f..6ac12f1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -29,12 +29,12 @@
     }
     int const x_233 = (*(pos)).x;
     int const x_235 = (*(pos)).y;
-    tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+    indexable = tint_symbol_2;
     int const x_237 = indexable.arr[x_235];
     tint_array_wrapper const x_238 = indexable;
-    tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-    indexable = tint_symbol_5;
+    tint_array_wrapper const tint_symbol_3 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    indexable = tint_symbol_3;
     int const x_239 = (*(pos)).y;
     (*(pos)).y = 0;
     (*(pos)).y = x_239;
@@ -44,8 +44,8 @@
     if (x_241) {
       int const x_245 = (*(pos)).x;
       int const x_247 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_1 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_1 = tint_symbol_4;
       int const x_249 = indexable_1.arr[x_247];
       x_251 = (x_245 > as_type<int>((as_type<uint>(x_249) - as_type<uint>(15))));
       x_252_phi = x_251;
@@ -54,8 +54,8 @@
     if (x_252) {
       int const x_256 = (*(pos)).x;
       int const x_258 = (*(pos)).y;
-      tint_array_wrapper const tint_symbol_7 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
-      indexable_2 = tint_symbol_7;
+      tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
+      indexable_2 = tint_symbol_5;
       int const x_260 = indexable_2.arr[x_258];
       p = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_256) - as_type<uint>(x_260)))))) / 15.0f);
       float const x_266 = p;
@@ -69,11 +69,11 @@
   return float4(0.0f, 0.0f, 0.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   float2 pos_1 = 0.0f;
   int2 ipos = 0;
   int2 param = 0;
-  float4 const x_207 = *(tint_symbol_9);
+  float4 const x_207 = *(tint_symbol_7);
   float2 const x_210 = x_13.resolution;
   pos_1 = (float2(x_207.x, x_207.y) / x_210);
   float const x_213 = pos_1.x;
@@ -82,17 +82,23 @@
   int2 const x_221 = ipos;
   param = x_221;
   float4 const x_222 = trace_vi2_(&(param));
-  *(tint_symbol_10) = x_222;
+  *(tint_symbol_8) = x_222;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl
index 18cfa06..766e0f8 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.hlsl
@@ -204,11 +204,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl
index 19624f7..937c758 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl
@@ -13,26 +13,26 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_225 = *(i);
-  int const x_227 = (*(tint_symbol_5)).numbers.arr[x_225];
+  int const x_227 = (*(tint_symbol_3)).numbers.arr[x_225];
   temp = x_227;
   int const x_228 = *(i);
   int const x_229 = *(j);
-  int const x_231 = (*(tint_symbol_5)).numbers.arr[x_229];
-  (*(tint_symbol_5)).numbers.arr[x_228] = x_231;
+  int const x_231 = (*(tint_symbol_3)).numbers.arr[x_229];
+  (*(tint_symbol_3)).numbers.arr[x_228] = x_231;
   int const x_233 = *(j);
   int const x_234 = temp;
-  (*(tint_symbol_5)).numbers.arr[x_233] = x_234;
+  (*(tint_symbol_3)).numbers.arr[x_233] = x_234;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_237 = *(h);
-  int const x_239 = (*(tint_symbol_6)).numbers.arr[x_237];
+  int const x_239 = (*(tint_symbol_4)).numbers.arr[x_237];
   pivot = x_239;
   int const x_240 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_240) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_252 = j_1;
-    int const x_254 = (*(tint_symbol_6)).numbers.arr[x_252];
+    int const x_254 = (*(tint_symbol_4)).numbers.arr[x_252];
     int const x_255 = pivot;
     if ((x_254 <= x_255)) {
       int const x_259 = i_1;
@@ -64,7 +64,7 @@
       param = x_261;
       int const x_262 = j_1;
       param_1 = x_262;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_4);
     }
     {
       int const x_264 = j_1;
@@ -77,12 +77,12 @@
   param_2 = x_268;
   int const x_269 = *(h);
   param_3 = x_269;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4);
   int const x_271 = i_1;
   return x_271;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_7) {
+void quicksort_(thread QuicksortObject* const tint_symbol_5) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -121,7 +121,7 @@
     param_4 = x_296;
     int const x_297 = h_1;
     param_5 = x_297;
-    int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
+    int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5);
     p = x_298;
     int const x_299 = p;
     int const x_301 = l_1;
@@ -155,7 +155,7 @@
   return;
 }
 
-void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
@@ -168,89 +168,95 @@
     }
     int const x_88 = i_2;
     int const x_89 = i_2;
-    (*(tint_symbol_8)).numbers.arr[x_88] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_89)));
+    (*(tint_symbol_6)).numbers.arr[x_88] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_89)));
     int const x_92 = i_2;
     int const x_93 = i_2;
-    int const x_95 = (*(tint_symbol_8)).numbers.arr[x_93];
+    int const x_95 = (*(tint_symbol_6)).numbers.arr[x_93];
     int const x_96 = i_2;
-    int const x_98 = (*(tint_symbol_8)).numbers.arr[x_96];
-    (*(tint_symbol_8)).numbers.arr[x_92] = as_type<int>((as_type<uint>(x_95) * as_type<uint>(x_98)));
+    int const x_98 = (*(tint_symbol_6)).numbers.arr[x_96];
+    (*(tint_symbol_6)).numbers.arr[x_92] = as_type<int>((as_type<uint>(x_95) * as_type<uint>(x_98)));
     {
       int const x_101 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_8);
-  float4 const x_104 = *(tint_symbol_9);
+  quicksort_(tint_symbol_6);
+  float4 const x_104 = *(tint_symbol_7);
   float2 const x_107 = x_32.resolution;
   uv = (float2(x_104.x, x_104.y) / x_107);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_110 = (*(tint_symbol_8)).numbers.arr[0];
+  int const x_110 = (*(tint_symbol_6)).numbers.arr[0];
   float const x_113 = color.x;
   color.x = (x_113 + float(x_110));
   float const x_117 = uv.x;
   if ((x_117 > 0.25f)) {
-    int const x_122 = (*(tint_symbol_8)).numbers.arr[1];
+    int const x_122 = (*(tint_symbol_6)).numbers.arr[1];
     float const x_125 = color.x;
     color.x = (x_125 + float(x_122));
   }
   float const x_129 = uv.x;
   if ((x_129 > 0.5f)) {
-    int const x_134 = (*(tint_symbol_8)).numbers.arr[2];
+    int const x_134 = (*(tint_symbol_6)).numbers.arr[2];
     float const x_137 = color.y;
     color.y = (x_137 + float(x_134));
   }
   float const x_141 = uv.x;
   if ((x_141 > 0.75f)) {
-    int const x_146 = (*(tint_symbol_8)).numbers.arr[3];
+    int const x_146 = (*(tint_symbol_6)).numbers.arr[3];
     float const x_149 = color.z;
     color.z = (x_149 + float(x_146));
   }
-  int const x_153 = (*(tint_symbol_8)).numbers.arr[4];
+  int const x_153 = (*(tint_symbol_6)).numbers.arr[4];
   float const x_156 = color.y;
   color.y = (x_156 + float(x_153));
   float const x_160 = uv.y;
   if ((x_160 > 0.25f)) {
-    int const x_165 = (*(tint_symbol_8)).numbers.arr[5];
+    int const x_165 = (*(tint_symbol_6)).numbers.arr[5];
     float const x_168 = color.x;
     color.x = (x_168 + float(x_165));
   }
   float const x_172 = uv.y;
   if ((x_172 > 0.5f)) {
-    int const x_177 = (*(tint_symbol_8)).numbers.arr[6];
+    int const x_177 = (*(tint_symbol_6)).numbers.arr[6];
     float const x_180 = color.y;
     color.y = (x_180 + float(x_177));
   }
   float const x_184 = uv.y;
   if ((x_184 > 0.75f)) {
-    int const x_189 = (*(tint_symbol_8)).numbers.arr[7];
+    int const x_189 = (*(tint_symbol_6)).numbers.arr[7];
     float const x_192 = color.z;
     color.z = (x_192 + float(x_189));
   }
-  int const x_196 = (*(tint_symbol_8)).numbers.arr[8];
+  int const x_196 = (*(tint_symbol_6)).numbers.arr[8];
   float const x_199 = color.z;
   color.z = (x_199 + float(x_196));
   float const x_203 = uv.x;
   float const x_205 = uv.y;
   if ((fabs((x_203 - x_205)) < 0.25f)) {
-    int const x_212 = (*(tint_symbol_8)).numbers.arr[9];
+    int const x_212 = (*(tint_symbol_6)).numbers.arr[9];
     float const x_215 = color.x;
     color.x = (x_215 + float(x_212));
   }
   float3 const x_218 = color;
   float3 const x_219 = normalize(x_218);
-  *(tint_symbol_10) = float4(x_219.x, x_219.y, x_219.z, 1.0f);
+  *(tint_symbol_8) = float4(x_219.x, x_219.y, x_219.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread QuicksortObject tint_symbol_12 = {};
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread QuicksortObject tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl
index 18cfa06..766e0f8 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.hlsl
@@ -204,11 +204,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl
index 19624f7..937c758 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl
@@ -13,26 +13,26 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_225 = *(i);
-  int const x_227 = (*(tint_symbol_5)).numbers.arr[x_225];
+  int const x_227 = (*(tint_symbol_3)).numbers.arr[x_225];
   temp = x_227;
   int const x_228 = *(i);
   int const x_229 = *(j);
-  int const x_231 = (*(tint_symbol_5)).numbers.arr[x_229];
-  (*(tint_symbol_5)).numbers.arr[x_228] = x_231;
+  int const x_231 = (*(tint_symbol_3)).numbers.arr[x_229];
+  (*(tint_symbol_3)).numbers.arr[x_228] = x_231;
   int const x_233 = *(j);
   int const x_234 = temp;
-  (*(tint_symbol_5)).numbers.arr[x_233] = x_234;
+  (*(tint_symbol_3)).numbers.arr[x_233] = x_234;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_237 = *(h);
-  int const x_239 = (*(tint_symbol_6)).numbers.arr[x_237];
+  int const x_239 = (*(tint_symbol_4)).numbers.arr[x_237];
   pivot = x_239;
   int const x_240 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_240) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_252 = j_1;
-    int const x_254 = (*(tint_symbol_6)).numbers.arr[x_252];
+    int const x_254 = (*(tint_symbol_4)).numbers.arr[x_252];
     int const x_255 = pivot;
     if ((x_254 <= x_255)) {
       int const x_259 = i_1;
@@ -64,7 +64,7 @@
       param = x_261;
       int const x_262 = j_1;
       param_1 = x_262;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_4);
     }
     {
       int const x_264 = j_1;
@@ -77,12 +77,12 @@
   param_2 = x_268;
   int const x_269 = *(h);
   param_3 = x_269;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4);
   int const x_271 = i_1;
   return x_271;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_7) {
+void quicksort_(thread QuicksortObject* const tint_symbol_5) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -121,7 +121,7 @@
     param_4 = x_296;
     int const x_297 = h_1;
     param_5 = x_297;
-    int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
+    int const x_298 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5);
     p = x_298;
     int const x_299 = p;
     int const x_301 = l_1;
@@ -155,7 +155,7 @@
   return;
 }
 
-void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
@@ -168,89 +168,95 @@
     }
     int const x_88 = i_2;
     int const x_89 = i_2;
-    (*(tint_symbol_8)).numbers.arr[x_88] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_89)));
+    (*(tint_symbol_6)).numbers.arr[x_88] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_89)));
     int const x_92 = i_2;
     int const x_93 = i_2;
-    int const x_95 = (*(tint_symbol_8)).numbers.arr[x_93];
+    int const x_95 = (*(tint_symbol_6)).numbers.arr[x_93];
     int const x_96 = i_2;
-    int const x_98 = (*(tint_symbol_8)).numbers.arr[x_96];
-    (*(tint_symbol_8)).numbers.arr[x_92] = as_type<int>((as_type<uint>(x_95) * as_type<uint>(x_98)));
+    int const x_98 = (*(tint_symbol_6)).numbers.arr[x_96];
+    (*(tint_symbol_6)).numbers.arr[x_92] = as_type<int>((as_type<uint>(x_95) * as_type<uint>(x_98)));
     {
       int const x_101 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_8);
-  float4 const x_104 = *(tint_symbol_9);
+  quicksort_(tint_symbol_6);
+  float4 const x_104 = *(tint_symbol_7);
   float2 const x_107 = x_32.resolution;
   uv = (float2(x_104.x, x_104.y) / x_107);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_110 = (*(tint_symbol_8)).numbers.arr[0];
+  int const x_110 = (*(tint_symbol_6)).numbers.arr[0];
   float const x_113 = color.x;
   color.x = (x_113 + float(x_110));
   float const x_117 = uv.x;
   if ((x_117 > 0.25f)) {
-    int const x_122 = (*(tint_symbol_8)).numbers.arr[1];
+    int const x_122 = (*(tint_symbol_6)).numbers.arr[1];
     float const x_125 = color.x;
     color.x = (x_125 + float(x_122));
   }
   float const x_129 = uv.x;
   if ((x_129 > 0.5f)) {
-    int const x_134 = (*(tint_symbol_8)).numbers.arr[2];
+    int const x_134 = (*(tint_symbol_6)).numbers.arr[2];
     float const x_137 = color.y;
     color.y = (x_137 + float(x_134));
   }
   float const x_141 = uv.x;
   if ((x_141 > 0.75f)) {
-    int const x_146 = (*(tint_symbol_8)).numbers.arr[3];
+    int const x_146 = (*(tint_symbol_6)).numbers.arr[3];
     float const x_149 = color.z;
     color.z = (x_149 + float(x_146));
   }
-  int const x_153 = (*(tint_symbol_8)).numbers.arr[4];
+  int const x_153 = (*(tint_symbol_6)).numbers.arr[4];
   float const x_156 = color.y;
   color.y = (x_156 + float(x_153));
   float const x_160 = uv.y;
   if ((x_160 > 0.25f)) {
-    int const x_165 = (*(tint_symbol_8)).numbers.arr[5];
+    int const x_165 = (*(tint_symbol_6)).numbers.arr[5];
     float const x_168 = color.x;
     color.x = (x_168 + float(x_165));
   }
   float const x_172 = uv.y;
   if ((x_172 > 0.5f)) {
-    int const x_177 = (*(tint_symbol_8)).numbers.arr[6];
+    int const x_177 = (*(tint_symbol_6)).numbers.arr[6];
     float const x_180 = color.y;
     color.y = (x_180 + float(x_177));
   }
   float const x_184 = uv.y;
   if ((x_184 > 0.75f)) {
-    int const x_189 = (*(tint_symbol_8)).numbers.arr[7];
+    int const x_189 = (*(tint_symbol_6)).numbers.arr[7];
     float const x_192 = color.z;
     color.z = (x_192 + float(x_189));
   }
-  int const x_196 = (*(tint_symbol_8)).numbers.arr[8];
+  int const x_196 = (*(tint_symbol_6)).numbers.arr[8];
   float const x_199 = color.z;
   color.z = (x_199 + float(x_196));
   float const x_203 = uv.x;
   float const x_205 = uv.y;
   if ((fabs((x_203 - x_205)) < 0.25f)) {
-    int const x_212 = (*(tint_symbol_8)).numbers.arr[9];
+    int const x_212 = (*(tint_symbol_6)).numbers.arr[9];
     float const x_215 = color.x;
     color.x = (x_215 + float(x_212));
   }
   float3 const x_218 = color;
   float3 const x_219 = normalize(x_218);
-  *(tint_symbol_10) = float4(x_219.x, x_219.y, x_219.z, 1.0f);
+  *(tint_symbol_8) = float4(x_219.x, x_219.y, x_219.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread QuicksortObject tint_symbol_12 = {};
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread QuicksortObject tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl
index 405b040..c8248eb 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.hlsl
@@ -204,11 +204,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl
index 73e23ff..ccdc000 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl
@@ -13,26 +13,26 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_5) {
+void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_230 = *(i);
-  int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230];
+  int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230];
   temp = x_232;
   int const x_233 = *(i);
   int const x_234 = *(j);
-  int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234];
-  (*(tint_symbol_5)).numbers.arr[x_233] = x_236;
+  int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234];
+  (*(tint_symbol_3)).numbers.arr[x_233] = x_236;
   int const x_238 = *(j);
   int const x_239 = temp;
-  (*(tint_symbol_5)).numbers.arr[x_238] = x_239;
+  (*(tint_symbol_3)).numbers.arr[x_238] = x_239;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_242 = *(h);
-  int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242];
+  int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242];
   pivot = x_244;
   int const x_245 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_245) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_257 = j_1;
-    int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257];
+    int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257];
     int const x_260 = pivot;
     if ((x_259 <= x_260)) {
       int const x_264 = i_1;
@@ -64,7 +64,7 @@
       param = x_266;
       int const x_267 = j_1;
       param_1 = x_267;
-      swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6);
+      swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4);
     }
     {
       int const x_269 = j_1;
@@ -77,12 +77,12 @@
   param_2 = x_273;
   int const x_274 = *(h);
   param_3 = x_274;
-  swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6);
+  swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4);
   int const x_276 = i_1;
   return x_276;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_7) {
+void quicksort_(thread QuicksortObject* const tint_symbol_5) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -121,7 +121,7 @@
     param_4 = x_301;
     int const x_302 = h_1;
     param_5 = x_302;
-    int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
+    int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5);
     p = x_303;
     int const x_304 = p;
     int const x_306 = l_1;
@@ -155,7 +155,7 @@
   return;
 }
 
-void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
@@ -168,89 +168,95 @@
     }
     int const x_92 = i_2;
     int const x_93 = i_2;
-    (*(tint_symbol_8)).numbers.arr[x_92] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_93)));
+    (*(tint_symbol_6)).numbers.arr[x_92] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_93)));
     int const x_96 = i_2;
     int const x_97 = i_2;
-    int const x_99 = (*(tint_symbol_8)).numbers.arr[x_97];
+    int const x_99 = (*(tint_symbol_6)).numbers.arr[x_97];
     int const x_100 = i_2;
-    int const x_102 = (*(tint_symbol_8)).numbers.arr[x_100];
-    (*(tint_symbol_8)).numbers.arr[x_96] = as_type<int>((as_type<uint>(x_99) * as_type<uint>(x_102)));
+    int const x_102 = (*(tint_symbol_6)).numbers.arr[x_100];
+    (*(tint_symbol_6)).numbers.arr[x_96] = as_type<int>((as_type<uint>(x_99) * as_type<uint>(x_102)));
     {
       int const x_105 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_8);
-  float4 const x_108 = *(tint_symbol_9);
+  quicksort_(tint_symbol_6);
+  float4 const x_108 = *(tint_symbol_7);
   float2 const x_111 = x_32.resolution;
   uv = (float2(x_108.x, x_108.y) / x_111);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_114 = (*(tint_symbol_8)).numbers.arr[0];
+  int const x_114 = (*(tint_symbol_6)).numbers.arr[0];
   float const x_117 = color.x;
   color.x = (x_117 + float(x_114));
   float const x_121 = uv.x;
   if ((x_121 > 0.25f)) {
-    int const x_126 = (*(tint_symbol_8)).numbers.arr[1];
+    int const x_126 = (*(tint_symbol_6)).numbers.arr[1];
     float const x_129 = color.x;
     color.x = (x_129 + float(x_126));
   }
   float const x_133 = uv.x;
   if ((x_133 > 0.5f)) {
-    int const x_138 = (*(tint_symbol_8)).numbers.arr[2];
+    int const x_138 = (*(tint_symbol_6)).numbers.arr[2];
     float const x_141 = color.y;
     color.y = (x_141 + float(x_138));
   }
   float const x_145 = uv.x;
   if ((x_145 > 0.75f)) {
-    int const x_150 = (*(tint_symbol_8)).numbers.arr[3];
+    int const x_150 = (*(tint_symbol_6)).numbers.arr[3];
     float const x_153 = color.z;
     color.z = (x_153 + float(x_150));
   }
-  int const x_157 = (*(tint_symbol_8)).numbers.arr[4];
+  int const x_157 = (*(tint_symbol_6)).numbers.arr[4];
   float const x_160 = color.y;
   color.y = (x_160 + float(x_157));
   float const x_164 = uv.y;
   if ((x_164 > 0.25f)) {
-    int const x_169 = (*(tint_symbol_8)).numbers.arr[5];
+    int const x_169 = (*(tint_symbol_6)).numbers.arr[5];
     float const x_172 = color.x;
     color.x = (x_172 + float(x_169));
   }
   float const x_176 = uv.y;
   if ((x_176 > 0.5f)) {
-    int const x_181 = (*(tint_symbol_8)).numbers.arr[6];
+    int const x_181 = (*(tint_symbol_6)).numbers.arr[6];
     float const x_184 = color.y;
     color.y = (x_184 + float(x_181));
   }
   float const x_188 = uv.y;
   if ((x_188 > 0.75f)) {
-    int const x_193 = (*(tint_symbol_8)).numbers.arr[7];
+    int const x_193 = (*(tint_symbol_6)).numbers.arr[7];
     float const x_196 = color.z;
     color.z = (x_196 + float(x_193));
   }
-  int const x_200 = (*(tint_symbol_8)).numbers.arr[8];
+  int const x_200 = (*(tint_symbol_6)).numbers.arr[8];
   float const x_203 = color.z;
   color.z = (x_203 + float(x_200));
   float const x_207 = uv.x;
   float const x_209 = uv.y;
   if ((fabs((x_207 - x_209)) < 0.25f)) {
-    int const x_216 = (*(tint_symbol_8)).numbers.arr[9];
+    int const x_216 = (*(tint_symbol_6)).numbers.arr[9];
     float const x_219 = color.x;
     color.x = (x_219 + float(x_216));
   }
   float3 const x_222 = color;
   float3 const x_223 = normalize(x_222);
-  *(tint_symbol_10) = float4(x_223.x, x_223.y, x_223.z, 1.0f);
+  *(tint_symbol_8) = float4(x_223.x, x_223.y, x_223.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread QuicksortObject tint_symbol_12 = {};
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread QuicksortObject tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl
index 405b040..c8248eb 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.hlsl
@@ -204,11 +204,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl
index 73e23ff..ccdc000 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl
@@ -13,26 +13,26 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_5) {
+void swap_i1_i1_(thread int* const i, thread int* const j, float3x3 x_228, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_230 = *(i);
-  int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230];
+  int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230];
   temp = x_232;
   int const x_233 = *(i);
   int const x_234 = *(j);
-  int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234];
-  (*(tint_symbol_5)).numbers.arr[x_233] = x_236;
+  int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234];
+  (*(tint_symbol_3)).numbers.arr[x_233] = x_236;
   int const x_238 = *(j);
   int const x_239 = temp;
-  (*(tint_symbol_5)).numbers.arr[x_238] = x_239;
+  (*(tint_symbol_3)).numbers.arr[x_238] = x_239;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_242 = *(h);
-  int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242];
+  int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242];
   pivot = x_244;
   int const x_245 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_245) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_257 = j_1;
-    int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257];
+    int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257];
     int const x_260 = pivot;
     if ((x_259 <= x_260)) {
       int const x_264 = i_1;
@@ -64,7 +64,7 @@
       param = x_266;
       int const x_267 = j_1;
       param_1 = x_267;
-      swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6);
+      swap_i1_i1_(&(param), &(param_1), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4);
     }
     {
       int const x_269 = j_1;
@@ -77,12 +77,12 @@
   param_2 = x_273;
   int const x_274 = *(h);
   param_3 = x_274;
-  swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_6);
+  swap_i1_i1_(&(param_2), &(param_3), float3x3(float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f), float3(0.0f, 0.0f, 0.0f)), tint_symbol_4);
   int const x_276 = i_1;
   return x_276;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_7) {
+void quicksort_(thread QuicksortObject* const tint_symbol_5) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -121,7 +121,7 @@
     param_4 = x_301;
     int const x_302 = h_1;
     param_5 = x_302;
-    int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
+    int const x_303 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_5);
     p = x_303;
     int const x_304 = p;
     int const x_306 = l_1;
@@ -155,7 +155,7 @@
   return;
 }
 
-void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
@@ -168,89 +168,95 @@
     }
     int const x_92 = i_2;
     int const x_93 = i_2;
-    (*(tint_symbol_8)).numbers.arr[x_92] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_93)));
+    (*(tint_symbol_6)).numbers.arr[x_92] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_93)));
     int const x_96 = i_2;
     int const x_97 = i_2;
-    int const x_99 = (*(tint_symbol_8)).numbers.arr[x_97];
+    int const x_99 = (*(tint_symbol_6)).numbers.arr[x_97];
     int const x_100 = i_2;
-    int const x_102 = (*(tint_symbol_8)).numbers.arr[x_100];
-    (*(tint_symbol_8)).numbers.arr[x_96] = as_type<int>((as_type<uint>(x_99) * as_type<uint>(x_102)));
+    int const x_102 = (*(tint_symbol_6)).numbers.arr[x_100];
+    (*(tint_symbol_6)).numbers.arr[x_96] = as_type<int>((as_type<uint>(x_99) * as_type<uint>(x_102)));
     {
       int const x_105 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_8);
-  float4 const x_108 = *(tint_symbol_9);
+  quicksort_(tint_symbol_6);
+  float4 const x_108 = *(tint_symbol_7);
   float2 const x_111 = x_32.resolution;
   uv = (float2(x_108.x, x_108.y) / x_111);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_114 = (*(tint_symbol_8)).numbers.arr[0];
+  int const x_114 = (*(tint_symbol_6)).numbers.arr[0];
   float const x_117 = color.x;
   color.x = (x_117 + float(x_114));
   float const x_121 = uv.x;
   if ((x_121 > 0.25f)) {
-    int const x_126 = (*(tint_symbol_8)).numbers.arr[1];
+    int const x_126 = (*(tint_symbol_6)).numbers.arr[1];
     float const x_129 = color.x;
     color.x = (x_129 + float(x_126));
   }
   float const x_133 = uv.x;
   if ((x_133 > 0.5f)) {
-    int const x_138 = (*(tint_symbol_8)).numbers.arr[2];
+    int const x_138 = (*(tint_symbol_6)).numbers.arr[2];
     float const x_141 = color.y;
     color.y = (x_141 + float(x_138));
   }
   float const x_145 = uv.x;
   if ((x_145 > 0.75f)) {
-    int const x_150 = (*(tint_symbol_8)).numbers.arr[3];
+    int const x_150 = (*(tint_symbol_6)).numbers.arr[3];
     float const x_153 = color.z;
     color.z = (x_153 + float(x_150));
   }
-  int const x_157 = (*(tint_symbol_8)).numbers.arr[4];
+  int const x_157 = (*(tint_symbol_6)).numbers.arr[4];
   float const x_160 = color.y;
   color.y = (x_160 + float(x_157));
   float const x_164 = uv.y;
   if ((x_164 > 0.25f)) {
-    int const x_169 = (*(tint_symbol_8)).numbers.arr[5];
+    int const x_169 = (*(tint_symbol_6)).numbers.arr[5];
     float const x_172 = color.x;
     color.x = (x_172 + float(x_169));
   }
   float const x_176 = uv.y;
   if ((x_176 > 0.5f)) {
-    int const x_181 = (*(tint_symbol_8)).numbers.arr[6];
+    int const x_181 = (*(tint_symbol_6)).numbers.arr[6];
     float const x_184 = color.y;
     color.y = (x_184 + float(x_181));
   }
   float const x_188 = uv.y;
   if ((x_188 > 0.75f)) {
-    int const x_193 = (*(tint_symbol_8)).numbers.arr[7];
+    int const x_193 = (*(tint_symbol_6)).numbers.arr[7];
     float const x_196 = color.z;
     color.z = (x_196 + float(x_193));
   }
-  int const x_200 = (*(tint_symbol_8)).numbers.arr[8];
+  int const x_200 = (*(tint_symbol_6)).numbers.arr[8];
   float const x_203 = color.z;
   color.z = (x_203 + float(x_200));
   float const x_207 = uv.x;
   float const x_209 = uv.y;
   if ((fabs((x_207 - x_209)) < 0.25f)) {
-    int const x_216 = (*(tint_symbol_8)).numbers.arr[9];
+    int const x_216 = (*(tint_symbol_6)).numbers.arr[9];
     float const x_219 = color.x;
     color.x = (x_219 + float(x_216));
   }
   float3 const x_222 = color;
   float3 const x_223 = normalize(x_222);
-  *(tint_symbol_10) = float4(x_223.x, x_223.y, x_223.z, 1.0f);
+  *(tint_symbol_8) = float4(x_223.x, x_223.y, x_223.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread QuicksortObject tint_symbol_12 = {};
-  thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_32, &(tint_symbol_12), &(tint_symbol_11), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_32, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_32, tint_symbol_10, tint_symbol_9, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_32 [[buffer(0)]]) {
+  thread float4 tint_symbol_12 = 0.0f;
+  thread QuicksortObject tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_32, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl
index 2846e30..d73c39b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.hlsl
@@ -13,8 +13,8 @@
   float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
   int x_98_phi = 0;
-  const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-  x_81 = tint_symbol_5;
+  const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+  x_81 = tint_symbol_4;
   const float4 x_86[8] = x_81;
   const float4 x_87 = gl_FragCoord;
   const float2 x_90 = asfloat(x_6[0].xy);
@@ -64,18 +64,18 @@
     const bool x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_83 = tint_symbol_6;
+      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_83 = tint_symbol_5;
       const float x_131 = x_83[x_98].x;
-      const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_84 = tint_symbol_7;
+      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_84 = tint_symbol_6;
       const float x_134 = x_84[x_98].y;
       const float4 x_135[8] = x_81;
-      const float4 tint_symbol_8[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-      x_81 = tint_symbol_8;
+      const float4 tint_symbol_7[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+      x_81 = tint_symbol_7;
       x_81 = x_135;
-      const float4 tint_symbol_9[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-      x_85 = tint_symbol_9;
+      const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+      x_85 = tint_symbol_8;
       x_143 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)];
       x_96_phi = x_143;
     }
@@ -100,11 +100,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_10 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_10;
+  const main_out tint_symbol_9 = {x_GLF_color};
+  return tint_symbol_9;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl
index f6b0d6f..0b6546d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
   tint_array_wrapper x_82 = {};
   tint_array_wrapper x_83 = {};
@@ -26,10 +26,10 @@
   float4 x_95 = 0.0f;
   float4 x_95_phi = 0.0f;
   int x_98_phi = 0;
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-  x_81 = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+  x_81 = tint_symbol_2;
   tint_array_wrapper const x_86 = x_81;
-  float4 const x_87 = *(tint_symbol_10);
+  float4 const x_87 = *(tint_symbol_8);
   float2 const x_90 = x_6.resolution;
   float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f));
   x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
@@ -77,18 +77,18 @@
     bool const x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_83 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_83 = tint_symbol_3;
       float const x_131 = x_83.arr[x_98].x;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_84 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_84 = tint_symbol_4;
       float const x_134 = x_84.arr[x_98].y;
       tint_array_wrapper const x_135 = x_81;
-      tint_array_wrapper const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-      x_81 = tint_symbol_7;
+      tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+      x_81 = tint_symbol_5;
       x_81 = x_135;
-      tint_array_wrapper_1 const tint_symbol_8 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      x_85 = tint_symbol_8;
+      tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      x_85 = tint_symbol_6;
       x_143 = x_85.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       x_96_phi = x_143;
     }
@@ -99,17 +99,23 @@
       x_98_phi = x_99;
     }
   }
-  *(tint_symbol_11) = x_95;
+  *(tint_symbol_9) = x_95;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_7 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_7;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_12 = 0.0f;
   thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_12), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_9 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl
index 2846e30..d73c39b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.hlsl
@@ -13,8 +13,8 @@
   float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
   int x_98_phi = 0;
-  const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-  x_81 = tint_symbol_5;
+  const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+  x_81 = tint_symbol_4;
   const float4 x_86[8] = x_81;
   const float4 x_87 = gl_FragCoord;
   const float2 x_90 = asfloat(x_6[0].xy);
@@ -64,18 +64,18 @@
     const bool x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_83 = tint_symbol_6;
+      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_83 = tint_symbol_5;
       const float x_131 = x_83[x_98].x;
-      const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_84 = tint_symbol_7;
+      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_84 = tint_symbol_6;
       const float x_134 = x_84[x_98].y;
       const float4 x_135[8] = x_81;
-      const float4 tint_symbol_8[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
-      x_81 = tint_symbol_8;
+      const float4 tint_symbol_7[8] = {float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)};
+      x_81 = tint_symbol_7;
       x_81 = x_135;
-      const float4 tint_symbol_9[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-      x_85 = tint_symbol_9;
+      const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+      x_85 = tint_symbol_8;
       x_143 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)];
       x_96_phi = x_143;
     }
@@ -100,11 +100,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_10 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_10;
+  const main_out tint_symbol_9 = {x_GLF_color};
+  return tint_symbol_9;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl
index f6b0d6f..0b6546d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
   tint_array_wrapper x_82 = {};
   tint_array_wrapper x_83 = {};
@@ -26,10 +26,10 @@
   float4 x_95 = 0.0f;
   float4 x_95_phi = 0.0f;
   int x_98_phi = 0;
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-  x_81 = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+  x_81 = tint_symbol_2;
   tint_array_wrapper const x_86 = x_81;
-  float4 const x_87 = *(tint_symbol_10);
+  float4 const x_87 = *(tint_symbol_8);
   float2 const x_90 = x_6.resolution;
   float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f));
   x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
@@ -77,18 +77,18 @@
     bool const x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_83 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_83 = tint_symbol_3;
       float const x_131 = x_83.arr[x_98].x;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_84 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_84 = tint_symbol_4;
       float const x_134 = x_84.arr[x_98].y;
       tint_array_wrapper const x_135 = x_81;
-      tint_array_wrapper const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
-      x_81 = tint_symbol_7;
+      tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
+      x_81 = tint_symbol_5;
       x_81 = x_135;
-      tint_array_wrapper_1 const tint_symbol_8 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      x_85 = tint_symbol_8;
+      tint_array_wrapper_1 const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      x_85 = tint_symbol_6;
       x_143 = x_85.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       x_96_phi = x_143;
     }
@@ -99,17 +99,23 @@
       x_98_phi = x_99;
     }
   }
-  *(tint_symbol_11) = x_95;
+  *(tint_symbol_9) = x_95;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_7 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_7;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_12 = 0.0f;
   thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_12), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_9 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl
index d50630e..2f6304b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.hlsl
@@ -13,8 +13,8 @@
   float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
   int x_98_phi = 0;
-  const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-  x_81 = tint_symbol_5;
+  const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+  x_81 = tint_symbol_4;
   const float4 x_86[8] = x_81;
   const float4 x_87 = gl_FragCoord;
   const float2 x_90 = asfloat(x_6[0].xy);
@@ -64,14 +64,14 @@
     const bool x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_83 = tint_symbol_6;
+      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_83 = tint_symbol_5;
       const float x_131 = x_83[x_98].x;
-      const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_84 = tint_symbol_7;
+      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_84 = tint_symbol_6;
       const float x_134 = x_84[x_98].y;
-      const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-      x_85 = tint_symbol_8;
+      const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+      x_85 = tint_symbol_7;
       x_142 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)];
       x_96_phi = x_142;
     }
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl
index dd850d8..4eb5fa1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
   tint_array_wrapper x_82 = {};
   tint_array_wrapper x_83 = {};
@@ -26,10 +26,10 @@
   float4 x_95 = 0.0f;
   float4 x_95_phi = 0.0f;
   int x_98_phi = 0;
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-  x_81 = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+  x_81 = tint_symbol_2;
   tint_array_wrapper const x_86 = x_81;
-  float4 const x_87 = *(tint_symbol_9);
+  float4 const x_87 = *(tint_symbol_7);
   float2 const x_90 = x_6.resolution;
   float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f));
   x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
@@ -77,14 +77,14 @@
     bool const x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_83 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_83 = tint_symbol_3;
       float const x_131 = x_83.arr[x_98].x;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_84 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_84 = tint_symbol_4;
       float const x_134 = x_84.arr[x_98].y;
-      tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      x_85 = tint_symbol_7;
+      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      x_85 = tint_symbol_5;
       x_142 = x_85.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       x_96_phi = x_142;
     }
@@ -95,17 +95,23 @@
       x_98_phi = x_99;
     }
   }
-  *(tint_symbol_10) = x_95;
+  *(tint_symbol_8) = x_95;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl
index d50630e..2f6304b 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.hlsl
@@ -13,8 +13,8 @@
   float4 x_95 = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float4 x_95_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
   int x_98_phi = 0;
-  const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-  x_81 = tint_symbol_5;
+  const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+  x_81 = tint_symbol_4;
   const float4 x_86[8] = x_81;
   const float4 x_87 = gl_FragCoord;
   const float2 x_90 = asfloat(x_6[0].xy);
@@ -64,14 +64,14 @@
     const bool x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_83 = tint_symbol_6;
+      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_83 = tint_symbol_5;
       const float x_131 = x_83[x_98].x;
-      const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      x_84 = tint_symbol_7;
+      const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      x_84 = tint_symbol_6;
       const float x_134 = x_84[x_98].y;
-      const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-      x_85 = tint_symbol_8;
+      const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+      x_85 = tint_symbol_7;
       x_142 = x_85[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)];
       x_96_phi = x_142;
     }
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl
index dd850d8..4eb5fa1 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl
@@ -13,11 +13,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
   tint_array_wrapper x_81 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
   tint_array_wrapper x_82 = {};
   tint_array_wrapper x_83 = {};
@@ -26,10 +26,10 @@
   float4 x_95 = 0.0f;
   float4 x_95_phi = 0.0f;
   int x_98_phi = 0;
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-  x_81 = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+  x_81 = tint_symbol_2;
   tint_array_wrapper const x_86 = x_81;
-  float4 const x_87 = *(tint_symbol_9);
+  float4 const x_87 = *(tint_symbol_7);
   float2 const x_90 = x_6.resolution;
   float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f));
   x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
@@ -77,14 +77,14 @@
     bool const x_127 = x_127_phi;
     x_96_phi = x_95;
     if (x_127) {
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_83 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_83 = tint_symbol_3;
       float const x_131 = x_83.arr[x_98].x;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      x_84 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      x_84 = tint_symbol_4;
       float const x_134 = x_84.arr[x_98].y;
-      tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      x_85 = tint_symbol_7;
+      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      x_85 = tint_symbol_5;
       x_142 = x_85.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       x_96_phi = x_142;
     }
@@ -95,17 +95,23 @@
       x_98_phi = x_99;
     }
   }
-  *(tint_symbol_10) = x_95;
+  *(tint_symbol_8) = x_95;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_9) = gl_FragCoord_param;
+  main_1(x_6, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_11 = gl_FragCoord_param;
-  main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl
index 1f593e3..5f9933f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.hlsl
@@ -14,8 +14,8 @@
   int x_353_phi = 0;
   int x_356_phi = 0;
   int x_358_phi = 0;
-  const BST tint_symbol_2 = {9, -1, -1};
-  tree[0] = tint_symbol_2;
+  const BST tint_symbol_1 = {9, -1, -1};
+  tree[0] = tint_symbol_1;
   switch(0u) {
     default: {
       x_58_phi = 0;
@@ -36,8 +36,8 @@
           const int x_79 = tree[x_78_save].leftIndex;
           if ((x_79 == -1)) {
             tree[x_78_save].leftIndex = 1;
-            const BST tint_symbol_3 = {5, -1, -1};
-            tree[1] = tint_symbol_3;
+            const BST tint_symbol_2 = {5, -1, -1};
+            tree[1] = tint_symbol_2;
             x_86_phi = true;
             break;
           } else {
@@ -55,8 +55,8 @@
           const int x_71 = tree[x_70_save].rightIndex;
           if ((x_71 == -1)) {
             tree[x_70_save].rightIndex = 1;
-            const BST tint_symbol_4 = {5, -1, -1};
-            tree[1] = tint_symbol_4;
+            const BST tint_symbol_3 = {5, -1, -1};
+            tree[1] = tint_symbol_3;
             x_86_phi = true;
             break;
           } else {
@@ -104,8 +104,8 @@
           const int x_112 = tree[x_111_save].leftIndex;
           if ((x_112 == -1)) {
             tree[x_111_save].leftIndex = 2;
-            const BST tint_symbol_5 = {12, -1, -1};
-            tree[2] = tint_symbol_5;
+            const BST tint_symbol_4 = {12, -1, -1};
+            tree[2] = tint_symbol_4;
             x_119_phi = true;
             break;
           } else {
@@ -123,8 +123,8 @@
           const int x_104 = tree[x_103_save].rightIndex;
           if ((x_104 == -1)) {
             tree[x_103_save].rightIndex = 2;
-            const BST tint_symbol_6 = {12, -1, -1};
-            tree[2] = tint_symbol_6;
+            const BST tint_symbol_5 = {12, -1, -1};
+            tree[2] = tint_symbol_5;
             x_119_phi = true;
             break;
           } else {
@@ -172,8 +172,8 @@
           const int x_145 = tree[x_144_save].leftIndex;
           if ((x_145 == -1)) {
             tree[x_144_save].leftIndex = 3;
-            const BST tint_symbol_7 = {15, -1, -1};
-            tree[3] = tint_symbol_7;
+            const BST tint_symbol_6 = {15, -1, -1};
+            tree[3] = tint_symbol_6;
             x_152_phi = true;
             break;
           } else {
@@ -191,8 +191,8 @@
           const int x_137 = tree[x_136_save].rightIndex;
           if ((x_137 == -1)) {
             tree[x_136_save].rightIndex = 3;
-            const BST tint_symbol_8 = {15, -1, -1};
-            tree[3] = tint_symbol_8;
+            const BST tint_symbol_7 = {15, -1, -1};
+            tree[3] = tint_symbol_7;
             x_152_phi = true;
             break;
           } else {
@@ -240,8 +240,8 @@
           const int x_178 = tree[x_177_save].leftIndex;
           if ((x_178 == -1)) {
             tree[x_177_save].leftIndex = 4;
-            const BST tint_symbol_9 = {7, -1, -1};
-            tree[4] = tint_symbol_9;
+            const BST tint_symbol_8 = {7, -1, -1};
+            tree[4] = tint_symbol_8;
             x_185_phi = true;
             break;
           } else {
@@ -259,8 +259,8 @@
           const int x_170 = tree[x_169_save].rightIndex;
           if ((x_170 == -1)) {
             tree[x_169_save].rightIndex = 4;
-            const BST tint_symbol_10 = {7, -1, -1};
-            tree[4] = tint_symbol_10;
+            const BST tint_symbol_9 = {7, -1, -1};
+            tree[4] = tint_symbol_9;
             x_185_phi = true;
             break;
           } else {
@@ -308,8 +308,8 @@
           const int x_211 = tree[x_210_save].leftIndex;
           if ((x_211 == -1)) {
             tree[x_210_save].leftIndex = 5;
-            const BST tint_symbol_11 = {8, -1, -1};
-            tree[5] = tint_symbol_11;
+            const BST tint_symbol_10 = {8, -1, -1};
+            tree[5] = tint_symbol_10;
             x_218_phi = true;
             break;
           } else {
@@ -327,8 +327,8 @@
           const int x_203 = tree[x_202_save].rightIndex;
           if ((x_203 == -1)) {
             tree[x_202_save].rightIndex = 5;
-            const BST tint_symbol_12 = {8, -1, -1};
-            tree[5] = tint_symbol_12;
+            const BST tint_symbol_11 = {8, -1, -1};
+            tree[5] = tint_symbol_11;
             x_218_phi = true;
             break;
           } else {
@@ -376,8 +376,8 @@
           const int x_244 = tree[x_243_save].leftIndex;
           if ((x_244 == -1)) {
             tree[x_243_save].leftIndex = 6;
-            const BST tint_symbol_13 = {2, -1, -1};
-            tree[6] = tint_symbol_13;
+            const BST tint_symbol_12 = {2, -1, -1};
+            tree[6] = tint_symbol_12;
             x_251_phi = true;
             break;
           } else {
@@ -395,8 +395,8 @@
           const int x_236 = tree[x_235_save].rightIndex;
           if ((x_236 == -1)) {
             tree[x_235_save].rightIndex = 6;
-            const BST tint_symbol_14 = {2, -1, -1};
-            tree[6] = tint_symbol_14;
+            const BST tint_symbol_13 = {2, -1, -1};
+            tree[6] = tint_symbol_13;
             x_251_phi = true;
             break;
           } else {
@@ -444,8 +444,8 @@
           const int x_277 = tree[x_276_save].leftIndex;
           if ((x_277 == -1)) {
             tree[x_276_save].leftIndex = 7;
-            const BST tint_symbol_15 = {6, -1, -1};
-            tree[7] = tint_symbol_15;
+            const BST tint_symbol_14 = {6, -1, -1};
+            tree[7] = tint_symbol_14;
             x_284_phi = true;
             break;
           } else {
@@ -463,8 +463,8 @@
           const int x_269 = tree[x_268_save].rightIndex;
           if ((x_269 == -1)) {
             tree[x_268_save].rightIndex = 7;
-            const BST tint_symbol_16 = {6, -1, -1};
-            tree[7] = tint_symbol_16;
+            const BST tint_symbol_15 = {6, -1, -1};
+            tree[7] = tint_symbol_15;
             x_284_phi = true;
             break;
           } else {
@@ -512,8 +512,8 @@
           const int x_310 = tree[x_309_save].leftIndex;
           if ((x_310 == -1)) {
             tree[x_309_save].leftIndex = 8;
-            const BST tint_symbol_17 = {17, -1, -1};
-            tree[8] = tint_symbol_17;
+            const BST tint_symbol_16 = {17, -1, -1};
+            tree[8] = tint_symbol_16;
             x_317_phi = true;
             break;
           } else {
@@ -531,8 +531,8 @@
           const int x_302 = tree[x_301_save].rightIndex;
           if ((x_302 == -1)) {
             tree[x_301_save].rightIndex = 8;
-            const BST tint_symbol_18 = {17, -1, -1};
-            tree[8] = tint_symbol_18;
+            const BST tint_symbol_17 = {17, -1, -1};
+            tree[8] = tint_symbol_17;
             x_317_phi = true;
             break;
           } else {
@@ -580,8 +580,8 @@
           const int x_343 = tree[x_342_save].leftIndex;
           if ((x_343 == -1)) {
             tree[x_342_save].leftIndex = 9;
-            const BST tint_symbol_19 = {13, -1, -1};
-            tree[9] = tint_symbol_19;
+            const BST tint_symbol_18 = {13, -1, -1};
+            tree[9] = tint_symbol_18;
             x_350_phi = true;
             break;
           } else {
@@ -599,8 +599,8 @@
           const int x_335 = tree[x_334_save].rightIndex;
           if ((x_335 == -1)) {
             tree[x_334_save].rightIndex = 9;
-            const BST tint_symbol_20 = {13, -1, -1};
-            tree[9] = tint_symbol_20;
+            const BST tint_symbol_19 = {13, -1, -1};
+            tree[9] = tint_symbol_19;
             x_350_phi = true;
             break;
           } else {
@@ -740,9 +740,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_21;
+  const main_out tint_symbol_20 = {x_GLF_color};
+  return tint_symbol_20;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl
index 1f650e5..3338c66 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl
@@ -16,7 +16,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_23) {
+void main_1(thread float4* const tint_symbol_22) {
   tint_array_wrapper tree = {};
   int x_356 = 0;
   int x_58_phi = 0;
@@ -24,8 +24,8 @@
   int x_353_phi = 0;
   int x_356_phi = 0;
   int x_358_phi = 0;
-  BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1};
-  tree.arr[0] = tint_symbol_3;
+  BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1};
+  tree.arr[0] = tint_symbol_2;
   switch(0u) {
     default: {
       x_58_phi = 0;
@@ -46,8 +46,8 @@
           int const x_79 = tree.arr[x_78_save].leftIndex;
           if ((x_79 == -1)) {
             tree.arr[x_78_save].leftIndex = 1;
-            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_4;
+            BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_3;
             x_86_phi = true;
             break;
           } else {
@@ -65,8 +65,8 @@
           int const x_71 = tree.arr[x_70_save].rightIndex;
           if ((x_71 == -1)) {
             tree.arr[x_70_save].rightIndex = 1;
-            BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_5;
+            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_4;
             x_86_phi = true;
             break;
           } else {
@@ -115,8 +115,8 @@
           int const x_112 = tree.arr[x_111_save].leftIndex;
           if ((x_112 == -1)) {
             tree.arr[x_111_save].leftIndex = 2;
-            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_6;
+            BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_5;
             x_119_phi = true;
             break;
           } else {
@@ -134,8 +134,8 @@
           int const x_104 = tree.arr[x_103_save].rightIndex;
           if ((x_104 == -1)) {
             tree.arr[x_103_save].rightIndex = 2;
-            BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_7;
+            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_6;
             x_119_phi = true;
             break;
           } else {
@@ -184,8 +184,8 @@
           int const x_145 = tree.arr[x_144_save].leftIndex;
           if ((x_145 == -1)) {
             tree.arr[x_144_save].leftIndex = 3;
-            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_8;
+            BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_7;
             x_152_phi = true;
             break;
           } else {
@@ -203,8 +203,8 @@
           int const x_137 = tree.arr[x_136_save].rightIndex;
           if ((x_137 == -1)) {
             tree.arr[x_136_save].rightIndex = 3;
-            BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_9;
+            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_8;
             x_152_phi = true;
             break;
           } else {
@@ -253,8 +253,8 @@
           int const x_178 = tree.arr[x_177_save].leftIndex;
           if ((x_178 == -1)) {
             tree.arr[x_177_save].leftIndex = 4;
-            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_10;
+            BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_9;
             x_185_phi = true;
             break;
           } else {
@@ -272,8 +272,8 @@
           int const x_170 = tree.arr[x_169_save].rightIndex;
           if ((x_170 == -1)) {
             tree.arr[x_169_save].rightIndex = 4;
-            BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_11;
+            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_10;
             x_185_phi = true;
             break;
           } else {
@@ -322,8 +322,8 @@
           int const x_211 = tree.arr[x_210_save].leftIndex;
           if ((x_211 == -1)) {
             tree.arr[x_210_save].leftIndex = 5;
-            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_12;
+            BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_11;
             x_218_phi = true;
             break;
           } else {
@@ -341,8 +341,8 @@
           int const x_203 = tree.arr[x_202_save].rightIndex;
           if ((x_203 == -1)) {
             tree.arr[x_202_save].rightIndex = 5;
-            BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_13;
+            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_12;
             x_218_phi = true;
             break;
           } else {
@@ -391,8 +391,8 @@
           int const x_244 = tree.arr[x_243_save].leftIndex;
           if ((x_244 == -1)) {
             tree.arr[x_243_save].leftIndex = 6;
-            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_14;
+            BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_13;
             x_251_phi = true;
             break;
           } else {
@@ -410,8 +410,8 @@
           int const x_236 = tree.arr[x_235_save].rightIndex;
           if ((x_236 == -1)) {
             tree.arr[x_235_save].rightIndex = 6;
-            BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_15;
+            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_14;
             x_251_phi = true;
             break;
           } else {
@@ -460,8 +460,8 @@
           int const x_277 = tree.arr[x_276_save].leftIndex;
           if ((x_277 == -1)) {
             tree.arr[x_276_save].leftIndex = 7;
-            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_16;
+            BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_15;
             x_284_phi = true;
             break;
           } else {
@@ -479,8 +479,8 @@
           int const x_269 = tree.arr[x_268_save].rightIndex;
           if ((x_269 == -1)) {
             tree.arr[x_268_save].rightIndex = 7;
-            BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_17;
+            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_16;
             x_284_phi = true;
             break;
           } else {
@@ -529,8 +529,8 @@
           int const x_310 = tree.arr[x_309_save].leftIndex;
           if ((x_310 == -1)) {
             tree.arr[x_309_save].leftIndex = 8;
-            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_18;
+            BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_17;
             x_317_phi = true;
             break;
           } else {
@@ -548,8 +548,8 @@
           int const x_302 = tree.arr[x_301_save].rightIndex;
           if ((x_302 == -1)) {
             tree.arr[x_301_save].rightIndex = 8;
-            BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_19;
+            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_18;
             x_317_phi = true;
             break;
           } else {
@@ -598,8 +598,8 @@
           int const x_343 = tree.arr[x_342_save].leftIndex;
           if ((x_343 == -1)) {
             tree.arr[x_342_save].leftIndex = 9;
-            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_20;
+            BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_19;
             x_350_phi = true;
             break;
           } else {
@@ -617,8 +617,8 @@
           int const x_335 = tree.arr[x_334_save].rightIndex;
           if ((x_335 == -1)) {
             tree.arr[x_334_save].rightIndex = 9;
-            BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_21;
+            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_20;
             x_350_phi = true;
             break;
           } else {
@@ -745,18 +745,24 @@
     }
   }
   if ((x_356 == as_type<int>(20))) {
-    *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_23) {
+  main_1(tint_symbol_23);
+  main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)};
+  return tint_symbol_21;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_24 = 0.0f;
-  main_1(&(tint_symbol_24));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24};
-  tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_22;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_24));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl
index 1f593e3..5f9933f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.hlsl
@@ -14,8 +14,8 @@
   int x_353_phi = 0;
   int x_356_phi = 0;
   int x_358_phi = 0;
-  const BST tint_symbol_2 = {9, -1, -1};
-  tree[0] = tint_symbol_2;
+  const BST tint_symbol_1 = {9, -1, -1};
+  tree[0] = tint_symbol_1;
   switch(0u) {
     default: {
       x_58_phi = 0;
@@ -36,8 +36,8 @@
           const int x_79 = tree[x_78_save].leftIndex;
           if ((x_79 == -1)) {
             tree[x_78_save].leftIndex = 1;
-            const BST tint_symbol_3 = {5, -1, -1};
-            tree[1] = tint_symbol_3;
+            const BST tint_symbol_2 = {5, -1, -1};
+            tree[1] = tint_symbol_2;
             x_86_phi = true;
             break;
           } else {
@@ -55,8 +55,8 @@
           const int x_71 = tree[x_70_save].rightIndex;
           if ((x_71 == -1)) {
             tree[x_70_save].rightIndex = 1;
-            const BST tint_symbol_4 = {5, -1, -1};
-            tree[1] = tint_symbol_4;
+            const BST tint_symbol_3 = {5, -1, -1};
+            tree[1] = tint_symbol_3;
             x_86_phi = true;
             break;
           } else {
@@ -104,8 +104,8 @@
           const int x_112 = tree[x_111_save].leftIndex;
           if ((x_112 == -1)) {
             tree[x_111_save].leftIndex = 2;
-            const BST tint_symbol_5 = {12, -1, -1};
-            tree[2] = tint_symbol_5;
+            const BST tint_symbol_4 = {12, -1, -1};
+            tree[2] = tint_symbol_4;
             x_119_phi = true;
             break;
           } else {
@@ -123,8 +123,8 @@
           const int x_104 = tree[x_103_save].rightIndex;
           if ((x_104 == -1)) {
             tree[x_103_save].rightIndex = 2;
-            const BST tint_symbol_6 = {12, -1, -1};
-            tree[2] = tint_symbol_6;
+            const BST tint_symbol_5 = {12, -1, -1};
+            tree[2] = tint_symbol_5;
             x_119_phi = true;
             break;
           } else {
@@ -172,8 +172,8 @@
           const int x_145 = tree[x_144_save].leftIndex;
           if ((x_145 == -1)) {
             tree[x_144_save].leftIndex = 3;
-            const BST tint_symbol_7 = {15, -1, -1};
-            tree[3] = tint_symbol_7;
+            const BST tint_symbol_6 = {15, -1, -1};
+            tree[3] = tint_symbol_6;
             x_152_phi = true;
             break;
           } else {
@@ -191,8 +191,8 @@
           const int x_137 = tree[x_136_save].rightIndex;
           if ((x_137 == -1)) {
             tree[x_136_save].rightIndex = 3;
-            const BST tint_symbol_8 = {15, -1, -1};
-            tree[3] = tint_symbol_8;
+            const BST tint_symbol_7 = {15, -1, -1};
+            tree[3] = tint_symbol_7;
             x_152_phi = true;
             break;
           } else {
@@ -240,8 +240,8 @@
           const int x_178 = tree[x_177_save].leftIndex;
           if ((x_178 == -1)) {
             tree[x_177_save].leftIndex = 4;
-            const BST tint_symbol_9 = {7, -1, -1};
-            tree[4] = tint_symbol_9;
+            const BST tint_symbol_8 = {7, -1, -1};
+            tree[4] = tint_symbol_8;
             x_185_phi = true;
             break;
           } else {
@@ -259,8 +259,8 @@
           const int x_170 = tree[x_169_save].rightIndex;
           if ((x_170 == -1)) {
             tree[x_169_save].rightIndex = 4;
-            const BST tint_symbol_10 = {7, -1, -1};
-            tree[4] = tint_symbol_10;
+            const BST tint_symbol_9 = {7, -1, -1};
+            tree[4] = tint_symbol_9;
             x_185_phi = true;
             break;
           } else {
@@ -308,8 +308,8 @@
           const int x_211 = tree[x_210_save].leftIndex;
           if ((x_211 == -1)) {
             tree[x_210_save].leftIndex = 5;
-            const BST tint_symbol_11 = {8, -1, -1};
-            tree[5] = tint_symbol_11;
+            const BST tint_symbol_10 = {8, -1, -1};
+            tree[5] = tint_symbol_10;
             x_218_phi = true;
             break;
           } else {
@@ -327,8 +327,8 @@
           const int x_203 = tree[x_202_save].rightIndex;
           if ((x_203 == -1)) {
             tree[x_202_save].rightIndex = 5;
-            const BST tint_symbol_12 = {8, -1, -1};
-            tree[5] = tint_symbol_12;
+            const BST tint_symbol_11 = {8, -1, -1};
+            tree[5] = tint_symbol_11;
             x_218_phi = true;
             break;
           } else {
@@ -376,8 +376,8 @@
           const int x_244 = tree[x_243_save].leftIndex;
           if ((x_244 == -1)) {
             tree[x_243_save].leftIndex = 6;
-            const BST tint_symbol_13 = {2, -1, -1};
-            tree[6] = tint_symbol_13;
+            const BST tint_symbol_12 = {2, -1, -1};
+            tree[6] = tint_symbol_12;
             x_251_phi = true;
             break;
           } else {
@@ -395,8 +395,8 @@
           const int x_236 = tree[x_235_save].rightIndex;
           if ((x_236 == -1)) {
             tree[x_235_save].rightIndex = 6;
-            const BST tint_symbol_14 = {2, -1, -1};
-            tree[6] = tint_symbol_14;
+            const BST tint_symbol_13 = {2, -1, -1};
+            tree[6] = tint_symbol_13;
             x_251_phi = true;
             break;
           } else {
@@ -444,8 +444,8 @@
           const int x_277 = tree[x_276_save].leftIndex;
           if ((x_277 == -1)) {
             tree[x_276_save].leftIndex = 7;
-            const BST tint_symbol_15 = {6, -1, -1};
-            tree[7] = tint_symbol_15;
+            const BST tint_symbol_14 = {6, -1, -1};
+            tree[7] = tint_symbol_14;
             x_284_phi = true;
             break;
           } else {
@@ -463,8 +463,8 @@
           const int x_269 = tree[x_268_save].rightIndex;
           if ((x_269 == -1)) {
             tree[x_268_save].rightIndex = 7;
-            const BST tint_symbol_16 = {6, -1, -1};
-            tree[7] = tint_symbol_16;
+            const BST tint_symbol_15 = {6, -1, -1};
+            tree[7] = tint_symbol_15;
             x_284_phi = true;
             break;
           } else {
@@ -512,8 +512,8 @@
           const int x_310 = tree[x_309_save].leftIndex;
           if ((x_310 == -1)) {
             tree[x_309_save].leftIndex = 8;
-            const BST tint_symbol_17 = {17, -1, -1};
-            tree[8] = tint_symbol_17;
+            const BST tint_symbol_16 = {17, -1, -1};
+            tree[8] = tint_symbol_16;
             x_317_phi = true;
             break;
           } else {
@@ -531,8 +531,8 @@
           const int x_302 = tree[x_301_save].rightIndex;
           if ((x_302 == -1)) {
             tree[x_301_save].rightIndex = 8;
-            const BST tint_symbol_18 = {17, -1, -1};
-            tree[8] = tint_symbol_18;
+            const BST tint_symbol_17 = {17, -1, -1};
+            tree[8] = tint_symbol_17;
             x_317_phi = true;
             break;
           } else {
@@ -580,8 +580,8 @@
           const int x_343 = tree[x_342_save].leftIndex;
           if ((x_343 == -1)) {
             tree[x_342_save].leftIndex = 9;
-            const BST tint_symbol_19 = {13, -1, -1};
-            tree[9] = tint_symbol_19;
+            const BST tint_symbol_18 = {13, -1, -1};
+            tree[9] = tint_symbol_18;
             x_350_phi = true;
             break;
           } else {
@@ -599,8 +599,8 @@
           const int x_335 = tree[x_334_save].rightIndex;
           if ((x_335 == -1)) {
             tree[x_334_save].rightIndex = 9;
-            const BST tint_symbol_20 = {13, -1, -1};
-            tree[9] = tint_symbol_20;
+            const BST tint_symbol_19 = {13, -1, -1};
+            tree[9] = tint_symbol_19;
             x_350_phi = true;
             break;
           } else {
@@ -740,9 +740,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_21 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_21;
+  const main_out tint_symbol_20 = {x_GLF_color};
+  return tint_symbol_20;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl
index 1f650e5..3338c66 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl
@@ -16,7 +16,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_23) {
+void main_1(thread float4* const tint_symbol_22) {
   tint_array_wrapper tree = {};
   int x_356 = 0;
   int x_58_phi = 0;
@@ -24,8 +24,8 @@
   int x_353_phi = 0;
   int x_356_phi = 0;
   int x_358_phi = 0;
-  BST const tint_symbol_3 = {.data=9, .leftIndex=-1, .rightIndex=-1};
-  tree.arr[0] = tint_symbol_3;
+  BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1};
+  tree.arr[0] = tint_symbol_2;
   switch(0u) {
     default: {
       x_58_phi = 0;
@@ -46,8 +46,8 @@
           int const x_79 = tree.arr[x_78_save].leftIndex;
           if ((x_79 == -1)) {
             tree.arr[x_78_save].leftIndex = 1;
-            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_4;
+            BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_3;
             x_86_phi = true;
             break;
           } else {
@@ -65,8 +65,8 @@
           int const x_71 = tree.arr[x_70_save].rightIndex;
           if ((x_71 == -1)) {
             tree.arr[x_70_save].rightIndex = 1;
-            BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_5;
+            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_4;
             x_86_phi = true;
             break;
           } else {
@@ -115,8 +115,8 @@
           int const x_112 = tree.arr[x_111_save].leftIndex;
           if ((x_112 == -1)) {
             tree.arr[x_111_save].leftIndex = 2;
-            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_6;
+            BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_5;
             x_119_phi = true;
             break;
           } else {
@@ -134,8 +134,8 @@
           int const x_104 = tree.arr[x_103_save].rightIndex;
           if ((x_104 == -1)) {
             tree.arr[x_103_save].rightIndex = 2;
-            BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[2] = tint_symbol_7;
+            BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[2] = tint_symbol_6;
             x_119_phi = true;
             break;
           } else {
@@ -184,8 +184,8 @@
           int const x_145 = tree.arr[x_144_save].leftIndex;
           if ((x_145 == -1)) {
             tree.arr[x_144_save].leftIndex = 3;
-            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_8;
+            BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_7;
             x_152_phi = true;
             break;
           } else {
@@ -203,8 +203,8 @@
           int const x_137 = tree.arr[x_136_save].rightIndex;
           if ((x_137 == -1)) {
             tree.arr[x_136_save].rightIndex = 3;
-            BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_9;
+            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_8;
             x_152_phi = true;
             break;
           } else {
@@ -253,8 +253,8 @@
           int const x_178 = tree.arr[x_177_save].leftIndex;
           if ((x_178 == -1)) {
             tree.arr[x_177_save].leftIndex = 4;
-            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_10;
+            BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_9;
             x_185_phi = true;
             break;
           } else {
@@ -272,8 +272,8 @@
           int const x_170 = tree.arr[x_169_save].rightIndex;
           if ((x_170 == -1)) {
             tree.arr[x_169_save].rightIndex = 4;
-            BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_11;
+            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_10;
             x_185_phi = true;
             break;
           } else {
@@ -322,8 +322,8 @@
           int const x_211 = tree.arr[x_210_save].leftIndex;
           if ((x_211 == -1)) {
             tree.arr[x_210_save].leftIndex = 5;
-            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_12;
+            BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_11;
             x_218_phi = true;
             break;
           } else {
@@ -341,8 +341,8 @@
           int const x_203 = tree.arr[x_202_save].rightIndex;
           if ((x_203 == -1)) {
             tree.arr[x_202_save].rightIndex = 5;
-            BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_13;
+            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_12;
             x_218_phi = true;
             break;
           } else {
@@ -391,8 +391,8 @@
           int const x_244 = tree.arr[x_243_save].leftIndex;
           if ((x_244 == -1)) {
             tree.arr[x_243_save].leftIndex = 6;
-            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_14;
+            BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_13;
             x_251_phi = true;
             break;
           } else {
@@ -410,8 +410,8 @@
           int const x_236 = tree.arr[x_235_save].rightIndex;
           if ((x_236 == -1)) {
             tree.arr[x_235_save].rightIndex = 6;
-            BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_15;
+            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_14;
             x_251_phi = true;
             break;
           } else {
@@ -460,8 +460,8 @@
           int const x_277 = tree.arr[x_276_save].leftIndex;
           if ((x_277 == -1)) {
             tree.arr[x_276_save].leftIndex = 7;
-            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_16;
+            BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_15;
             x_284_phi = true;
             break;
           } else {
@@ -479,8 +479,8 @@
           int const x_269 = tree.arr[x_268_save].rightIndex;
           if ((x_269 == -1)) {
             tree.arr[x_268_save].rightIndex = 7;
-            BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_17;
+            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_16;
             x_284_phi = true;
             break;
           } else {
@@ -529,8 +529,8 @@
           int const x_310 = tree.arr[x_309_save].leftIndex;
           if ((x_310 == -1)) {
             tree.arr[x_309_save].leftIndex = 8;
-            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_18;
+            BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_17;
             x_317_phi = true;
             break;
           } else {
@@ -548,8 +548,8 @@
           int const x_302 = tree.arr[x_301_save].rightIndex;
           if ((x_302 == -1)) {
             tree.arr[x_301_save].rightIndex = 8;
-            BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_19;
+            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_18;
             x_317_phi = true;
             break;
           } else {
@@ -598,8 +598,8 @@
           int const x_343 = tree.arr[x_342_save].leftIndex;
           if ((x_343 == -1)) {
             tree.arr[x_342_save].leftIndex = 9;
-            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_20;
+            BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_19;
             x_350_phi = true;
             break;
           } else {
@@ -617,8 +617,8 @@
           int const x_335 = tree.arr[x_334_save].rightIndex;
           if ((x_335 == -1)) {
             tree.arr[x_334_save].rightIndex = 9;
-            BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_21;
+            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_20;
             x_350_phi = true;
             break;
           } else {
@@ -745,18 +745,24 @@
     }
   }
   if ((x_356 == as_type<int>(20))) {
-    *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_22) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_22) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_23) {
+  main_1(tint_symbol_23);
+  main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_23)};
+  return tint_symbol_21;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_24 = 0.0f;
-  main_1(&(tint_symbol_24));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_24};
-  tint_symbol_1 const tint_symbol_22 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_22;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_24));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl
index 7b88398..9437ce7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_22, thread float4* const tint_symbol_23) {
   tint_array_wrapper tree = {};
   bool x_67 = false;
   bool x_114 = false;
@@ -31,8 +31,8 @@
   int x_569_phi = 0;
   int x_572_phi = 0;
   int x_574_phi = 0;
-  BST const tint_symbol_4 = {.data=9, .leftIndex=-1, .rightIndex=-1};
-  tree.arr[0] = tint_symbol_4;
+  BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1};
+  tree.arr[0] = tint_symbol_2;
   switch(0u) {
     default: {
       x_67_phi = false;
@@ -66,8 +66,8 @@
               return;
             }
             tree.arr[x_89_save].leftIndex = 1;
-            BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_5;
+            BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_3;
             while (true) {
               x_114_phi = x_67;
               if ((0 < int(x_97))) {
@@ -99,8 +99,8 @@
           int const x_82 = tree.arr[x_81_save].rightIndex;
           if ((x_82 == -1)) {
             tree.arr[x_81_save].rightIndex = 1;
-            BST const tint_symbol_6 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_6;
+            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_4;
             x_116_phi = true;
             break;
           } else {
@@ -139,7 +139,7 @@
     int x_120 = 0;
     bool x_134_phi = false;
     int const x_119 = x_119_phi;
-    float const x_125 = (*(tint_symbol_24)).y;
+    float const x_125 = (*(tint_symbol_22)).y;
     bool const x_126 = (x_125 < 0.0f);
     x_134_phi = x_126;
     if (!(x_126)) {
@@ -190,8 +190,8 @@
                 return;
               }
               tree.arr[x_161_save].leftIndex = 2;
-              BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-              tree.arr[2] = tint_symbol_7;
+              BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+              tree.arr[2] = tint_symbol_5;
               while (true) {
                 x_186_phi = x_139;
                 if ((0 < int(x_169))) {
@@ -223,8 +223,8 @@
             int const x_154 = tree.arr[x_153_save].rightIndex;
             if ((x_154 == -1)) {
               tree.arr[x_153_save].rightIndex = 2;
-              BST const tint_symbol_8 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-              tree.arr[2] = tint_symbol_8;
+              BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+              tree.arr[2] = tint_symbol_6;
               x_188_phi = true;
               break;
             } else {
@@ -300,8 +300,8 @@
               return;
             }
             tree.arr[x_215_save].leftIndex = 3;
-            BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_9;
+            BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_7;
             while (true) {
               x_240_phi = x_193;
               if ((0 < int(x_223))) {
@@ -333,8 +333,8 @@
           int const x_208 = tree.arr[x_207_save].rightIndex;
           if ((x_208 == -1)) {
             tree.arr[x_207_save].rightIndex = 3;
-            BST const tint_symbol_10 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_10;
+            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_8;
             x_242_phi = true;
             break;
           } else {
@@ -405,8 +405,8 @@
               return;
             }
             tree.arr[x_269_save].leftIndex = 4;
-            BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_11;
+            BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_9;
             while (true) {
               x_294_phi = x_247;
               if ((0 < int(x_277))) {
@@ -438,8 +438,8 @@
           int const x_262 = tree.arr[x_261_save].rightIndex;
           if ((x_262 == -1)) {
             tree.arr[x_261_save].rightIndex = 4;
-            BST const tint_symbol_12 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_12;
+            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_10;
             x_296_phi = true;
             break;
           } else {
@@ -510,8 +510,8 @@
               return;
             }
             tree.arr[x_323_save].leftIndex = 5;
-            BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_13;
+            BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_11;
             while (true) {
               x_348_phi = x_301;
               if ((0 < int(x_331))) {
@@ -543,8 +543,8 @@
           int const x_316 = tree.arr[x_315_save].rightIndex;
           if ((x_316 == -1)) {
             tree.arr[x_315_save].rightIndex = 5;
-            BST const tint_symbol_14 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_14;
+            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_12;
             x_350_phi = true;
             break;
           } else {
@@ -615,8 +615,8 @@
               return;
             }
             tree.arr[x_377_save].leftIndex = 6;
-            BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_15;
+            BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_13;
             while (true) {
               x_402_phi = x_355;
               if ((0 < int(x_385))) {
@@ -648,8 +648,8 @@
           int const x_370 = tree.arr[x_369_save].rightIndex;
           if ((x_370 == -1)) {
             tree.arr[x_369_save].rightIndex = 6;
-            BST const tint_symbol_16 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_16;
+            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_14;
             x_404_phi = true;
             break;
           } else {
@@ -720,8 +720,8 @@
               return;
             }
             tree.arr[x_431_save].leftIndex = 7;
-            BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_17;
+            BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_15;
             while (true) {
               x_456_phi = x_409;
               if ((0 < int(x_439))) {
@@ -753,8 +753,8 @@
           int const x_424 = tree.arr[x_423_save].rightIndex;
           if ((x_424 == -1)) {
             tree.arr[x_423_save].rightIndex = 7;
-            BST const tint_symbol_18 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_18;
+            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_16;
             x_458_phi = true;
             break;
           } else {
@@ -825,8 +825,8 @@
               return;
             }
             tree.arr[x_485_save].leftIndex = 8;
-            BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_19;
+            BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_17;
             while (true) {
               x_510_phi = x_463;
               if ((0 < int(x_493))) {
@@ -858,8 +858,8 @@
           int const x_478 = tree.arr[x_477_save].rightIndex;
           if ((x_478 == -1)) {
             tree.arr[x_477_save].rightIndex = 8;
-            BST const tint_symbol_20 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_20;
+            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_18;
             x_512_phi = true;
             break;
           } else {
@@ -930,8 +930,8 @@
               return;
             }
             tree.arr[x_539_save].leftIndex = 9;
-            BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_21;
+            BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_19;
             while (true) {
               x_564_phi = x_517;
               if ((0 < int(x_547))) {
@@ -963,8 +963,8 @@
           int const x_532 = tree.arr[x_531_save].rightIndex;
           if ((x_532 == -1)) {
             tree.arr[x_531_save].rightIndex = 9;
-            BST const tint_symbol_22 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_22;
+            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_20;
             x_566_phi = true;
             break;
           } else {
@@ -1097,20 +1097,26 @@
     }
   }
   if ((x_572 == as_type<int>(20))) {
-    *(tint_symbol_25) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_25) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) {
+  *(tint_symbol_24) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_24, tint_symbol_25);
+  main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_25)};
+  return tint_symbol_21;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_26 = 0.0f;
   thread float4 tint_symbol_27 = 0.0f;
-  tint_symbol_26 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_26), &(tint_symbol_27));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_27};
-  tint_symbol_2 const tint_symbol_23 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_23;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_26), &(tint_symbol_27));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl
index 7b88398..9437ce7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl
@@ -15,11 +15,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_22, thread float4* const tint_symbol_23) {
   tint_array_wrapper tree = {};
   bool x_67 = false;
   bool x_114 = false;
@@ -31,8 +31,8 @@
   int x_569_phi = 0;
   int x_572_phi = 0;
   int x_574_phi = 0;
-  BST const tint_symbol_4 = {.data=9, .leftIndex=-1, .rightIndex=-1};
-  tree.arr[0] = tint_symbol_4;
+  BST const tint_symbol_2 = {.data=9, .leftIndex=-1, .rightIndex=-1};
+  tree.arr[0] = tint_symbol_2;
   switch(0u) {
     default: {
       x_67_phi = false;
@@ -66,8 +66,8 @@
               return;
             }
             tree.arr[x_89_save].leftIndex = 1;
-            BST const tint_symbol_5 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_5;
+            BST const tint_symbol_3 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_3;
             while (true) {
               x_114_phi = x_67;
               if ((0 < int(x_97))) {
@@ -99,8 +99,8 @@
           int const x_82 = tree.arr[x_81_save].rightIndex;
           if ((x_82 == -1)) {
             tree.arr[x_81_save].rightIndex = 1;
-            BST const tint_symbol_6 = {.data=5, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[1] = tint_symbol_6;
+            BST const tint_symbol_4 = {.data=5, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[1] = tint_symbol_4;
             x_116_phi = true;
             break;
           } else {
@@ -139,7 +139,7 @@
     int x_120 = 0;
     bool x_134_phi = false;
     int const x_119 = x_119_phi;
-    float const x_125 = (*(tint_symbol_24)).y;
+    float const x_125 = (*(tint_symbol_22)).y;
     bool const x_126 = (x_125 < 0.0f);
     x_134_phi = x_126;
     if (!(x_126)) {
@@ -190,8 +190,8 @@
                 return;
               }
               tree.arr[x_161_save].leftIndex = 2;
-              BST const tint_symbol_7 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-              tree.arr[2] = tint_symbol_7;
+              BST const tint_symbol_5 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+              tree.arr[2] = tint_symbol_5;
               while (true) {
                 x_186_phi = x_139;
                 if ((0 < int(x_169))) {
@@ -223,8 +223,8 @@
             int const x_154 = tree.arr[x_153_save].rightIndex;
             if ((x_154 == -1)) {
               tree.arr[x_153_save].rightIndex = 2;
-              BST const tint_symbol_8 = {.data=12, .leftIndex=-1, .rightIndex=-1};
-              tree.arr[2] = tint_symbol_8;
+              BST const tint_symbol_6 = {.data=12, .leftIndex=-1, .rightIndex=-1};
+              tree.arr[2] = tint_symbol_6;
               x_188_phi = true;
               break;
             } else {
@@ -300,8 +300,8 @@
               return;
             }
             tree.arr[x_215_save].leftIndex = 3;
-            BST const tint_symbol_9 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_9;
+            BST const tint_symbol_7 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_7;
             while (true) {
               x_240_phi = x_193;
               if ((0 < int(x_223))) {
@@ -333,8 +333,8 @@
           int const x_208 = tree.arr[x_207_save].rightIndex;
           if ((x_208 == -1)) {
             tree.arr[x_207_save].rightIndex = 3;
-            BST const tint_symbol_10 = {.data=15, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[3] = tint_symbol_10;
+            BST const tint_symbol_8 = {.data=15, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[3] = tint_symbol_8;
             x_242_phi = true;
             break;
           } else {
@@ -405,8 +405,8 @@
               return;
             }
             tree.arr[x_269_save].leftIndex = 4;
-            BST const tint_symbol_11 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_11;
+            BST const tint_symbol_9 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_9;
             while (true) {
               x_294_phi = x_247;
               if ((0 < int(x_277))) {
@@ -438,8 +438,8 @@
           int const x_262 = tree.arr[x_261_save].rightIndex;
           if ((x_262 == -1)) {
             tree.arr[x_261_save].rightIndex = 4;
-            BST const tint_symbol_12 = {.data=7, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[4] = tint_symbol_12;
+            BST const tint_symbol_10 = {.data=7, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[4] = tint_symbol_10;
             x_296_phi = true;
             break;
           } else {
@@ -510,8 +510,8 @@
               return;
             }
             tree.arr[x_323_save].leftIndex = 5;
-            BST const tint_symbol_13 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_13;
+            BST const tint_symbol_11 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_11;
             while (true) {
               x_348_phi = x_301;
               if ((0 < int(x_331))) {
@@ -543,8 +543,8 @@
           int const x_316 = tree.arr[x_315_save].rightIndex;
           if ((x_316 == -1)) {
             tree.arr[x_315_save].rightIndex = 5;
-            BST const tint_symbol_14 = {.data=8, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[5] = tint_symbol_14;
+            BST const tint_symbol_12 = {.data=8, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[5] = tint_symbol_12;
             x_350_phi = true;
             break;
           } else {
@@ -615,8 +615,8 @@
               return;
             }
             tree.arr[x_377_save].leftIndex = 6;
-            BST const tint_symbol_15 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_15;
+            BST const tint_symbol_13 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_13;
             while (true) {
               x_402_phi = x_355;
               if ((0 < int(x_385))) {
@@ -648,8 +648,8 @@
           int const x_370 = tree.arr[x_369_save].rightIndex;
           if ((x_370 == -1)) {
             tree.arr[x_369_save].rightIndex = 6;
-            BST const tint_symbol_16 = {.data=2, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[6] = tint_symbol_16;
+            BST const tint_symbol_14 = {.data=2, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[6] = tint_symbol_14;
             x_404_phi = true;
             break;
           } else {
@@ -720,8 +720,8 @@
               return;
             }
             tree.arr[x_431_save].leftIndex = 7;
-            BST const tint_symbol_17 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_17;
+            BST const tint_symbol_15 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_15;
             while (true) {
               x_456_phi = x_409;
               if ((0 < int(x_439))) {
@@ -753,8 +753,8 @@
           int const x_424 = tree.arr[x_423_save].rightIndex;
           if ((x_424 == -1)) {
             tree.arr[x_423_save].rightIndex = 7;
-            BST const tint_symbol_18 = {.data=6, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[7] = tint_symbol_18;
+            BST const tint_symbol_16 = {.data=6, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[7] = tint_symbol_16;
             x_458_phi = true;
             break;
           } else {
@@ -825,8 +825,8 @@
               return;
             }
             tree.arr[x_485_save].leftIndex = 8;
-            BST const tint_symbol_19 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_19;
+            BST const tint_symbol_17 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_17;
             while (true) {
               x_510_phi = x_463;
               if ((0 < int(x_493))) {
@@ -858,8 +858,8 @@
           int const x_478 = tree.arr[x_477_save].rightIndex;
           if ((x_478 == -1)) {
             tree.arr[x_477_save].rightIndex = 8;
-            BST const tint_symbol_20 = {.data=17, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[8] = tint_symbol_20;
+            BST const tint_symbol_18 = {.data=17, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[8] = tint_symbol_18;
             x_512_phi = true;
             break;
           } else {
@@ -930,8 +930,8 @@
               return;
             }
             tree.arr[x_539_save].leftIndex = 9;
-            BST const tint_symbol_21 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_21;
+            BST const tint_symbol_19 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_19;
             while (true) {
               x_564_phi = x_517;
               if ((0 < int(x_547))) {
@@ -963,8 +963,8 @@
           int const x_532 = tree.arr[x_531_save].rightIndex;
           if ((x_532 == -1)) {
             tree.arr[x_531_save].rightIndex = 9;
-            BST const tint_symbol_22 = {.data=13, .leftIndex=-1, .rightIndex=-1};
-            tree.arr[9] = tint_symbol_22;
+            BST const tint_symbol_20 = {.data=13, .leftIndex=-1, .rightIndex=-1};
+            tree.arr[9] = tint_symbol_20;
             x_566_phi = true;
             break;
           } else {
@@ -1097,20 +1097,26 @@
     }
   }
   if ((x_572 == as_type<int>(20))) {
-    *(tint_symbol_25) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_23) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_25) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_23) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_24, thread float4* const tint_symbol_25) {
+  *(tint_symbol_24) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_24, tint_symbol_25);
+  main_out const tint_symbol_21 = {.x_GLF_color_1=*(tint_symbol_25)};
+  return tint_symbol_21;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_26 = 0.0f;
   thread float4 tint_symbol_27 = 0.0f;
-  tint_symbol_26 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_26), &(tint_symbol_27));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_27};
-  tint_symbol_2 const tint_symbol_23 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_23;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_26), &(tint_symbol_27));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl
index 0ddc6e7..70b032c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -40,49 +40,49 @@
     }
     int const x_171 = *(data_1);
     int const x_172 = baseIndex;
-    int const x_174 = (*(tint_symbol_4)).arr[x_172].data;
+    int const x_174 = (*(tint_symbol_3)).arr[x_172].data;
     if ((x_171 <= x_174)) {
       int const x_179 = baseIndex;
-      int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex;
+      int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex;
       if ((x_181 == -1)) {
         int const x_186 = baseIndex;
         int const x_187 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_186].leftIndex = x_187;
+        (*(tint_symbol_3)).arr[x_186].leftIndex = x_187;
         int const x_189 = *(treeIndex);
-        BST const x_191 = (*(tint_symbol_4)).arr[x_189];
+        BST const x_191 = (*(tint_symbol_3)).arr[x_189];
         param = x_191;
         int const x_192 = *(data_1);
         param_1 = x_192;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_194 = param;
-        (*(tint_symbol_4)).arr[x_189] = x_194;
+        (*(tint_symbol_3)).arr[x_189] = x_194;
         return;
       } else {
         int const x_196 = baseIndex;
-        int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex;
+        int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex;
         baseIndex = x_198;
         continue;
       }
       return;
     } else {
       int const x_199 = baseIndex;
-      int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex;
+      int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex;
       if ((x_201 == -1)) {
         int const x_206 = baseIndex;
         int const x_207 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_206].rightIndex = x_207;
+        (*(tint_symbol_3)).arr[x_206].rightIndex = x_207;
         int const x_209 = *(treeIndex);
-        BST const x_211 = (*(tint_symbol_4)).arr[x_209];
+        BST const x_211 = (*(tint_symbol_3)).arr[x_209];
         param_2 = x_211;
         int const x_212 = *(data_1);
         param_3 = x_212;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_214 = param_2;
-        (*(tint_symbol_4)).arr[x_209] = x_214;
+        (*(tint_symbol_3)).arr[x_209] = x_214;
         return;
       } else {
         int const x_216 = baseIndex;
-        int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex;
+        int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex;
         baseIndex = x_218;
         continue;
       }
@@ -93,7 +93,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_220 = 0;
@@ -105,7 +105,7 @@
       break;
     }
     int const x_228 = index;
-    BST const x_230 = (*(tint_symbol_5)).arr[x_228];
+    BST const x_230 = (*(tint_symbol_4)).arr[x_228];
     currentNode = x_230;
     int const x_232 = currentNode.data;
     int const x_233 = *(target);
@@ -128,7 +128,7 @@
   return -1;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -155,66 +155,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_84 = (*(tint_symbol_6)).arr[0];
+  BST const x_84 = (*(tint_symbol_5)).arr[0];
   param_4 = x_84;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_86 = param_4;
-  (*(tint_symbol_6)).arr[0] = x_86;
+  (*(tint_symbol_5)).arr[0] = x_86;
   int const x_88 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
   int const x_90 = treeIndex_1;
   param_6 = x_90;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5);
   int const x_92 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(1)));
   int const x_94 = treeIndex_1;
   param_8 = x_94;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5);
   int const x_96 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
   int const x_98 = treeIndex_1;
   param_10 = x_98;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5);
   int const x_100 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
   int const x_102 = treeIndex_1;
   param_12 = x_102;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5);
   int const x_104 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
   int const x_106 = treeIndex_1;
   param_14 = x_106;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5);
   int const x_108 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
   int const x_110 = treeIndex_1;
   param_16 = x_110;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5);
   int const x_112 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
   int const x_114 = treeIndex_1;
   param_18 = x_114;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   int const x_118 = treeIndex_1;
   param_20 = x_118;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5);
   int const x_120 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
   int const x_122 = treeIndex_1;
   param_22 = x_122;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -225,7 +225,7 @@
     }
     int const x_131 = i;
     param_24 = x_131;
-    int const x_132 = search_i1_(&(param_24), tint_symbol_6);
+    int const x_132 = search_i1_(&(param_24), tint_symbol_5);
     result = x_132;
     int const x_133 = i;
     switch(x_133) {
@@ -263,19 +263,25 @@
   }
   int const x_152 = count;
   if ((x_152 == 20)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread tint_array_wrapper tint_symbol_8 = {};
-  thread float4 tint_symbol_9 = 0.0f;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_9 = {};
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl
index 0ddc6e7..70b032c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -40,49 +40,49 @@
     }
     int const x_171 = *(data_1);
     int const x_172 = baseIndex;
-    int const x_174 = (*(tint_symbol_4)).arr[x_172].data;
+    int const x_174 = (*(tint_symbol_3)).arr[x_172].data;
     if ((x_171 <= x_174)) {
       int const x_179 = baseIndex;
-      int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex;
+      int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex;
       if ((x_181 == -1)) {
         int const x_186 = baseIndex;
         int const x_187 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_186].leftIndex = x_187;
+        (*(tint_symbol_3)).arr[x_186].leftIndex = x_187;
         int const x_189 = *(treeIndex);
-        BST const x_191 = (*(tint_symbol_4)).arr[x_189];
+        BST const x_191 = (*(tint_symbol_3)).arr[x_189];
         param = x_191;
         int const x_192 = *(data_1);
         param_1 = x_192;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_194 = param;
-        (*(tint_symbol_4)).arr[x_189] = x_194;
+        (*(tint_symbol_3)).arr[x_189] = x_194;
         return;
       } else {
         int const x_196 = baseIndex;
-        int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex;
+        int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex;
         baseIndex = x_198;
         continue;
       }
       return;
     } else {
       int const x_199 = baseIndex;
-      int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex;
+      int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex;
       if ((x_201 == -1)) {
         int const x_206 = baseIndex;
         int const x_207 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_206].rightIndex = x_207;
+        (*(tint_symbol_3)).arr[x_206].rightIndex = x_207;
         int const x_209 = *(treeIndex);
-        BST const x_211 = (*(tint_symbol_4)).arr[x_209];
+        BST const x_211 = (*(tint_symbol_3)).arr[x_209];
         param_2 = x_211;
         int const x_212 = *(data_1);
         param_3 = x_212;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_214 = param_2;
-        (*(tint_symbol_4)).arr[x_209] = x_214;
+        (*(tint_symbol_3)).arr[x_209] = x_214;
         return;
       } else {
         int const x_216 = baseIndex;
-        int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex;
+        int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex;
         baseIndex = x_218;
         continue;
       }
@@ -93,7 +93,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_220 = 0;
@@ -105,7 +105,7 @@
       break;
     }
     int const x_228 = index;
-    BST const x_230 = (*(tint_symbol_5)).arr[x_228];
+    BST const x_230 = (*(tint_symbol_4)).arr[x_228];
     currentNode = x_230;
     int const x_232 = currentNode.data;
     int const x_233 = *(target);
@@ -128,7 +128,7 @@
   return -1;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -155,66 +155,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_84 = (*(tint_symbol_6)).arr[0];
+  BST const x_84 = (*(tint_symbol_5)).arr[0];
   param_4 = x_84;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_86 = param_4;
-  (*(tint_symbol_6)).arr[0] = x_86;
+  (*(tint_symbol_5)).arr[0] = x_86;
   int const x_88 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
   int const x_90 = treeIndex_1;
   param_6 = x_90;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5);
   int const x_92 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(1)));
   int const x_94 = treeIndex_1;
   param_8 = x_94;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5);
   int const x_96 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
   int const x_98 = treeIndex_1;
   param_10 = x_98;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5);
   int const x_100 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
   int const x_102 = treeIndex_1;
   param_12 = x_102;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5);
   int const x_104 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
   int const x_106 = treeIndex_1;
   param_14 = x_106;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5);
   int const x_108 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
   int const x_110 = treeIndex_1;
   param_16 = x_110;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5);
   int const x_112 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
   int const x_114 = treeIndex_1;
   param_18 = x_114;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   int const x_118 = treeIndex_1;
   param_20 = x_118;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5);
   int const x_120 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
   int const x_122 = treeIndex_1;
   param_22 = x_122;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -225,7 +225,7 @@
     }
     int const x_131 = i;
     param_24 = x_131;
-    int const x_132 = search_i1_(&(param_24), tint_symbol_6);
+    int const x_132 = search_i1_(&(param_24), tint_symbol_5);
     result = x_132;
     int const x_133 = i;
     switch(x_133) {
@@ -263,19 +263,25 @@
   }
   int const x_152 = count;
   if ((x_152 == 20)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread tint_array_wrapper tint_symbol_8 = {};
-  thread float4 tint_symbol_9 = 0.0f;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_9 = {};
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl
index 8a78d71..2597e37 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl
@@ -12,7 +12,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -24,7 +24,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_5) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -40,49 +40,49 @@
     }
     int const x_182 = *(data_1);
     int const x_183 = baseIndex;
-    int const x_185 = (*(tint_symbol_5)).arr[x_183].data;
+    int const x_185 = (*(tint_symbol_3)).arr[x_183].data;
     if ((x_182 <= x_185)) {
       int const x_190 = baseIndex;
-      int const x_192 = (*(tint_symbol_5)).arr[x_190].leftIndex;
+      int const x_192 = (*(tint_symbol_3)).arr[x_190].leftIndex;
       if ((x_192 == -1)) {
         int const x_197 = baseIndex;
         int const x_198 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_197].leftIndex = x_198;
+        (*(tint_symbol_3)).arr[x_197].leftIndex = x_198;
         int const x_200 = *(treeIndex);
-        BST const x_202 = (*(tint_symbol_5)).arr[x_200];
+        BST const x_202 = (*(tint_symbol_3)).arr[x_200];
         param = x_202;
         int const x_203 = *(data_1);
         param_1 = x_203;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_205 = param;
-        (*(tint_symbol_5)).arr[x_200] = x_205;
+        (*(tint_symbol_3)).arr[x_200] = x_205;
         return;
       } else {
         int const x_207 = baseIndex;
-        int const x_209 = (*(tint_symbol_5)).arr[x_207].leftIndex;
+        int const x_209 = (*(tint_symbol_3)).arr[x_207].leftIndex;
         baseIndex = x_209;
         continue;
       }
       return;
     } else {
       int const x_210 = baseIndex;
-      int const x_212 = (*(tint_symbol_5)).arr[x_210].rightIndex;
+      int const x_212 = (*(tint_symbol_3)).arr[x_210].rightIndex;
       if ((x_212 == -1)) {
         int const x_217 = baseIndex;
         int const x_218 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_217].rightIndex = x_218;
+        (*(tint_symbol_3)).arr[x_217].rightIndex = x_218;
         int const x_220 = *(treeIndex);
-        BST const x_222 = (*(tint_symbol_5)).arr[x_220];
+        BST const x_222 = (*(tint_symbol_3)).arr[x_220];
         param_2 = x_222;
         int const x_223 = *(data_1);
         param_3 = x_223;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_225 = param_2;
-        (*(tint_symbol_5)).arr[x_220] = x_225;
+        (*(tint_symbol_3)).arr[x_220] = x_225;
         return;
       } else {
         int const x_227 = baseIndex;
-        int const x_229 = (*(tint_symbol_5)).arr[x_227].rightIndex;
+        int const x_229 = (*(tint_symbol_3)).arr[x_227].rightIndex;
         baseIndex = x_229;
         continue;
       }
@@ -93,7 +93,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_6) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_231 = 0;
@@ -105,7 +105,7 @@
       break;
     }
     int const x_239 = index;
-    BST const x_241 = (*(tint_symbol_6)).arr[x_239];
+    BST const x_241 = (*(tint_symbol_4)).arr[x_239];
     currentNode = x_241;
     int const x_243 = currentNode.data;
     int const x_244 = *(target);
@@ -128,7 +128,7 @@
   return -1;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -155,66 +155,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_88 = (*(tint_symbol_7)).arr[0];
+  BST const x_88 = (*(tint_symbol_5)).arr[0];
   param_4 = x_88;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_90 = param_4;
-  (*(tint_symbol_7)).arr[0] = x_90;
+  (*(tint_symbol_5)).arr[0] = x_90;
   int const x_92 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(1)));
   int const x_94 = treeIndex_1;
   param_6 = x_94;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5);
   int const x_96 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
   int const x_98 = treeIndex_1;
   param_8 = x_98;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5);
   int const x_100 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
   int const x_102 = treeIndex_1;
   param_10 = x_102;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5);
   int const x_104 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
   int const x_106 = treeIndex_1;
   param_12 = x_106;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5);
   int const x_108 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
   int const x_110 = treeIndex_1;
   param_14 = x_110;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5);
   int const x_112 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
   int const x_114 = treeIndex_1;
   param_16 = x_114;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   int const x_118 = treeIndex_1;
   param_18 = x_118;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5);
   int const x_120 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
   int const x_122 = treeIndex_1;
   param_20 = x_122;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5);
   int const x_124 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
   int const x_126 = treeIndex_1;
   param_22 = x_126;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -227,7 +227,7 @@
     bool x_156_phi = false;
     int const x_135 = i;
     param_24 = x_135;
-    int const x_136 = search_i1_(&(param_24), tint_symbol_7);
+    int const x_136 = search_i1_(&(param_24), tint_symbol_5);
     result = x_136;
     int const x_137 = i;
     switch(x_137) {
@@ -246,7 +246,7 @@
         bool const x_149 = (x_147 == x_148);
         x_156_phi = x_149;
         if (!(x_149)) {
-          float const x_154 = (*(tint_symbol_8)).x;
+          float const x_154 = (*(tint_symbol_6)).x;
           x_155 = (x_154 < 0.0f);
           x_156_phi = x_155;
         }
@@ -273,21 +273,27 @@
   }
   int const x_163 = count;
   if ((x_163 == 20)) {
-    *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_10 = 0.0f;
-  thread tint_array_wrapper tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(&(tint_symbol_11), &(tint_symbol_10), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(tint_symbol_9, tint_symbol_8, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl
index 8a78d71..2597e37 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl
@@ -12,7 +12,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -24,7 +24,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_5) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -40,49 +40,49 @@
     }
     int const x_182 = *(data_1);
     int const x_183 = baseIndex;
-    int const x_185 = (*(tint_symbol_5)).arr[x_183].data;
+    int const x_185 = (*(tint_symbol_3)).arr[x_183].data;
     if ((x_182 <= x_185)) {
       int const x_190 = baseIndex;
-      int const x_192 = (*(tint_symbol_5)).arr[x_190].leftIndex;
+      int const x_192 = (*(tint_symbol_3)).arr[x_190].leftIndex;
       if ((x_192 == -1)) {
         int const x_197 = baseIndex;
         int const x_198 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_197].leftIndex = x_198;
+        (*(tint_symbol_3)).arr[x_197].leftIndex = x_198;
         int const x_200 = *(treeIndex);
-        BST const x_202 = (*(tint_symbol_5)).arr[x_200];
+        BST const x_202 = (*(tint_symbol_3)).arr[x_200];
         param = x_202;
         int const x_203 = *(data_1);
         param_1 = x_203;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_205 = param;
-        (*(tint_symbol_5)).arr[x_200] = x_205;
+        (*(tint_symbol_3)).arr[x_200] = x_205;
         return;
       } else {
         int const x_207 = baseIndex;
-        int const x_209 = (*(tint_symbol_5)).arr[x_207].leftIndex;
+        int const x_209 = (*(tint_symbol_3)).arr[x_207].leftIndex;
         baseIndex = x_209;
         continue;
       }
       return;
     } else {
       int const x_210 = baseIndex;
-      int const x_212 = (*(tint_symbol_5)).arr[x_210].rightIndex;
+      int const x_212 = (*(tint_symbol_3)).arr[x_210].rightIndex;
       if ((x_212 == -1)) {
         int const x_217 = baseIndex;
         int const x_218 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_217].rightIndex = x_218;
+        (*(tint_symbol_3)).arr[x_217].rightIndex = x_218;
         int const x_220 = *(treeIndex);
-        BST const x_222 = (*(tint_symbol_5)).arr[x_220];
+        BST const x_222 = (*(tint_symbol_3)).arr[x_220];
         param_2 = x_222;
         int const x_223 = *(data_1);
         param_3 = x_223;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_225 = param_2;
-        (*(tint_symbol_5)).arr[x_220] = x_225;
+        (*(tint_symbol_3)).arr[x_220] = x_225;
         return;
       } else {
         int const x_227 = baseIndex;
-        int const x_229 = (*(tint_symbol_5)).arr[x_227].rightIndex;
+        int const x_229 = (*(tint_symbol_3)).arr[x_227].rightIndex;
         baseIndex = x_229;
         continue;
       }
@@ -93,7 +93,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_6) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_231 = 0;
@@ -105,7 +105,7 @@
       break;
     }
     int const x_239 = index;
-    BST const x_241 = (*(tint_symbol_6)).arr[x_239];
+    BST const x_241 = (*(tint_symbol_4)).arr[x_239];
     currentNode = x_241;
     int const x_243 = currentNode.data;
     int const x_244 = *(target);
@@ -128,7 +128,7 @@
   return -1;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -155,66 +155,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_88 = (*(tint_symbol_7)).arr[0];
+  BST const x_88 = (*(tint_symbol_5)).arr[0];
   param_4 = x_88;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_90 = param_4;
-  (*(tint_symbol_7)).arr[0] = x_90;
+  (*(tint_symbol_5)).arr[0] = x_90;
   int const x_92 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(1)));
   int const x_94 = treeIndex_1;
   param_6 = x_94;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5);
   int const x_96 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
   int const x_98 = treeIndex_1;
   param_8 = x_98;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5);
   int const x_100 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
   int const x_102 = treeIndex_1;
   param_10 = x_102;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5);
   int const x_104 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
   int const x_106 = treeIndex_1;
   param_12 = x_106;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5);
   int const x_108 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
   int const x_110 = treeIndex_1;
   param_14 = x_110;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5);
   int const x_112 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
   int const x_114 = treeIndex_1;
   param_16 = x_114;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   int const x_118 = treeIndex_1;
   param_18 = x_118;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5);
   int const x_120 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
   int const x_122 = treeIndex_1;
   param_20 = x_122;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5);
   int const x_124 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
   int const x_126 = treeIndex_1;
   param_22 = x_126;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -227,7 +227,7 @@
     bool x_156_phi = false;
     int const x_135 = i;
     param_24 = x_135;
-    int const x_136 = search_i1_(&(param_24), tint_symbol_7);
+    int const x_136 = search_i1_(&(param_24), tint_symbol_5);
     result = x_136;
     int const x_137 = i;
     switch(x_137) {
@@ -246,7 +246,7 @@
         bool const x_149 = (x_147 == x_148);
         x_156_phi = x_149;
         if (!(x_149)) {
-          float const x_154 = (*(tint_symbol_8)).x;
+          float const x_154 = (*(tint_symbol_6)).x;
           x_155 = (x_154 < 0.0f);
           x_156_phi = x_155;
         }
@@ -273,21 +273,27 @@
   }
   int const x_163 = count;
   if ((x_163 == 20)) {
-    *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_10 = 0.0f;
-  thread tint_array_wrapper tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  tint_symbol_10 = gl_FragCoord_param;
-  main_1(&(tint_symbol_11), &(tint_symbol_10), &(tint_symbol_12));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = gl_FragCoord_param;
+  main_1(tint_symbol_9, tint_symbol_8, tint_symbol_10);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+  thread float4 tint_symbol_11 = 0.0f;
+  thread tint_array_wrapper tint_symbol_12 = {};
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl
index 11cdc01..249e7a6 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.hlsl
@@ -247,9 +247,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl
index 30f0bea..76e4639 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl
@@ -27,7 +27,7 @@
   return;
 }
 
-void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) {
+void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -44,25 +44,25 @@
     }
     int const x_179 = *(data_1);
     int const x_180 = baseIndex;
-    int const x_182 = (*(tint_symbol_4)).arr[x_180].data;
+    int const x_182 = (*(tint_symbol_3)).arr[x_180].data;
     if ((x_179 <= x_182)) {
       int const x_187 = baseIndex;
-      int const x_189 = (*(tint_symbol_4)).arr[x_187].leftIndex;
+      int const x_189 = (*(tint_symbol_3)).arr[x_187].leftIndex;
       if ((x_189 == -1)) {
         int const x_194 = baseIndex;
         int const x_195 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_194].leftIndex = x_195;
+        (*(tint_symbol_3)).arr[x_194].leftIndex = x_195;
         float const x_198 = x_16.injectionSwitch.x;
         float const x_200 = x_16.injectionSwitch.y;
         if ((x_198 < x_200)) {
           int const x_204 = *(treeIndex);
-          BST const x_206 = (*(tint_symbol_4)).arr[x_204];
+          BST const x_206 = (*(tint_symbol_3)).arr[x_204];
           param = x_206;
           int const x_207 = *(data_1);
           param_1 = x_207;
           makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
           BST const x_209 = param;
-          (*(tint_symbol_4)).arr[x_204] = x_209;
+          (*(tint_symbol_3)).arr[x_204] = x_209;
         }
         float const x_212 = x_16.injectionSwitch.x;
         float const x_214 = x_16.injectionSwitch.y;
@@ -71,7 +71,7 @@
         }
       } else {
         int const x_218 = baseIndex;
-        int const x_220 = (*(tint_symbol_4)).arr[x_218].leftIndex;
+        int const x_220 = (*(tint_symbol_3)).arr[x_218].leftIndex;
         baseIndex = x_220;
         continue;
       }
@@ -80,30 +80,30 @@
       float const x_224 = x_16.injectionSwitch.y;
       if ((x_222 < x_224)) {
         int const x_229 = baseIndex;
-        int const x_231 = (*(tint_symbol_4)).arr[x_229].rightIndex;
+        int const x_231 = (*(tint_symbol_3)).arr[x_229].rightIndex;
         x_170 = x_231;
       } else {
         int const x_232 = baseIndex;
-        int const x_234 = (*(tint_symbol_4)).arr[x_232].rightIndex;
+        int const x_234 = (*(tint_symbol_3)).arr[x_232].rightIndex;
         x_170 = x_234;
       }
       int const x_235 = x_170;
       if ((x_235 == -1)) {
         int const x_240 = baseIndex;
         int const x_241 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_240].rightIndex = x_241;
+        (*(tint_symbol_3)).arr[x_240].rightIndex = x_241;
         int const x_243 = *(treeIndex);
-        BST const x_245 = (*(tint_symbol_4)).arr[x_243];
+        BST const x_245 = (*(tint_symbol_3)).arr[x_243];
         param_2 = x_245;
         int const x_246 = *(data_1);
         param_3 = x_246;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_248 = param_2;
-        (*(tint_symbol_4)).arr[x_243] = x_248;
+        (*(tint_symbol_3)).arr[x_243] = x_248;
         return;
       } else {
         int const x_250 = baseIndex;
-        int const x_252 = (*(tint_symbol_4)).arr[x_250].rightIndex;
+        int const x_252 = (*(tint_symbol_3)).arr[x_250].rightIndex;
         baseIndex = x_252;
         continue;
       }
@@ -118,7 +118,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_261 = 0;
@@ -130,7 +130,7 @@
       break;
     }
     int const x_269 = index;
-    BST const x_271 = (*(tint_symbol_5)).arr[x_269];
+    BST const x_271 = (*(tint_symbol_4)).arr[x_269];
     currentNode = x_271;
     int const x_273 = currentNode.data;
     int const x_274 = *(target);
@@ -153,7 +153,7 @@
   return -1;
 }
 
-void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -180,66 +180,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_91 = (*(tint_symbol_6)).arr[0];
+  BST const x_91 = (*(tint_symbol_5)).arr[0];
   param_4 = x_91;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_93 = param_4;
-  (*(tint_symbol_6)).arr[0] = x_93;
+  (*(tint_symbol_5)).arr[0] = x_93;
   int const x_95 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_95) + as_type<uint>(1)));
   int const x_97 = treeIndex_1;
   param_6 = x_97;
   param_7 = 5;
-  insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_5);
   int const x_99 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_99) + as_type<uint>(1)));
   int const x_101 = treeIndex_1;
   param_8 = x_101;
   param_9 = 12;
-  insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_5);
   int const x_103 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
   int const x_105 = treeIndex_1;
   param_10 = x_105;
   param_11 = 15;
-  insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_5);
   int const x_107 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_107) + as_type<uint>(1)));
   int const x_109 = treeIndex_1;
   param_12 = x_109;
   param_13 = 7;
-  insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_5);
   int const x_111 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_111) + as_type<uint>(1)));
   int const x_113 = treeIndex_1;
   param_14 = x_113;
   param_15 = 8;
-  insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_5);
   int const x_115 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(1)));
   int const x_117 = treeIndex_1;
   param_16 = x_117;
   param_17 = 2;
-  insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_5);
   int const x_119 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(1)));
   int const x_121 = treeIndex_1;
   param_18 = x_121;
   param_19 = 6;
-  insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_5);
   int const x_123 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
   int const x_125 = treeIndex_1;
   param_20 = x_125;
   param_21 = 17;
-  insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_5);
   int const x_127 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
   int const x_129 = treeIndex_1;
   param_22 = x_129;
   param_23 = 13;
-  insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -250,7 +250,7 @@
     }
     int const x_138 = i;
     param_24 = x_138;
-    int const x_139 = search_i1_(&(param_24), tint_symbol_6);
+    int const x_139 = search_i1_(&(param_24), tint_symbol_5);
     result = x_139;
     int const x_140 = i;
     switch(x_140) {
@@ -288,19 +288,25 @@
   }
   int const x_159 = count;
   if ((x_159 == 20)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  main_1(x_16, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_16 [[buffer(0)]]) {
-  thread tint_array_wrapper tint_symbol_8 = {};
-  thread float4 tint_symbol_9 = 0.0f;
-  main_1(x_16, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_9 = {};
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_16, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl
index 11cdc01..249e7a6 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.hlsl
@@ -247,9 +247,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl
index 30f0bea..76e4639 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl
@@ -27,7 +27,7 @@
   return;
 }
 
-void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) {
+void insert_i1_i1_(constant buf0& x_16, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -44,25 +44,25 @@
     }
     int const x_179 = *(data_1);
     int const x_180 = baseIndex;
-    int const x_182 = (*(tint_symbol_4)).arr[x_180].data;
+    int const x_182 = (*(tint_symbol_3)).arr[x_180].data;
     if ((x_179 <= x_182)) {
       int const x_187 = baseIndex;
-      int const x_189 = (*(tint_symbol_4)).arr[x_187].leftIndex;
+      int const x_189 = (*(tint_symbol_3)).arr[x_187].leftIndex;
       if ((x_189 == -1)) {
         int const x_194 = baseIndex;
         int const x_195 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_194].leftIndex = x_195;
+        (*(tint_symbol_3)).arr[x_194].leftIndex = x_195;
         float const x_198 = x_16.injectionSwitch.x;
         float const x_200 = x_16.injectionSwitch.y;
         if ((x_198 < x_200)) {
           int const x_204 = *(treeIndex);
-          BST const x_206 = (*(tint_symbol_4)).arr[x_204];
+          BST const x_206 = (*(tint_symbol_3)).arr[x_204];
           param = x_206;
           int const x_207 = *(data_1);
           param_1 = x_207;
           makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
           BST const x_209 = param;
-          (*(tint_symbol_4)).arr[x_204] = x_209;
+          (*(tint_symbol_3)).arr[x_204] = x_209;
         }
         float const x_212 = x_16.injectionSwitch.x;
         float const x_214 = x_16.injectionSwitch.y;
@@ -71,7 +71,7 @@
         }
       } else {
         int const x_218 = baseIndex;
-        int const x_220 = (*(tint_symbol_4)).arr[x_218].leftIndex;
+        int const x_220 = (*(tint_symbol_3)).arr[x_218].leftIndex;
         baseIndex = x_220;
         continue;
       }
@@ -80,30 +80,30 @@
       float const x_224 = x_16.injectionSwitch.y;
       if ((x_222 < x_224)) {
         int const x_229 = baseIndex;
-        int const x_231 = (*(tint_symbol_4)).arr[x_229].rightIndex;
+        int const x_231 = (*(tint_symbol_3)).arr[x_229].rightIndex;
         x_170 = x_231;
       } else {
         int const x_232 = baseIndex;
-        int const x_234 = (*(tint_symbol_4)).arr[x_232].rightIndex;
+        int const x_234 = (*(tint_symbol_3)).arr[x_232].rightIndex;
         x_170 = x_234;
       }
       int const x_235 = x_170;
       if ((x_235 == -1)) {
         int const x_240 = baseIndex;
         int const x_241 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_240].rightIndex = x_241;
+        (*(tint_symbol_3)).arr[x_240].rightIndex = x_241;
         int const x_243 = *(treeIndex);
-        BST const x_245 = (*(tint_symbol_4)).arr[x_243];
+        BST const x_245 = (*(tint_symbol_3)).arr[x_243];
         param_2 = x_245;
         int const x_246 = *(data_1);
         param_3 = x_246;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_248 = param_2;
-        (*(tint_symbol_4)).arr[x_243] = x_248;
+        (*(tint_symbol_3)).arr[x_243] = x_248;
         return;
       } else {
         int const x_250 = baseIndex;
-        int const x_252 = (*(tint_symbol_4)).arr[x_250].rightIndex;
+        int const x_252 = (*(tint_symbol_3)).arr[x_250].rightIndex;
         baseIndex = x_252;
         continue;
       }
@@ -118,7 +118,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_261 = 0;
@@ -130,7 +130,7 @@
       break;
     }
     int const x_269 = index;
-    BST const x_271 = (*(tint_symbol_5)).arr[x_269];
+    BST const x_271 = (*(tint_symbol_4)).arr[x_269];
     currentNode = x_271;
     int const x_273 = currentNode.data;
     int const x_274 = *(target);
@@ -153,7 +153,7 @@
   return -1;
 }
 
-void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -180,66 +180,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_91 = (*(tint_symbol_6)).arr[0];
+  BST const x_91 = (*(tint_symbol_5)).arr[0];
   param_4 = x_91;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_93 = param_4;
-  (*(tint_symbol_6)).arr[0] = x_93;
+  (*(tint_symbol_5)).arr[0] = x_93;
   int const x_95 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_95) + as_type<uint>(1)));
   int const x_97 = treeIndex_1;
   param_6 = x_97;
   param_7 = 5;
-  insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_5);
   int const x_99 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_99) + as_type<uint>(1)));
   int const x_101 = treeIndex_1;
   param_8 = x_101;
   param_9 = 12;
-  insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_5);
   int const x_103 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
   int const x_105 = treeIndex_1;
   param_10 = x_105;
   param_11 = 15;
-  insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_5);
   int const x_107 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_107) + as_type<uint>(1)));
   int const x_109 = treeIndex_1;
   param_12 = x_109;
   param_13 = 7;
-  insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_5);
   int const x_111 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_111) + as_type<uint>(1)));
   int const x_113 = treeIndex_1;
   param_14 = x_113;
   param_15 = 8;
-  insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_5);
   int const x_115 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(1)));
   int const x_117 = treeIndex_1;
   param_16 = x_117;
   param_17 = 2;
-  insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_5);
   int const x_119 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(1)));
   int const x_121 = treeIndex_1;
   param_18 = x_121;
   param_19 = 6;
-  insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_5);
   int const x_123 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
   int const x_125 = treeIndex_1;
   param_20 = x_125;
   param_21 = 17;
-  insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_5);
   int const x_127 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
   int const x_129 = treeIndex_1;
   param_22 = x_129;
   param_23 = 13;
-  insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_6);
+  insert_i1_i1_(x_16, &(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -250,7 +250,7 @@
     }
     int const x_138 = i;
     param_24 = x_138;
-    int const x_139 = search_i1_(&(param_24), tint_symbol_6);
+    int const x_139 = search_i1_(&(param_24), tint_symbol_5);
     result = x_139;
     int const x_140 = i;
     switch(x_140) {
@@ -288,19 +288,25 @@
   }
   int const x_159 = count;
   if ((x_159 == 20)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  main_1(x_16, tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_16 [[buffer(0)]]) {
-  thread tint_array_wrapper tint_symbol_8 = {};
-  thread float4 tint_symbol_9 = 0.0f;
-  main_1(x_16, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_9 = {};
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_16, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl
index 3679d60..58102cc 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -40,49 +40,49 @@
     }
     int const x_171 = *(data_1);
     int const x_172 = baseIndex;
-    int const x_174 = (*(tint_symbol_4)).arr[x_172].data;
+    int const x_174 = (*(tint_symbol_3)).arr[x_172].data;
     if ((x_171 <= x_174)) {
       int const x_179 = baseIndex;
-      int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex;
+      int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex;
       if ((x_181 == -1)) {
         int const x_186 = baseIndex;
         int const x_187 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_186].leftIndex = x_187;
+        (*(tint_symbol_3)).arr[x_186].leftIndex = x_187;
         int const x_189 = *(treeIndex);
-        BST const x_191 = (*(tint_symbol_4)).arr[x_189];
+        BST const x_191 = (*(tint_symbol_3)).arr[x_189];
         param = x_191;
         int const x_192 = *(data_1);
         param_1 = x_192;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_194 = param;
-        (*(tint_symbol_4)).arr[x_189] = x_194;
+        (*(tint_symbol_3)).arr[x_189] = x_194;
         return;
       } else {
         int const x_196 = baseIndex;
-        int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex;
+        int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex;
         baseIndex = x_198;
         continue;
       }
       return;
     } else {
       int const x_199 = baseIndex;
-      int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex;
+      int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex;
       if ((x_201 == -1)) {
         int const x_206 = baseIndex;
         int const x_207 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_206].rightIndex = x_207;
+        (*(tint_symbol_3)).arr[x_206].rightIndex = x_207;
         int const x_209 = *(treeIndex);
-        BST const x_211 = (*(tint_symbol_4)).arr[x_209];
+        BST const x_211 = (*(tint_symbol_3)).arr[x_209];
         param_2 = x_211;
         int const x_212 = *(data_1);
         param_3 = x_212;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_214 = param_2;
-        (*(tint_symbol_4)).arr[x_209] = x_214;
+        (*(tint_symbol_3)).arr[x_209] = x_214;
         return;
       } else {
         int const x_216 = baseIndex;
-        int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex;
+        int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex;
         baseIndex = x_218;
         continue;
       }
@@ -93,7 +93,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_220 = 0;
@@ -105,7 +105,7 @@
       break;
     }
     int const x_228 = index;
-    BST const x_230 = (*(tint_symbol_5)).arr[x_228];
+    BST const x_230 = (*(tint_symbol_4)).arr[x_228];
     currentNode = x_230;
     int const x_232 = currentNode.data;
     int const x_233 = *(target);
@@ -128,7 +128,7 @@
   return -1;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -155,66 +155,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_84 = (*(tint_symbol_6)).arr[0];
+  BST const x_84 = (*(tint_symbol_5)).arr[0];
   param_4 = x_84;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_86 = param_4;
-  (*(tint_symbol_6)).arr[0] = x_86;
+  (*(tint_symbol_5)).arr[0] = x_86;
   int const x_88 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
   int const x_90 = treeIndex_1;
   param_6 = x_90;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5);
   int const x_92 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(1)));
   int const x_94 = treeIndex_1;
   param_8 = x_94;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5);
   int const x_96 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
   int const x_98 = treeIndex_1;
   param_10 = x_98;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5);
   int const x_100 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
   int const x_102 = treeIndex_1;
   param_12 = x_102;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5);
   int const x_104 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
   int const x_106 = treeIndex_1;
   param_14 = x_106;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5);
   int const x_108 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
   int const x_110 = treeIndex_1;
   param_16 = x_110;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5);
   int const x_112 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
   int const x_114 = treeIndex_1;
   param_18 = x_114;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   int const x_118 = treeIndex_1;
   param_20 = x_118;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5);
   int const x_120 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
   int const x_122 = treeIndex_1;
   param_22 = x_122;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -225,7 +225,7 @@
     }
     int const x_131 = i;
     param_24 = x_131;
-    int const x_132 = search_i1_(&(param_24), tint_symbol_6);
+    int const x_132 = search_i1_(&(param_24), tint_symbol_5);
     result = x_132;
     int const x_133 = i;
     switch(x_133) {
@@ -263,19 +263,25 @@
   }
   int const x_152 = count;
   if ((x_152 == 20)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread tint_array_wrapper tint_symbol_8 = {};
-  thread float4 tint_symbol_9 = 0.0f;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_9 = {};
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl
index 3679d60..58102cc 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_4) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -40,49 +40,49 @@
     }
     int const x_171 = *(data_1);
     int const x_172 = baseIndex;
-    int const x_174 = (*(tint_symbol_4)).arr[x_172].data;
+    int const x_174 = (*(tint_symbol_3)).arr[x_172].data;
     if ((x_171 <= x_174)) {
       int const x_179 = baseIndex;
-      int const x_181 = (*(tint_symbol_4)).arr[x_179].leftIndex;
+      int const x_181 = (*(tint_symbol_3)).arr[x_179].leftIndex;
       if ((x_181 == -1)) {
         int const x_186 = baseIndex;
         int const x_187 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_186].leftIndex = x_187;
+        (*(tint_symbol_3)).arr[x_186].leftIndex = x_187;
         int const x_189 = *(treeIndex);
-        BST const x_191 = (*(tint_symbol_4)).arr[x_189];
+        BST const x_191 = (*(tint_symbol_3)).arr[x_189];
         param = x_191;
         int const x_192 = *(data_1);
         param_1 = x_192;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_194 = param;
-        (*(tint_symbol_4)).arr[x_189] = x_194;
+        (*(tint_symbol_3)).arr[x_189] = x_194;
         return;
       } else {
         int const x_196 = baseIndex;
-        int const x_198 = (*(tint_symbol_4)).arr[x_196].leftIndex;
+        int const x_198 = (*(tint_symbol_3)).arr[x_196].leftIndex;
         baseIndex = x_198;
         continue;
       }
       return;
     } else {
       int const x_199 = baseIndex;
-      int const x_201 = (*(tint_symbol_4)).arr[x_199].rightIndex;
+      int const x_201 = (*(tint_symbol_3)).arr[x_199].rightIndex;
       if ((x_201 == -1)) {
         int const x_206 = baseIndex;
         int const x_207 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_206].rightIndex = x_207;
+        (*(tint_symbol_3)).arr[x_206].rightIndex = x_207;
         int const x_209 = *(treeIndex);
-        BST const x_211 = (*(tint_symbol_4)).arr[x_209];
+        BST const x_211 = (*(tint_symbol_3)).arr[x_209];
         param_2 = x_211;
         int const x_212 = *(data_1);
         param_3 = x_212;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_214 = param_2;
-        (*(tint_symbol_4)).arr[x_209] = x_214;
+        (*(tint_symbol_3)).arr[x_209] = x_214;
         return;
       } else {
         int const x_216 = baseIndex;
-        int const x_218 = (*(tint_symbol_4)).arr[x_216].rightIndex;
+        int const x_218 = (*(tint_symbol_3)).arr[x_216].rightIndex;
         baseIndex = x_218;
         continue;
       }
@@ -93,7 +93,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_5) {
+int search_i1_(thread int* const target, thread tint_array_wrapper* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_220 = 0;
@@ -105,7 +105,7 @@
       break;
     }
     int const x_228 = index;
-    BST const x_230 = (*(tint_symbol_5)).arr[x_228];
+    BST const x_230 = (*(tint_symbol_4)).arr[x_228];
     currentNode = x_230;
     int const x_232 = currentNode.data;
     int const x_233 = *(target);
@@ -128,7 +128,7 @@
   return -1;
 }
 
-void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(thread tint_array_wrapper* const tint_symbol_5, thread float4* const tint_symbol_6) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -155,66 +155,66 @@
   int result = 0;
   int param_24 = 0;
   treeIndex_1 = 0;
-  BST const x_84 = (*(tint_symbol_6)).arr[0];
+  BST const x_84 = (*(tint_symbol_5)).arr[0];
   param_4 = x_84;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_86 = param_4;
-  (*(tint_symbol_6)).arr[0] = x_86;
+  (*(tint_symbol_5)).arr[0] = x_86;
   int const x_88 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
   int const x_90 = treeIndex_1;
   param_6 = x_90;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_5);
   int const x_92 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(1)));
   int const x_94 = treeIndex_1;
   param_8 = x_94;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_5);
   int const x_96 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
   int const x_98 = treeIndex_1;
   param_10 = x_98;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_5);
   int const x_100 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
   int const x_102 = treeIndex_1;
   param_12 = x_102;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_5);
   int const x_104 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
   int const x_106 = treeIndex_1;
   param_14 = x_106;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_5);
   int const x_108 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
   int const x_110 = treeIndex_1;
   param_16 = x_110;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_5);
   int const x_112 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
   int const x_114 = treeIndex_1;
   param_18 = x_114;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_5);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   int const x_118 = treeIndex_1;
   param_20 = x_118;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_5);
   int const x_120 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
   int const x_122 = treeIndex_1;
   param_22 = x_122;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_5);
   count = 0;
   i = 0;
   while (true) {
@@ -225,7 +225,7 @@
     }
     int const x_131 = i;
     param_24 = x_131;
-    int const x_132 = search_i1_(&(param_24), tint_symbol_6);
+    int const x_132 = search_i1_(&(param_24), tint_symbol_5);
     result = x_132;
     int const x_133 = i;
     switch(x_133) {
@@ -263,19 +263,25 @@
   }
   int const x_152 = count;
   if ((x_152 == 20)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_6) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread tint_array_wrapper tint_symbol_8 = {};
-  thread float4 tint_symbol_9 = 0.0f;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper tint_symbol_9 = {};
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl
index f4569b5..5dcf502 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl
@@ -33,7 +33,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_4) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -49,49 +49,49 @@
     }
     int const x_221 = *(data_1);
     int const x_222 = baseIndex;
-    int const x_224 = (*(tint_symbol_4)).arr[x_222].data;
+    int const x_224 = (*(tint_symbol_3)).arr[x_222].data;
     if ((x_221 <= x_224)) {
       int const x_229 = baseIndex;
-      int const x_231 = (*(tint_symbol_4)).arr[x_229].leftIndex;
+      int const x_231 = (*(tint_symbol_3)).arr[x_229].leftIndex;
       if ((x_231 == -1)) {
         int const x_236 = baseIndex;
         int const x_237 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_236].leftIndex = x_237;
+        (*(tint_symbol_3)).arr[x_236].leftIndex = x_237;
         int const x_239 = *(treeIndex);
-        BST const x_241 = (*(tint_symbol_4)).arr[x_239];
+        BST const x_241 = (*(tint_symbol_3)).arr[x_239];
         param = x_241;
         int const x_242 = *(data_1);
         param_1 = x_242;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_244 = param;
-        (*(tint_symbol_4)).arr[x_239] = x_244;
+        (*(tint_symbol_3)).arr[x_239] = x_244;
         return;
       } else {
         int const x_246 = baseIndex;
-        int const x_248 = (*(tint_symbol_4)).arr[x_246].leftIndex;
+        int const x_248 = (*(tint_symbol_3)).arr[x_246].leftIndex;
         baseIndex = x_248;
         continue;
       }
       return;
     } else {
       int const x_249 = baseIndex;
-      int const x_251 = (*(tint_symbol_4)).arr[x_249].rightIndex;
+      int const x_251 = (*(tint_symbol_3)).arr[x_249].rightIndex;
       if ((x_251 == -1)) {
         int const x_256 = baseIndex;
         int const x_257 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_256].rightIndex = x_257;
+        (*(tint_symbol_3)).arr[x_256].rightIndex = x_257;
         int const x_259 = *(treeIndex);
-        BST const x_261 = (*(tint_symbol_4)).arr[x_259];
+        BST const x_261 = (*(tint_symbol_3)).arr[x_259];
         param_2 = x_261;
         int const x_262 = *(data_1);
         param_3 = x_262;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_264 = param_2;
-        (*(tint_symbol_4)).arr[x_259] = x_264;
+        (*(tint_symbol_3)).arr[x_259] = x_264;
         return;
       } else {
         int const x_266 = baseIndex;
-        int const x_268 = (*(tint_symbol_4)).arr[x_266].rightIndex;
+        int const x_268 = (*(tint_symbol_3)).arr[x_266].rightIndex;
         baseIndex = x_268;
         continue;
       }
@@ -102,15 +102,15 @@
   return;
 }
 
-int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_5) {
+int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_4) {
   int const x_202 = *(a);
   int const x_203 = *(a);
-  (*(tint_symbol_5)).numbers.arr[x_202] = x_203;
-  int const x_206 = (*(tint_symbol_5)).numbers.arr[2];
+  (*(tint_symbol_4)).numbers.arr[x_202] = x_203;
+  int const x_206 = (*(tint_symbol_4)).numbers.arr[2];
   return x_206;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) {
+int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_5) {
   int index = 0;
   BST currentNode = {};
   int x_270 = 0;
@@ -122,7 +122,7 @@
       break;
     }
     int const x_278 = index;
-    BST const x_280 = (*(tint_symbol_6)).arr[x_278];
+    BST const x_280 = (*(tint_symbol_5)).arr[x_278];
     currentNode = x_280;
     int const x_282 = currentNode.data;
     int const x_283 = *(target);
@@ -145,7 +145,7 @@
   return -1;
 }
 
-void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -176,66 +176,66 @@
   int result = 0;
   int param_25 = 0;
   treeIndex_1 = 0;
-  BST const x_101 = (*(tint_symbol_7)).arr[0];
+  BST const x_101 = (*(tint_symbol_6)).arr[0];
   param_4 = x_101;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_103 = param_4;
-  (*(tint_symbol_7)).arr[0] = x_103;
+  (*(tint_symbol_6)).arr[0] = x_103;
   int const x_105 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
   int const x_107 = treeIndex_1;
   param_6 = x_107;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6);
   int const x_109 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
   int const x_111 = treeIndex_1;
   param_8 = x_111;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6);
   int const x_113 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
   int const x_115 = treeIndex_1;
   param_10 = x_115;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6);
   int const x_117 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
   int const x_119 = treeIndex_1;
   param_12 = x_119;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6);
   int const x_121 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
   int const x_123 = treeIndex_1;
   param_14 = x_123;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6);
   int const x_125 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_125) + as_type<uint>(1)));
   int const x_127 = treeIndex_1;
   param_16 = x_127;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6);
   int const x_129 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_129) + as_type<uint>(1)));
   int const x_131 = treeIndex_1;
   param_18 = x_131;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6);
   int const x_133 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(1)));
   int const x_135 = treeIndex_1;
   param_20 = x_135;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6);
   int const x_137 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
   int const x_139 = treeIndex_1;
   param_22 = x_139;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6);
   pp = 0;
   looplimiter0 = 0;
   i = 0;
@@ -250,7 +250,7 @@
     if ((x_148 >= int(x_150))) {
       float const x_156 = x_50.injectionSwitch.y;
       param_24 = as_type<int>((as_type<uint>(1) + as_type<uint>(int(x_156))));
-      int const x_159 = identity_i1_(&(param_24), tint_symbol_8);
+      int const x_159 = identity_i1_(&(param_24), tint_symbol_7);
       pp = x_159;
       break;
     }
@@ -275,7 +275,7 @@
     }
     int const x_175 = i_1;
     param_25 = x_175;
-    int const x_176 = search_i1_(&(param_25), tint_symbol_7);
+    int const x_176 = search_i1_(&(param_25), tint_symbol_6);
     result = x_176;
     int const x_177 = i_1;
     switch(x_177) {
@@ -313,20 +313,26 @@
   }
   int const x_196 = count;
   if ((x_196 == 20)) {
-    *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_8) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  main_1(x_50, tint_symbol_9, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_50 [[buffer(0)]]) {
-  thread tint_array_wrapper_1 tint_symbol_10 = {};
-  thread QuicksortObject tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  main_1(x_50, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper_1 tint_symbol_12 = {};
+  thread QuicksortObject tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_50, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl
index f4569b5..5dcf502 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl
@@ -33,7 +33,7 @@
   return;
 }
 
-void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_4) {
+void insert_i1_i1_(thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -49,49 +49,49 @@
     }
     int const x_221 = *(data_1);
     int const x_222 = baseIndex;
-    int const x_224 = (*(tint_symbol_4)).arr[x_222].data;
+    int const x_224 = (*(tint_symbol_3)).arr[x_222].data;
     if ((x_221 <= x_224)) {
       int const x_229 = baseIndex;
-      int const x_231 = (*(tint_symbol_4)).arr[x_229].leftIndex;
+      int const x_231 = (*(tint_symbol_3)).arr[x_229].leftIndex;
       if ((x_231 == -1)) {
         int const x_236 = baseIndex;
         int const x_237 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_236].leftIndex = x_237;
+        (*(tint_symbol_3)).arr[x_236].leftIndex = x_237;
         int const x_239 = *(treeIndex);
-        BST const x_241 = (*(tint_symbol_4)).arr[x_239];
+        BST const x_241 = (*(tint_symbol_3)).arr[x_239];
         param = x_241;
         int const x_242 = *(data_1);
         param_1 = x_242;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_244 = param;
-        (*(tint_symbol_4)).arr[x_239] = x_244;
+        (*(tint_symbol_3)).arr[x_239] = x_244;
         return;
       } else {
         int const x_246 = baseIndex;
-        int const x_248 = (*(tint_symbol_4)).arr[x_246].leftIndex;
+        int const x_248 = (*(tint_symbol_3)).arr[x_246].leftIndex;
         baseIndex = x_248;
         continue;
       }
       return;
     } else {
       int const x_249 = baseIndex;
-      int const x_251 = (*(tint_symbol_4)).arr[x_249].rightIndex;
+      int const x_251 = (*(tint_symbol_3)).arr[x_249].rightIndex;
       if ((x_251 == -1)) {
         int const x_256 = baseIndex;
         int const x_257 = *(treeIndex);
-        (*(tint_symbol_4)).arr[x_256].rightIndex = x_257;
+        (*(tint_symbol_3)).arr[x_256].rightIndex = x_257;
         int const x_259 = *(treeIndex);
-        BST const x_261 = (*(tint_symbol_4)).arr[x_259];
+        BST const x_261 = (*(tint_symbol_3)).arr[x_259];
         param_2 = x_261;
         int const x_262 = *(data_1);
         param_3 = x_262;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_264 = param_2;
-        (*(tint_symbol_4)).arr[x_259] = x_264;
+        (*(tint_symbol_3)).arr[x_259] = x_264;
         return;
       } else {
         int const x_266 = baseIndex;
-        int const x_268 = (*(tint_symbol_4)).arr[x_266].rightIndex;
+        int const x_268 = (*(tint_symbol_3)).arr[x_266].rightIndex;
         baseIndex = x_268;
         continue;
       }
@@ -102,15 +102,15 @@
   return;
 }
 
-int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_5) {
+int identity_i1_(thread int* const a, thread QuicksortObject* const tint_symbol_4) {
   int const x_202 = *(a);
   int const x_203 = *(a);
-  (*(tint_symbol_5)).numbers.arr[x_202] = x_203;
-  int const x_206 = (*(tint_symbol_5)).numbers.arr[2];
+  (*(tint_symbol_4)).numbers.arr[x_202] = x_203;
+  int const x_206 = (*(tint_symbol_4)).numbers.arr[2];
   return x_206;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) {
+int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_5) {
   int index = 0;
   BST currentNode = {};
   int x_270 = 0;
@@ -122,7 +122,7 @@
       break;
     }
     int const x_278 = index;
-    BST const x_280 = (*(tint_symbol_6)).arr[x_278];
+    BST const x_280 = (*(tint_symbol_5)).arr[x_278];
     currentNode = x_280;
     int const x_282 = currentNode.data;
     int const x_283 = *(target);
@@ -145,7 +145,7 @@
   return -1;
 }
 
-void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int treeIndex_1 = 0;
   BST param_4 = {};
   int param_5 = 0;
@@ -176,66 +176,66 @@
   int result = 0;
   int param_25 = 0;
   treeIndex_1 = 0;
-  BST const x_101 = (*(tint_symbol_7)).arr[0];
+  BST const x_101 = (*(tint_symbol_6)).arr[0];
   param_4 = x_101;
   param_5 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_4), &(param_5));
   BST const x_103 = param_4;
-  (*(tint_symbol_7)).arr[0] = x_103;
+  (*(tint_symbol_6)).arr[0] = x_103;
   int const x_105 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
   int const x_107 = treeIndex_1;
   param_6 = x_107;
   param_7 = 5;
-  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7);
+  insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6);
   int const x_109 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
   int const x_111 = treeIndex_1;
   param_8 = x_111;
   param_9 = 12;
-  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7);
+  insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6);
   int const x_113 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
   int const x_115 = treeIndex_1;
   param_10 = x_115;
   param_11 = 15;
-  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7);
+  insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6);
   int const x_117 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
   int const x_119 = treeIndex_1;
   param_12 = x_119;
   param_13 = 7;
-  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7);
+  insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6);
   int const x_121 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
   int const x_123 = treeIndex_1;
   param_14 = x_123;
   param_15 = 8;
-  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7);
+  insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6);
   int const x_125 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_125) + as_type<uint>(1)));
   int const x_127 = treeIndex_1;
   param_16 = x_127;
   param_17 = 2;
-  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7);
+  insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6);
   int const x_129 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_129) + as_type<uint>(1)));
   int const x_131 = treeIndex_1;
   param_18 = x_131;
   param_19 = 6;
-  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7);
+  insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6);
   int const x_133 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(1)));
   int const x_135 = treeIndex_1;
   param_20 = x_135;
   param_21 = 17;
-  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7);
+  insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6);
   int const x_137 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
   int const x_139 = treeIndex_1;
   param_22 = x_139;
   param_23 = 13;
-  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_7);
+  insert_i1_i1_(&(param_22), &(param_23), tint_symbol_6);
   pp = 0;
   looplimiter0 = 0;
   i = 0;
@@ -250,7 +250,7 @@
     if ((x_148 >= int(x_150))) {
       float const x_156 = x_50.injectionSwitch.y;
       param_24 = as_type<int>((as_type<uint>(1) + as_type<uint>(int(x_156))));
-      int const x_159 = identity_i1_(&(param_24), tint_symbol_8);
+      int const x_159 = identity_i1_(&(param_24), tint_symbol_7);
       pp = x_159;
       break;
     }
@@ -275,7 +275,7 @@
     }
     int const x_175 = i_1;
     param_25 = x_175;
-    int const x_176 = search_i1_(&(param_25), tint_symbol_7);
+    int const x_176 = search_i1_(&(param_25), tint_symbol_6);
     result = x_176;
     int const x_177 = i_1;
     switch(x_177) {
@@ -313,20 +313,26 @@
   }
   int const x_196 = count;
   if ((x_196 == 20)) {
-    *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_9) = float4(0.0f, 0.0f, 1.0f, 1.0f);
+    *(tint_symbol_8) = float4(0.0f, 0.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  main_1(x_50, tint_symbol_9, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_50 [[buffer(0)]]) {
-  thread tint_array_wrapper_1 tint_symbol_10 = {};
-  thread QuicksortObject tint_symbol_11 = {};
-  thread float4 tint_symbol_12 = 0.0f;
-  main_1(x_50, &(tint_symbol_10), &(tint_symbol_11), &(tint_symbol_12));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_12};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  thread tint_array_wrapper_1 tint_symbol_12 = {};
+  thread QuicksortObject tint_symbol_13 = {};
+  thread float4 tint_symbol_14 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_50, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl
index b305371..dcab7e2 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.hlsl
@@ -40,8 +40,8 @@
   v_1 = ((int(x_72) * 8) + int(x_76));
   param = v_1;
   const int x_80 = collatz_i1_(param);
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_83 = indexable[(x_80 % 16)];
   x_GLF_color = x_83;
   return;
@@ -57,11 +57,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl
index e563769..a149e5b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -38,12 +38,12 @@
   return x_105;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float2 lin = 0.0f;
   int v_1 = 0;
   int param = 0;
   tint_array_wrapper indexable = {};
-  float4 const x_63 = *(tint_symbol_6);
+  float4 const x_63 = *(tint_symbol_4);
   float2 const x_66 = x_10.resolution;
   lin = (float2(x_63.x, x_63.y) / x_66);
   float2 const x_68 = lin;
@@ -54,20 +54,26 @@
   int const x_79 = v_1;
   param = x_79;
   int const x_80 = collatz_i1_(&(param));
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_83 = indexable.arr[(x_80 % 16)];
-  *(tint_symbol_7) = x_83;
+  *(tint_symbol_5) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl
index b305371..dcab7e2 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.hlsl
@@ -40,8 +40,8 @@
   v_1 = ((int(x_72) * 8) + int(x_76));
   param = v_1;
   const int x_80 = collatz_i1_(param);
-  const float4 tint_symbol_5[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-  indexable = tint_symbol_5;
+  const float4 tint_symbol_4[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+  indexable = tint_symbol_4;
   const float4 x_83 = indexable[(x_80 % 16)];
   x_GLF_color = x_83;
   return;
@@ -57,11 +57,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl
index e563769..a149e5b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -38,12 +38,12 @@
   return x_105;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float2 lin = 0.0f;
   int v_1 = 0;
   int param = 0;
   tint_array_wrapper indexable = {};
-  float4 const x_63 = *(tint_symbol_6);
+  float4 const x_63 = *(tint_symbol_4);
   float2 const x_66 = x_10.resolution;
   lin = (float2(x_63.x, x_63.y) / x_66);
   float2 const x_68 = lin;
@@ -54,20 +54,26 @@
   int const x_79 = v_1;
   param = x_79;
   int const x_80 = collatz_i1_(&(param));
-  tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-  indexable = tint_symbol_4;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+  indexable = tint_symbol_2;
   float4 const x_83 = indexable.arr[(x_80 % 16)];
-  *(tint_symbol_7) = x_83;
+  *(tint_symbol_5) = x_83;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl
index c57ef0b..bd31e20 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.hlsl
@@ -210,11 +210,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl
index a7377e3..41ee535 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_54 = 0.0f;
   float x_58 = 0.0f;
@@ -34,7 +34,7 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_50 = x_9.resolution.x;
   float const x_52 = rint((x_50 * 0.125f));
-  x_54 = (*(tint_symbol_5)).x;
+  x_54 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_58_phi = -0.5f;
@@ -106,7 +106,7 @@
   bool x_137_phi = false;
   float const x_95 = x_95_phi;
   c.x = x_95;
-  x_98 = (*(tint_symbol_5)).y;
+  x_98 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       x_102_phi = -0.5f;
@@ -200,17 +200,23 @@
   }
   float3 const x_167 = c;
   float3 const x_169 = normalize(fabs(x_167));
-  *(tint_symbol_6) = float4(x_169.x, x_169.y, x_169.z, 1.0f);
+  *(tint_symbol_4) = float4(x_169.x, x_169.y, x_169.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl
index 1b409b0..8282858 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.hlsl
@@ -210,11 +210,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl
index fc69ea6..60d6aa5 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float x_54 = 0.0f;
   float x_58 = 0.0f;
@@ -34,7 +34,7 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_50 = x_9.resolution.x;
   float const x_52 = rint((x_50 * 0.125f));
-  x_54 = (*(tint_symbol_5)).x;
+  x_54 = (*(tint_symbol_3)).x;
   switch(0u) {
     default: {
       x_58_phi = -0.5f;
@@ -106,7 +106,7 @@
   bool x_137_phi = false;
   float const x_95 = x_95_phi;
   c.x = x_95;
-  x_98 = (*(tint_symbol_5)).y;
+  x_98 = (*(tint_symbol_3)).y;
   switch(0u) {
     default: {
       x_102_phi = -0.5f;
@@ -200,17 +200,23 @@
   }
   float3 const x_167 = c;
   float3 const x_169 = normalize(fabs(x_167));
-  *(tint_symbol_6) = float4(x_169.x, x_169.y, x_169.z, 1.0f);
+  *(tint_symbol_4) = float4(x_169.x, x_169.y, x_169.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_9, constant buf1& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_9, x_6, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_6 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_9, x_6, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_9, x_6, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl
index 461df51..4e2b4d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.hlsl
@@ -85,11 +85,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl
index 258c77b..1420486 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -49,7 +49,7 @@
   return x_141;
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -60,13 +60,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_56 = x_13.resolution.x;
   thirty_two_1 = rint((x_56 / 8.0f));
-  float const x_60 = (*(tint_symbol_5)).x;
+  float const x_60 = (*(tint_symbol_3)).x;
   param = x_60;
   float const x_61 = thirty_two_1;
   param_1 = x_61;
   float const x_62 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_62;
-  float const x_65 = (*(tint_symbol_5)).y;
+  float const x_65 = (*(tint_symbol_3)).y;
   param_2 = x_65;
   float const x_66 = thirty_two_1;
   param_3 = x_66;
@@ -99,17 +99,23 @@
   }
   float3 const x_99 = c;
   float3 const x_101 = normalize(fabs(x_99));
-  *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
+  *(tint_symbol_4) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl
index 7295dbb..86962b9 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.hlsl
@@ -85,11 +85,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl
index 18723da..3122dc6 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -49,7 +49,7 @@
   return x_141;
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -60,13 +60,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_56 = x_13.resolution.x;
   thirty_two_1 = rint((x_56 / 8.0f));
-  float const x_60 = (*(tint_symbol_5)).x;
+  float const x_60 = (*(tint_symbol_3)).x;
   param = x_60;
   float const x_61 = thirty_two_1;
   param_1 = x_61;
   float const x_62 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_62;
-  float const x_65 = (*(tint_symbol_5)).y;
+  float const x_65 = (*(tint_symbol_3)).y;
   param_2 = x_65;
   float const x_66 = thirty_two_1;
   param_3 = x_66;
@@ -99,17 +99,23 @@
   }
   float3 const x_99 = c;
   float3 const x_101 = normalize(fabs(x_99));
-  *(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
+  *(tint_symbol_4) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl
index 645b4dc..7baccd8 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.hlsl
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl
index 0021c50..30a0b7c 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -52,7 +52,7 @@
   return x_155;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -64,13 +64,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_60 = x_13.resolution.x;
   thirty_two_1 = rint((x_60 / 8.0f));
-  float const x_64 = (*(tint_symbol_5)).x;
+  float const x_64 = (*(tint_symbol_3)).x;
   param = x_64;
   float const x_65 = thirty_two_1;
   param_1 = x_65;
   float const x_66 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_66;
-  float const x_69 = (*(tint_symbol_5)).y;
+  float const x_69 = (*(tint_symbol_3)).y;
   param_2 = x_69;
   float const x_70 = thirty_two_1;
   param_3 = x_70;
@@ -112,17 +112,23 @@
   }
   float3 const x_114 = x_58;
   float3 const x_115 = normalize(x_114);
-  *(tint_symbol_6) = float4(x_115.x, x_115.y, x_115.z, 1.0f);
+  *(tint_symbol_4) = float4(x_115.x, x_115.y, x_115.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, x_20, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, x_20, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_20, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl
index 91938cd..93d5a9d 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.hlsl
@@ -96,11 +96,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl
index 70aae88..6e921c8 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -52,7 +52,7 @@
   return x_155;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -64,13 +64,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_60 = x_13.resolution.x;
   thirty_two_1 = rint((x_60 / 8.0f));
-  float const x_64 = (*(tint_symbol_5)).x;
+  float const x_64 = (*(tint_symbol_3)).x;
   param = x_64;
   float const x_65 = thirty_two_1;
   param_1 = x_65;
   float const x_66 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_66;
-  float const x_69 = (*(tint_symbol_5)).y;
+  float const x_69 = (*(tint_symbol_3)).y;
   param_2 = x_69;
   float const x_70 = thirty_two_1;
   param_3 = x_70;
@@ -112,17 +112,23 @@
   }
   float3 const x_114 = x_58;
   float3 const x_115 = normalize(x_114);
-  *(tint_symbol_6) = float4(x_115.x, x_115.y, x_115.z, 1.0f);
+  *(tint_symbol_4) = float4(x_115.x, x_115.y, x_115.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, x_20, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_20 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, x_20, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_20, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl
index d2c43f1..f1fa426 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.hlsl
@@ -113,11 +113,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl
index 5d64b78..a91185b 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -58,7 +58,7 @@
   return x_91;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float param = 0.0f;
   float param_1 = 0.0f;
@@ -68,12 +68,12 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_52 = x_10.resolution.x;
   float const x_54 = rint((x_52 * 0.125f));
-  float const x_56 = (*(tint_symbol_5)).x;
+  float const x_56 = (*(tint_symbol_3)).x;
   param = x_56;
   param_1 = x_54;
   float const x_57 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_57;
-  float const x_60 = (*(tint_symbol_5)).y;
+  float const x_60 = (*(tint_symbol_3)).y;
   param_2 = x_60;
   param_3 = x_54;
   float const x_61 = compute_value_f1_f1_(&(param_2), &(param_3));
@@ -103,17 +103,23 @@
   }
   float3 const x_82 = c;
   float3 const x_84 = normalize(fabs(x_82));
-  *(tint_symbol_6) = float4(x_84.x, x_84.y, x_84.z, 1.0f);
+  *(tint_symbol_4) = float4(x_84.x, x_84.y, x_84.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl
index 125f7d9..591ca1b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.hlsl
@@ -113,11 +113,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl
index 4635d6f..5aebe2c 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -58,7 +58,7 @@
   return x_91;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float param = 0.0f;
   float param_1 = 0.0f;
@@ -68,12 +68,12 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_52 = x_10.resolution.x;
   float const x_54 = rint((x_52 * 0.125f));
-  float const x_56 = (*(tint_symbol_5)).x;
+  float const x_56 = (*(tint_symbol_3)).x;
   param = x_56;
   param_1 = x_54;
   float const x_57 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_57;
-  float const x_60 = (*(tint_symbol_5)).y;
+  float const x_60 = (*(tint_symbol_3)).y;
   param_2 = x_60;
   param_3 = x_54;
   float const x_61 = compute_value_f1_f1_(&(param_2), &(param_3));
@@ -103,17 +103,23 @@
   }
   float3 const x_82 = c;
   float3 const x_84 = normalize(fabs(x_82));
-  *(tint_symbol_6) = float4(x_84.x, x_84.y, x_84.z, 1.0f);
+  *(tint_symbol_4) = float4(x_84.x, x_84.y, x_84.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl
index 32ea2b3..b9f1d3e 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.hlsl
@@ -123,11 +123,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl
index cd4c8e2..b8d279e 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -61,7 +61,7 @@
   return x_104;
 }
 
-void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float param = 0.0f;
   float param_1 = 0.0f;
@@ -72,12 +72,12 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_56 = x_10.resolution.x;
   float const x_58 = rint((x_56 * 0.125f));
-  float const x_60 = (*(tint_symbol_5)).x;
+  float const x_60 = (*(tint_symbol_3)).x;
   param = x_60;
   param_1 = x_58;
   float const x_61 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_61;
-  float const x_64 = (*(tint_symbol_5)).y;
+  float const x_64 = (*(tint_symbol_3)).y;
   param_2 = x_64;
   param_3 = x_58;
   float const x_65 = compute_value_f1_f1_(&(param_2), &(param_3));
@@ -114,17 +114,23 @@
   }
   float3 const x_95 = c;
   float3 const x_97 = normalize(fabs(x_95));
-  *(tint_symbol_6) = float4(x_97.x, x_97.y, x_97.z, 1.0f);
+  *(tint_symbol_4) = float4(x_97.x, x_97.y, x_97.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_10, x_16, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_10, x_16, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, x_16, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl
index 3a417df..24b43e0 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.hlsl
@@ -123,11 +123,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl
index 04458e7..c30dcfd 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -61,7 +61,7 @@
   return x_104;
 }
 
-void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float param = 0.0f;
   float param_1 = 0.0f;
@@ -72,12 +72,12 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_56 = x_10.resolution.x;
   float const x_58 = rint((x_56 * 0.125f));
-  float const x_60 = (*(tint_symbol_5)).x;
+  float const x_60 = (*(tint_symbol_3)).x;
   param = x_60;
   param_1 = x_58;
   float const x_61 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_61;
-  float const x_64 = (*(tint_symbol_5)).y;
+  float const x_64 = (*(tint_symbol_3)).y;
   param_2 = x_64;
   param_3 = x_58;
   float const x_65 = compute_value_f1_f1_(&(param_2), &(param_3));
@@ -114,17 +114,23 @@
   }
   float3 const x_95 = c;
   float3 const x_97 = normalize(fabs(x_95));
-  *(tint_symbol_6) = float4(x_97.x, x_97.y, x_97.z, 1.0f);
+  *(tint_symbol_4) = float4(x_97.x, x_97.y, x_97.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_10, x_16, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_10, x_16, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, x_16, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl
index 4740814..e4ca124 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.hlsl
@@ -112,11 +112,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl
index 025db52..6c63c38 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -52,7 +52,7 @@
   return x_174;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -65,13 +65,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_63 = x_13.resolution.x;
   thirty_two_1 = rint((x_63 / 8.0f));
-  float const x_67 = (*(tint_symbol_5)).x;
+  float const x_67 = (*(tint_symbol_3)).x;
   param = x_67;
   float const x_68 = thirty_two_1;
   param_1 = x_68;
   float const x_69 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_69;
-  float const x_72 = (*(tint_symbol_5)).y;
+  float const x_72 = (*(tint_symbol_3)).y;
   param_2 = x_72;
   float const x_73 = thirty_two_1;
   param_3 = x_73;
@@ -128,17 +128,23 @@
   }
   float3 const x_132 = c;
   float3 const x_134 = normalize(fabs(x_132));
-  *(tint_symbol_6) = float4(x_134.x, x_134.y, x_134.z, 1.0f);
+  *(tint_symbol_4) = float4(x_134.x, x_134.y, x_134.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_19, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, x_19, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, x_19, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_19, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl
index 8f3bad1..abec6b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.hlsl
@@ -112,11 +112,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl
index 5515f82..52d5ba9 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl
@@ -10,7 +10,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -52,7 +52,7 @@
   return x_174;
 }
 
-void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -65,13 +65,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_63 = x_13.resolution.x;
   thirty_two_1 = rint((x_63 / 8.0f));
-  float const x_67 = (*(tint_symbol_5)).x;
+  float const x_67 = (*(tint_symbol_3)).x;
   param = x_67;
   float const x_68 = thirty_two_1;
   param_1 = x_68;
   float const x_69 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_69;
-  float const x_72 = (*(tint_symbol_5)).y;
+  float const x_72 = (*(tint_symbol_3)).y;
   param_2 = x_72;
   float const x_73 = thirty_two_1;
   param_3 = x_73;
@@ -128,17 +128,23 @@
   }
   float3 const x_132 = c;
   float3 const x_134 = normalize(fabs(x_132));
-  *(tint_symbol_6) = float4(x_134.x, x_134.y, x_134.z, 1.0f);
+  *(tint_symbol_4) = float4(x_134.x, x_134.y, x_134.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, constant buf1& x_19, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, x_19, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]], constant buf1& x_19 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, x_19, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, x_19, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl
index 66c6ab5..66fe270 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.hlsl
@@ -90,11 +90,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl
index 0af13fc..23d3b1c 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -49,7 +49,7 @@
   return x_166;
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -60,13 +60,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_63 = x_13.resolution.x;
   thirty_two_1 = rint((x_63 / 8.0f));
-  float const x_67 = (*(tint_symbol_5)).x;
+  float const x_67 = (*(tint_symbol_3)).x;
   param = x_67;
   float const x_68 = thirty_two_1;
   param_1 = x_68;
   float const x_69 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_69;
-  float const x_72 = (*(tint_symbol_5)).y;
+  float const x_72 = (*(tint_symbol_3)).y;
   param_2 = x_72;
   float const x_73 = thirty_two_1;
   param_3 = x_73;
@@ -92,7 +92,7 @@
       int const x_112 = i_1;
       float const x_114 = c[x_112];
       c[x_108] = (x_111 * x_114);
-      float const x_118 = (*(tint_symbol_5)).y;
+      float const x_118 = (*(tint_symbol_3)).y;
       if ((x_118 < 0.0f)) {
         break;
       }
@@ -104,17 +104,23 @@
   }
   float3 const x_124 = c;
   float3 const x_126 = normalize(fabs(x_124));
-  *(tint_symbol_6) = float4(x_126.x, x_126.y, x_126.z, 1.0f);
+  *(tint_symbol_4) = float4(x_126.x, x_126.y, x_126.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl
index 20808b2..579ca64 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.hlsl
@@ -90,11 +90,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl
index 4324bef..fc0eff4 100755
--- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -49,7 +49,7 @@
   return x_166;
 }
 
-void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_13, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float3 c = 0.0f;
   float thirty_two_1 = 0.0f;
   float param = 0.0f;
@@ -60,13 +60,13 @@
   c = float3(7.0f, 8.0f, 9.0f);
   float const x_63 = x_13.resolution.x;
   thirty_two_1 = rint((x_63 / 8.0f));
-  float const x_67 = (*(tint_symbol_5)).x;
+  float const x_67 = (*(tint_symbol_3)).x;
   param = x_67;
   float const x_68 = thirty_two_1;
   param_1 = x_68;
   float const x_69 = compute_value_f1_f1_(&(param), &(param_1));
   c.x = x_69;
-  float const x_72 = (*(tint_symbol_5)).y;
+  float const x_72 = (*(tint_symbol_3)).y;
   param_2 = x_72;
   float const x_73 = thirty_two_1;
   param_3 = x_73;
@@ -92,7 +92,7 @@
       int const x_112 = i_1;
       float const x_114 = c[x_112];
       c[x_108] = (x_111 * x_114);
-      float const x_118 = (*(tint_symbol_5)).y;
+      float const x_118 = (*(tint_symbol_3)).y;
       if ((x_118 < 0.0f)) {
         break;
       }
@@ -104,17 +104,23 @@
   }
   float3 const x_124 = c;
   float3 const x_126 = normalize(fabs(x_124));
-  *(tint_symbol_6) = float4(x_126.x, x_126.y, x_126.z, 1.0f);
+  *(tint_symbol_4) = float4(x_126.x, x_126.y, x_126.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_13, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_13, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_13, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl
index 8f288a0..a2853d8 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl
@@ -284,11 +284,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl
index f9b3b82..8a8ae50 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_276 = i;
-    int const x_278 = (*(tint_symbol_5)).arr[x_276];
+    int const x_278 = (*(tint_symbol_3)).arr[x_276];
     int const x_279 = j;
-    int const x_281 = (*(tint_symbol_5)).arr[x_279];
+    int const x_281 = (*(tint_symbol_3)).arr[x_279];
     if ((x_278 < x_281)) {
       int const x_286 = k;
       k = as_type<int>((as_type<uint>(x_286) + as_type<uint>(1)));
       int const x_288 = i;
       i = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
-      int const x_291 = (*(tint_symbol_5)).arr[x_288];
-      (*(tint_symbol_6)).arr[x_286] = x_291;
+      int const x_291 = (*(tint_symbol_3)).arr[x_288];
+      (*(tint_symbol_4)).arr[x_286] = x_291;
     } else {
       int const x_293 = k;
       k = as_type<int>((as_type<uint>(x_293) + as_type<uint>(1)));
       int const x_295 = j;
       j = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
-      int const x_298 = (*(tint_symbol_5)).arr[x_295];
-      (*(tint_symbol_6)).arr[x_293] = x_298;
+      int const x_298 = (*(tint_symbol_3)).arr[x_295];
+      (*(tint_symbol_4)).arr[x_293] = x_298;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
     int const x_313 = i;
     i = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
-    int const x_316 = (*(tint_symbol_5)).arr[x_313];
-    (*(tint_symbol_6)).arr[x_311] = x_316;
+    int const x_316 = (*(tint_symbol_3)).arr[x_313];
+    (*(tint_symbol_4)).arr[x_311] = x_316;
   }
   int const x_318 = *(from);
   i_1 = x_318;
@@ -80,8 +80,8 @@
     }
     int const x_327 = i_1;
     int const x_328 = i_1;
-    int const x_330 = (*(tint_symbol_6)).arr[x_328];
-    (*(tint_symbol_5)).arr[x_327] = x_330;
+    int const x_330 = (*(tint_symbol_4)).arr[x_328];
+    (*(tint_symbol_3)).arr[x_327] = x_330;
     {
       int const x_332 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_332) + as_type<uint>(1)));
@@ -90,11 +90,11 @@
   return;
 }
 
-int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_7) {
+int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_5) {
   int x = 0;
   int x_335 = 0;
   int x_336 = 0;
-  float const x_338 = (*(tint_symbol_7)).x;
+  float const x_338 = (*(tint_symbol_5)).x;
   if ((x_338 >= 0.0f)) {
     if (false) {
       int const x_346 = *(high);
@@ -118,7 +118,7 @@
   return clamp(as_type<int>((as_type<uint>(2) * as_type<uint>(x_353))), as_type<int>((as_type<uint>(2) * as_type<uint>(x_355))), (as_type<int>((as_type<uint>(2) * as_type<uint>(x_357))) / x_359));
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int low = 0;
   int high_1 = 0;
   int m_1 = 0;
@@ -165,13 +165,13 @@
       param_1 = x_393;
       int const x_394 = to_1;
       param_2 = x_394;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_8, tint_symbol_9);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_6, tint_symbol_7);
       {
         int const x_396 = m_1;
         param_3 = x_396;
         int const x_397 = high_1;
         param_4 = x_397;
-        int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_10);
+        int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_8);
         int const x_399 = i_2;
         i_2 = as_type<int>((as_type<uint>(x_399) + as_type<uint>(x_398)));
       }
@@ -184,7 +184,7 @@
   return;
 }
 
-void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) {
+void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -195,52 +195,52 @@
     switch(x_99) {
       case 9: {
         int const x_129 = i_3;
-        (*(tint_symbol_11)).arr[x_129] = -5;
+        (*(tint_symbol_9)).arr[x_129] = -5;
         break;
       }
       case 8: {
         int const x_127 = i_3;
-        (*(tint_symbol_11)).arr[x_127] = -4;
+        (*(tint_symbol_9)).arr[x_127] = -4;
         break;
       }
       case 7: {
         int const x_125 = i_3;
-        (*(tint_symbol_11)).arr[x_125] = -3;
+        (*(tint_symbol_9)).arr[x_125] = -3;
         break;
       }
       case 6: {
         int const x_123 = i_3;
-        (*(tint_symbol_11)).arr[x_123] = -2;
+        (*(tint_symbol_9)).arr[x_123] = -2;
         break;
       }
       case 5: {
         int const x_121 = i_3;
-        (*(tint_symbol_11)).arr[x_121] = -1;
+        (*(tint_symbol_9)).arr[x_121] = -1;
         break;
       }
       case 4: {
         int const x_119 = i_3;
-        (*(tint_symbol_11)).arr[x_119] = 0;
+        (*(tint_symbol_9)).arr[x_119] = 0;
         break;
       }
       case 3: {
         int const x_117 = i_3;
-        (*(tint_symbol_11)).arr[x_117] = 1;
+        (*(tint_symbol_9)).arr[x_117] = 1;
         break;
       }
       case 2: {
         int const x_115 = i_3;
-        (*(tint_symbol_11)).arr[x_115] = 2;
+        (*(tint_symbol_9)).arr[x_115] = 2;
         break;
       }
       case 1: {
         int const x_113 = i_3;
-        (*(tint_symbol_11)).arr[x_113] = 3;
+        (*(tint_symbol_9)).arr[x_113] = 3;
         break;
       }
       case 0: {
         int const x_111 = i_3;
-        (*(tint_symbol_11)).arr[x_111] = 4;
+        (*(tint_symbol_9)).arr[x_111] = 4;
         break;
       }
       default: {
@@ -266,56 +266,56 @@
     }
     int const x_142 = j_1;
     int const x_143 = j_1;
-    int const x_145 = (*(tint_symbol_11)).arr[x_143];
-    (*(tint_symbol_12)).arr[x_142] = x_145;
+    int const x_145 = (*(tint_symbol_9)).arr[x_143];
+    (*(tint_symbol_10)).arr[x_142] = x_145;
     {
       int const x_147 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_147) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_11, tint_symbol_12, tint_symbol_13);
-  float const x_151 = (*(tint_symbol_13)).y;
+  mergeSort_(tint_symbol_9, tint_symbol_10, tint_symbol_11);
+  float const x_151 = (*(tint_symbol_11)).y;
   if ((int(x_151) < 30)) {
-    int const x_158 = (*(tint_symbol_11)).arr[0];
+    int const x_158 = (*(tint_symbol_9)).arr[0];
     grey = (0.5f + (float(x_158) / 10.0f));
   } else {
-    float const x_163 = (*(tint_symbol_13)).y;
+    float const x_163 = (*(tint_symbol_11)).y;
     if ((int(x_163) < 60)) {
-      int const x_170 = (*(tint_symbol_11)).arr[1];
+      int const x_170 = (*(tint_symbol_9)).arr[1];
       grey = (0.5f + (float(x_170) / 10.0f));
     } else {
-      float const x_175 = (*(tint_symbol_13)).y;
+      float const x_175 = (*(tint_symbol_11)).y;
       if ((int(x_175) < 90)) {
-        int const x_182 = (*(tint_symbol_11)).arr[2];
+        int const x_182 = (*(tint_symbol_9)).arr[2];
         grey = (0.5f + (float(x_182) / 10.0f));
       } else {
-        float const x_187 = (*(tint_symbol_13)).y;
+        float const x_187 = (*(tint_symbol_11)).y;
         if ((int(x_187) < 120)) {
-          int const x_194 = (*(tint_symbol_11)).arr[3];
+          int const x_194 = (*(tint_symbol_9)).arr[3];
           grey = (0.5f + (float(x_194) / 10.0f));
         } else {
-          float const x_199 = (*(tint_symbol_13)).y;
+          float const x_199 = (*(tint_symbol_11)).y;
           if ((int(x_199) < 150)) {
             discard_fragment();
           } else {
-            float const x_206 = (*(tint_symbol_13)).y;
+            float const x_206 = (*(tint_symbol_11)).y;
             if ((int(x_206) < 180)) {
-              int const x_213 = (*(tint_symbol_11)).arr[5];
+              int const x_213 = (*(tint_symbol_9)).arr[5];
               grey = (0.5f + (float(x_213) / 10.0f));
             } else {
-              float const x_218 = (*(tint_symbol_13)).y;
+              float const x_218 = (*(tint_symbol_11)).y;
               if ((int(x_218) < 210)) {
-                int const x_225 = (*(tint_symbol_11)).arr[6];
+                int const x_225 = (*(tint_symbol_9)).arr[6];
                 grey = (0.5f + (float(x_225) / 10.0f));
               } else {
-                float const x_230 = (*(tint_symbol_13)).y;
+                float const x_230 = (*(tint_symbol_11)).y;
                 if ((int(x_230) < 240)) {
-                  int const x_237 = (*(tint_symbol_11)).arr[7];
+                  int const x_237 = (*(tint_symbol_9)).arr[7];
                   grey = (0.5f + (float(x_237) / 10.0f));
                 } else {
-                  float const x_242 = (*(tint_symbol_13)).y;
+                  float const x_242 = (*(tint_symbol_11)).y;
                   if ((int(x_242) < 270)) {
-                    int const x_249 = (*(tint_symbol_11)).arr[8];
+                    int const x_249 = (*(tint_symbol_9)).arr[8];
                     grey = (0.5f + (float(x_249) / 10.0f));
                   } else {
                     discard_fragment();
@@ -330,19 +330,25 @@
   }
   float const x_253 = grey;
   float3 const x_254 = float3(x_253, x_253, x_253);
-  *(tint_symbol_14) = float4(x_254.x, x_254.y, x_254.z, 1.0f);
+  *(tint_symbol_12) = float4(x_254.x, x_254.y, x_254.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_15 = 0.0f;
-  thread tint_array_wrapper tint_symbol_16 = {};
-  thread tint_array_wrapper tint_symbol_17 = {};
-  thread float4 tint_symbol_18 = 0.0f;
-  tint_symbol_15 = gl_FragCoord_param;
-  main_1(x_34, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_15), &(tint_symbol_18));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_18};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_13, thread tint_array_wrapper* const tint_symbol_14, thread tint_array_wrapper* const tint_symbol_15, thread float4* const tint_symbol_16) {
+  *(tint_symbol_13) = gl_FragCoord_param;
+  main_1(x_34, tint_symbol_14, tint_symbol_15, tint_symbol_13, tint_symbol_16);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_16)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
+  thread float4 tint_symbol_17 = 0.0f;
+  thread tint_array_wrapper tint_symbol_18 = {};
+  thread tint_array_wrapper tint_symbol_19 = {};
+  thread float4 tint_symbol_20 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl
index edd60f7..14daa85 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.hlsl
@@ -292,11 +292,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl
index 20eced1..557f911 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_276 = i;
-    int const x_278 = (*(tint_symbol_5)).arr[x_276];
+    int const x_278 = (*(tint_symbol_3)).arr[x_276];
     int const x_279 = j;
-    int const x_281 = (*(tint_symbol_5)).arr[x_279];
+    int const x_281 = (*(tint_symbol_3)).arr[x_279];
     if ((x_278 < x_281)) {
       int const x_286 = k;
       k = as_type<int>((as_type<uint>(x_286) + as_type<uint>(1)));
       int const x_288 = i;
       i = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
-      int const x_291 = (*(tint_symbol_5)).arr[x_288];
-      (*(tint_symbol_6)).arr[x_286] = x_291;
+      int const x_291 = (*(tint_symbol_3)).arr[x_288];
+      (*(tint_symbol_4)).arr[x_286] = x_291;
     } else {
       int const x_293 = k;
       k = as_type<int>((as_type<uint>(x_293) + as_type<uint>(1)));
       int const x_295 = j;
       j = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
-      int const x_298 = (*(tint_symbol_5)).arr[x_295];
-      (*(tint_symbol_6)).arr[x_293] = x_298;
+      int const x_298 = (*(tint_symbol_3)).arr[x_295];
+      (*(tint_symbol_4)).arr[x_293] = x_298;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
     int const x_313 = i;
     i = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
-    int const x_316 = (*(tint_symbol_5)).arr[x_313];
-    (*(tint_symbol_6)).arr[x_311] = x_316;
+    int const x_316 = (*(tint_symbol_3)).arr[x_313];
+    (*(tint_symbol_4)).arr[x_311] = x_316;
   }
   int const x_318 = *(from);
   i_1 = x_318;
@@ -80,8 +80,8 @@
     }
     int const x_327 = i_1;
     int const x_328 = i_1;
-    int const x_330 = (*(tint_symbol_6)).arr[x_328];
-    (*(tint_symbol_5)).arr[x_327] = x_330;
+    int const x_330 = (*(tint_symbol_4)).arr[x_328];
+    (*(tint_symbol_3)).arr[x_327] = x_330;
     {
       int const x_332 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_332) + as_type<uint>(1)));
@@ -90,11 +90,11 @@
   return;
 }
 
-int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_7) {
+int func_i1_i1_(thread int* const m, thread int* const high, thread float4* const tint_symbol_5) {
   int x = 0;
   int x_335 = 0;
   int x_336 = 0;
-  float const x_338 = (*(tint_symbol_7)).x;
+  float const x_338 = (*(tint_symbol_5)).x;
   if ((x_338 >= 0.0f)) {
     if (false) {
       int const x_346 = *(high);
@@ -118,7 +118,7 @@
   return clamp(as_type<int>((as_type<uint>(2) * as_type<uint>(x_353))), as_type<int>((as_type<uint>(2) * as_type<uint>(x_355))), (as_type<int>((as_type<uint>(2) * as_type<uint>(x_357))) / x_359));
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_6, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int low = 0;
   int high_1 = 0;
   int m_1 = 0;
@@ -165,13 +165,13 @@
       param_1 = x_393;
       int const x_394 = to_1;
       param_2 = x_394;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_8, tint_symbol_9);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_6, tint_symbol_7);
       {
         int const x_396 = m_1;
         param_3 = x_396;
         int const x_397 = high_1;
         param_4 = x_397;
-        int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_10);
+        int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_8);
         int const x_399 = i_2;
         i_2 = as_type<int>((as_type<uint>(x_399) + as_type<uint>(x_398)));
       }
@@ -184,7 +184,7 @@
   return;
 }
 
-void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) {
+void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -195,52 +195,52 @@
     switch(x_99) {
       case 9: {
         int const x_129 = i_3;
-        (*(tint_symbol_11)).arr[x_129] = -5;
+        (*(tint_symbol_9)).arr[x_129] = -5;
         break;
       }
       case 8: {
         int const x_127 = i_3;
-        (*(tint_symbol_11)).arr[x_127] = -4;
+        (*(tint_symbol_9)).arr[x_127] = -4;
         break;
       }
       case 7: {
         int const x_125 = i_3;
-        (*(tint_symbol_11)).arr[x_125] = -3;
+        (*(tint_symbol_9)).arr[x_125] = -3;
         break;
       }
       case 6: {
         int const x_123 = i_3;
-        (*(tint_symbol_11)).arr[x_123] = -2;
+        (*(tint_symbol_9)).arr[x_123] = -2;
         break;
       }
       case 5: {
         int const x_121 = i_3;
-        (*(tint_symbol_11)).arr[x_121] = -1;
+        (*(tint_symbol_9)).arr[x_121] = -1;
         break;
       }
       case 4: {
         int const x_119 = i_3;
-        (*(tint_symbol_11)).arr[x_119] = 0;
+        (*(tint_symbol_9)).arr[x_119] = 0;
         break;
       }
       case 3: {
         int const x_117 = i_3;
-        (*(tint_symbol_11)).arr[x_117] = 1;
+        (*(tint_symbol_9)).arr[x_117] = 1;
         break;
       }
       case 2: {
         int const x_115 = i_3;
-        (*(tint_symbol_11)).arr[x_115] = 2;
+        (*(tint_symbol_9)).arr[x_115] = 2;
         break;
       }
       case 1: {
         int const x_113 = i_3;
-        (*(tint_symbol_11)).arr[x_113] = 3;
+        (*(tint_symbol_9)).arr[x_113] = 3;
         break;
       }
       case 0: {
         int const x_111 = i_3;
-        (*(tint_symbol_11)).arr[x_111] = 4;
+        (*(tint_symbol_9)).arr[x_111] = 4;
         break;
       }
       default: {
@@ -266,56 +266,56 @@
     }
     int const x_142 = j_1;
     int const x_143 = j_1;
-    int const x_145 = (*(tint_symbol_11)).arr[x_143];
-    (*(tint_symbol_12)).arr[x_142] = x_145;
+    int const x_145 = (*(tint_symbol_9)).arr[x_143];
+    (*(tint_symbol_10)).arr[x_142] = x_145;
     {
       int const x_147 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_147) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_11, tint_symbol_12, tint_symbol_13);
-  float const x_151 = (*(tint_symbol_13)).y;
+  mergeSort_(tint_symbol_9, tint_symbol_10, tint_symbol_11);
+  float const x_151 = (*(tint_symbol_11)).y;
   if ((int(x_151) < 30)) {
-    int const x_158 = (*(tint_symbol_11)).arr[0];
+    int const x_158 = (*(tint_symbol_9)).arr[0];
     grey = (0.5f + (float(x_158) / 10.0f));
   } else {
-    float const x_163 = (*(tint_symbol_13)).y;
+    float const x_163 = (*(tint_symbol_11)).y;
     if ((int(x_163) < 60)) {
-      int const x_170 = (*(tint_symbol_11)).arr[1];
+      int const x_170 = (*(tint_symbol_9)).arr[1];
       grey = (0.5f + (float(x_170) / 10.0f));
     } else {
-      float const x_175 = (*(tint_symbol_13)).y;
+      float const x_175 = (*(tint_symbol_11)).y;
       if ((int(x_175) < 90)) {
-        int const x_182 = (*(tint_symbol_11)).arr[2];
+        int const x_182 = (*(tint_symbol_9)).arr[2];
         grey = (0.5f + (float(x_182) / 10.0f));
       } else {
-        float const x_187 = (*(tint_symbol_13)).y;
+        float const x_187 = (*(tint_symbol_11)).y;
         if ((int(x_187) < 120)) {
-          int const x_194 = (*(tint_symbol_11)).arr[3];
+          int const x_194 = (*(tint_symbol_9)).arr[3];
           grey = (0.5f + (float(x_194) / 10.0f));
         } else {
-          float const x_199 = (*(tint_symbol_13)).y;
+          float const x_199 = (*(tint_symbol_11)).y;
           if ((int(x_199) < 150)) {
             discard_fragment();
           } else {
-            float const x_206 = (*(tint_symbol_13)).y;
+            float const x_206 = (*(tint_symbol_11)).y;
             if ((int(x_206) < 180)) {
-              int const x_213 = (*(tint_symbol_11)).arr[5];
+              int const x_213 = (*(tint_symbol_9)).arr[5];
               grey = (0.5f + (float(x_213) / 10.0f));
             } else {
-              float const x_218 = (*(tint_symbol_13)).y;
+              float const x_218 = (*(tint_symbol_11)).y;
               if ((int(x_218) < 210)) {
-                int const x_225 = (*(tint_symbol_11)).arr[6];
+                int const x_225 = (*(tint_symbol_9)).arr[6];
                 grey = (0.5f + (float(x_225) / 10.0f));
               } else {
-                float const x_230 = (*(tint_symbol_13)).y;
+                float const x_230 = (*(tint_symbol_11)).y;
                 if ((int(x_230) < 240)) {
-                  int const x_237 = (*(tint_symbol_11)).arr[7];
+                  int const x_237 = (*(tint_symbol_9)).arr[7];
                   grey = (0.5f + (float(x_237) / 10.0f));
                 } else {
-                  float const x_242 = (*(tint_symbol_13)).y;
+                  float const x_242 = (*(tint_symbol_11)).y;
                   if ((int(x_242) < 270)) {
-                    int const x_249 = (*(tint_symbol_11)).arr[8];
+                    int const x_249 = (*(tint_symbol_9)).arr[8];
                     grey = (0.5f + (float(x_249) / 10.0f));
                   } else {
                     discard_fragment();
@@ -330,19 +330,25 @@
   }
   float const x_253 = grey;
   float3 const x_254 = float3(x_253, x_253, x_253);
-  *(tint_symbol_14) = float4(x_254.x, x_254.y, x_254.z, 1.0f);
+  *(tint_symbol_12) = float4(x_254.x, x_254.y, x_254.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_15 = 0.0f;
-  thread tint_array_wrapper tint_symbol_16 = {};
-  thread tint_array_wrapper tint_symbol_17 = {};
-  thread float4 tint_symbol_18 = 0.0f;
-  tint_symbol_15 = gl_FragCoord_param;
-  main_1(x_34, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_15), &(tint_symbol_18));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_18};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_13, thread tint_array_wrapper* const tint_symbol_14, thread tint_array_wrapper* const tint_symbol_15, thread float4* const tint_symbol_16) {
+  *(tint_symbol_13) = gl_FragCoord_param;
+  main_1(x_34, tint_symbol_14, tint_symbol_15, tint_symbol_13, tint_symbol_16);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_16)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
+  thread float4 tint_symbol_17 = 0.0f;
+  thread tint_array_wrapper tint_symbol_18 = {};
+  thread tint_array_wrapper tint_symbol_19 = {};
+  thread float4 tint_symbol_20 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl
index 0f638e2..318b26f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl
@@ -339,11 +339,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl
index f04cff3..32f9395 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper temp = {};
   tint_array_wrapper data = {};
   float x_180 = 0.0f;
@@ -214,7 +214,7 @@
   float x_189 = 0.0f;
   float x_278 = 0.0f;
   float x_279_phi = 0.0f;
-  float const x_170 = (*(tint_symbol_5)).y;
+  float const x_170 = (*(tint_symbol_3)).y;
   x_171 = int(x_170);
   if ((x_171 < 30)) {
     int const x_177 = data.arr[0];
@@ -289,7 +289,7 @@
             float const x_251 = x_8.injectionSwitch.y;
             bool const x_252 = (x_62 > x_251);
             if (x_252) {
-              *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+              *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
             }
             x_256_phi = float2(1.0f, 1.0f);
             x_259_phi = 0;
@@ -335,17 +335,23 @@
     x_280_phi = x_279;
   }
   float const x_280 = x_280_phi;
-  *(tint_symbol_6) = float4(x_280, x_280, x_280, 1.0f);
+  *(tint_symbol_4) = float4(x_280, x_280, x_280, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl
index d8b974e..44ed754 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.hlsl
@@ -347,11 +347,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl
index 3236547..03ab298 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   tint_array_wrapper temp = {};
   tint_array_wrapper data = {};
   float x_180 = 0.0f;
@@ -214,7 +214,7 @@
   float x_189 = 0.0f;
   float x_278 = 0.0f;
   float x_279_phi = 0.0f;
-  float const x_170 = (*(tint_symbol_5)).y;
+  float const x_170 = (*(tint_symbol_3)).y;
   x_171 = int(x_170);
   if ((x_171 < 30)) {
     int const x_177 = data.arr[0];
@@ -289,7 +289,7 @@
             float const x_251 = x_8.injectionSwitch.y;
             bool const x_252 = (x_62 > x_251);
             if (x_252) {
-              *(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+              *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
             }
             x_256_phi = float2(1.0f, 1.0f);
             x_259_phi = 0;
@@ -335,17 +335,23 @@
     x_280_phi = x_279;
   }
   float const x_280 = x_280_phi;
-  *(tint_symbol_6) = float4(x_280, x_280, x_280, 1.0f);
+  *(tint_symbol_4) = float4(x_280, x_280, x_280, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl
index a730b99..3f27cea 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl
@@ -260,11 +260,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl
index ad39028..8a37795 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_278 = i;
-    int const x_280 = (*(tint_symbol_5)).arr[x_278];
+    int const x_280 = (*(tint_symbol_3)).arr[x_278];
     int const x_281 = j;
-    int const x_283 = (*(tint_symbol_5)).arr[x_281];
+    int const x_283 = (*(tint_symbol_3)).arr[x_281];
     if ((x_280 < x_283)) {
       int const x_288 = k;
       k = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
       int const x_290 = i;
       i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
-      int const x_293 = (*(tint_symbol_5)).arr[x_290];
-      (*(tint_symbol_6)).arr[x_288] = x_293;
+      int const x_293 = (*(tint_symbol_3)).arr[x_290];
+      (*(tint_symbol_4)).arr[x_288] = x_293;
     } else {
       int const x_295 = k;
       k = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
       int const x_297 = j;
       j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
-      int const x_300 = (*(tint_symbol_5)).arr[x_297];
-      (*(tint_symbol_6)).arr[x_295] = x_300;
+      int const x_300 = (*(tint_symbol_3)).arr[x_297];
+      (*(tint_symbol_4)).arr[x_295] = x_300;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
     int const x_315 = i;
     i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
-    int const x_318 = (*(tint_symbol_5)).arr[x_315];
-    (*(tint_symbol_6)).arr[x_313] = x_318;
+    int const x_318 = (*(tint_symbol_3)).arr[x_315];
+    (*(tint_symbol_4)).arr[x_313] = x_318;
   }
   int const x_320 = *(from);
   i_1 = x_320;
@@ -80,8 +80,8 @@
     }
     int const x_329 = i_1;
     int const x_330 = i_1;
-    int const x_332 = (*(tint_symbol_6)).arr[x_330];
-    (*(tint_symbol_5)).arr[x_329] = x_332;
+    int const x_332 = (*(tint_symbol_4)).arr[x_330];
+    (*(tint_symbol_3)).arr[x_329] = x_332;
     {
       int const x_334 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -135,7 +135,7 @@
       param_1 = x_367;
       int const x_368 = to_1;
       param_2 = x_368;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_370 = m;
         int const x_372 = i_2;
@@ -150,7 +150,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -162,52 +162,52 @@
     switch(x_91) {
       case 9: {
         int const x_121 = i_3;
-        (*(tint_symbol_9)).arr[x_121] = -5;
+        (*(tint_symbol_7)).arr[x_121] = -5;
         break;
       }
       case 8: {
         int const x_119 = i_3;
-        (*(tint_symbol_9)).arr[x_119] = -4;
+        (*(tint_symbol_7)).arr[x_119] = -4;
         break;
       }
       case 7: {
         int const x_117 = i_3;
-        (*(tint_symbol_9)).arr[x_117] = -3;
+        (*(tint_symbol_7)).arr[x_117] = -3;
         break;
       }
       case 6: {
         int const x_115 = i_3;
-        (*(tint_symbol_9)).arr[x_115] = -2;
+        (*(tint_symbol_7)).arr[x_115] = -2;
         break;
       }
       case 5: {
         int const x_113 = i_3;
-        (*(tint_symbol_9)).arr[x_113] = -1;
+        (*(tint_symbol_7)).arr[x_113] = -1;
         break;
       }
       case 4: {
         int const x_111 = i_3;
-        (*(tint_symbol_9)).arr[x_111] = 0;
+        (*(tint_symbol_7)).arr[x_111] = 0;
         break;
       }
       case 3: {
         int const x_109 = i_3;
-        (*(tint_symbol_9)).arr[x_109] = 1;
+        (*(tint_symbol_7)).arr[x_109] = 1;
         break;
       }
       case 2: {
         int const x_107 = i_3;
-        (*(tint_symbol_9)).arr[x_107] = 2;
+        (*(tint_symbol_7)).arr[x_107] = 2;
         break;
       }
       case 1: {
         int const x_105 = i_3;
-        (*(tint_symbol_9)).arr[x_105] = 3;
+        (*(tint_symbol_7)).arr[x_105] = 3;
         break;
       }
       case 0: {
         int const x_103 = i_3;
-        (*(tint_symbol_9)).arr[x_103] = 4;
+        (*(tint_symbol_7)).arr[x_103] = 4;
         break;
       }
       default: {
@@ -233,35 +233,35 @@
     }
     int const x_134 = j_1;
     int const x_135 = j_1;
-    int const x_137 = (*(tint_symbol_9)).arr[x_135];
-    (*(tint_symbol_10)).arr[x_134] = x_137;
+    int const x_137 = (*(tint_symbol_7)).arr[x_135];
+    (*(tint_symbol_8)).arr[x_134] = x_137;
     {
       int const x_139 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_143 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_143 = (*(tint_symbol_9)).y;
   if ((int(x_143) < 30)) {
-    int const x_150 = (*(tint_symbol_9)).arr[0];
+    int const x_150 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_150) / 10.0f));
   } else {
-    float const x_155 = (*(tint_symbol_11)).y;
+    float const x_155 = (*(tint_symbol_9)).y;
     if ((int(x_155) < 60)) {
-      int const x_162 = (*(tint_symbol_9)).arr[1];
+      int const x_162 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_162) / 10.0f));
     } else {
-      float const x_167 = (*(tint_symbol_11)).y;
+      float const x_167 = (*(tint_symbol_9)).y;
       if ((int(x_167) < 90)) {
-        int const x_174 = (*(tint_symbol_9)).arr[2];
+        int const x_174 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_174) / 10.0f));
       } else {
-        float const x_179 = (*(tint_symbol_11)).y;
+        float const x_179 = (*(tint_symbol_9)).y;
         if ((int(x_179) < 120)) {
-          int const x_186 = (*(tint_symbol_9)).arr[3];
+          int const x_186 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_186) / 10.0f));
         } else {
-          float const x_191 = (*(tint_symbol_11)).y;
+          float const x_191 = (*(tint_symbol_9)).y;
           if ((int(x_191) < 150)) {
             int_i = 1;
             while (true) {
@@ -274,24 +274,24 @@
               discard_fragment();
             }
           } else {
-            float const x_208 = (*(tint_symbol_11)).y;
+            float const x_208 = (*(tint_symbol_9)).y;
             if ((int(x_208) < 180)) {
-              int const x_215 = (*(tint_symbol_9)).arr[5];
+              int const x_215 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_215) / 10.0f));
             } else {
-              float const x_220 = (*(tint_symbol_11)).y;
+              float const x_220 = (*(tint_symbol_9)).y;
               if ((int(x_220) < 210)) {
-                int const x_227 = (*(tint_symbol_9)).arr[6];
+                int const x_227 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_227) / 10.0f));
               } else {
-                float const x_232 = (*(tint_symbol_11)).y;
+                float const x_232 = (*(tint_symbol_9)).y;
                 if ((int(x_232) < 240)) {
-                  int const x_239 = (*(tint_symbol_9)).arr[7];
+                  int const x_239 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_239) / 10.0f));
                 } else {
-                  float const x_244 = (*(tint_symbol_11)).y;
+                  float const x_244 = (*(tint_symbol_9)).y;
                   if ((int(x_244) < 270)) {
-                    int const x_251 = (*(tint_symbol_9)).arr[8];
+                    int const x_251 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_251) / 10.0f));
                   } else {
                     discard_fragment();
@@ -306,19 +306,25 @@
   }
   float const x_255 = grey;
   float3 const x_256 = float3(x_255, x_255, x_255);
-  *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
+  *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl
index 347df10..a889d31 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.hlsl
@@ -268,11 +268,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl
index ba34077..c325cff 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
+void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* const to, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4) {
   int k = 0;
   int i = 0;
   int j = 0;
@@ -35,23 +35,23 @@
       break;
     }
     int const x_278 = i;
-    int const x_280 = (*(tint_symbol_5)).arr[x_278];
+    int const x_280 = (*(tint_symbol_3)).arr[x_278];
     int const x_281 = j;
-    int const x_283 = (*(tint_symbol_5)).arr[x_281];
+    int const x_283 = (*(tint_symbol_3)).arr[x_281];
     if ((x_280 < x_283)) {
       int const x_288 = k;
       k = as_type<int>((as_type<uint>(x_288) + as_type<uint>(1)));
       int const x_290 = i;
       i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
-      int const x_293 = (*(tint_symbol_5)).arr[x_290];
-      (*(tint_symbol_6)).arr[x_288] = x_293;
+      int const x_293 = (*(tint_symbol_3)).arr[x_290];
+      (*(tint_symbol_4)).arr[x_288] = x_293;
     } else {
       int const x_295 = k;
       k = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
       int const x_297 = j;
       j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
-      int const x_300 = (*(tint_symbol_5)).arr[x_297];
-      (*(tint_symbol_6)).arr[x_295] = x_300;
+      int const x_300 = (*(tint_symbol_3)).arr[x_297];
+      (*(tint_symbol_4)).arr[x_295] = x_300;
     }
   }
   while (true) {
@@ -66,8 +66,8 @@
     k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
     int const x_315 = i;
     i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
-    int const x_318 = (*(tint_symbol_5)).arr[x_315];
-    (*(tint_symbol_6)).arr[x_313] = x_318;
+    int const x_318 = (*(tint_symbol_3)).arr[x_315];
+    (*(tint_symbol_4)).arr[x_313] = x_318;
   }
   int const x_320 = *(from);
   i_1 = x_320;
@@ -80,8 +80,8 @@
     }
     int const x_329 = i_1;
     int const x_330 = i_1;
-    int const x_332 = (*(tint_symbol_6)).arr[x_330];
-    (*(tint_symbol_5)).arr[x_329] = x_332;
+    int const x_332 = (*(tint_symbol_4)).arr[x_330];
+    (*(tint_symbol_3)).arr[x_329] = x_332;
     {
       int const x_334 = i_1;
       i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
@@ -90,7 +90,7 @@
   return;
 }
 
-void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8) {
+void mergeSort_(thread tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper* const tint_symbol_6) {
   int low = 0;
   int high = 0;
   int m = 0;
@@ -135,7 +135,7 @@
       param_1 = x_367;
       int const x_368 = to_1;
       param_2 = x_368;
-      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_7, tint_symbol_8);
+      merge_i1_i1_i1_(&(param), &(param_1), &(param_2), tint_symbol_5, tint_symbol_6);
       {
         int const x_370 = m;
         int const x_372 = i_2;
@@ -150,7 +150,7 @@
   return;
 }
 
-void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, thread tint_array_wrapper* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
+void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int i_3 = 0;
   int j_1 = 0;
   float grey = 0.0f;
@@ -162,52 +162,52 @@
     switch(x_91) {
       case 9: {
         int const x_121 = i_3;
-        (*(tint_symbol_9)).arr[x_121] = -5;
+        (*(tint_symbol_7)).arr[x_121] = -5;
         break;
       }
       case 8: {
         int const x_119 = i_3;
-        (*(tint_symbol_9)).arr[x_119] = -4;
+        (*(tint_symbol_7)).arr[x_119] = -4;
         break;
       }
       case 7: {
         int const x_117 = i_3;
-        (*(tint_symbol_9)).arr[x_117] = -3;
+        (*(tint_symbol_7)).arr[x_117] = -3;
         break;
       }
       case 6: {
         int const x_115 = i_3;
-        (*(tint_symbol_9)).arr[x_115] = -2;
+        (*(tint_symbol_7)).arr[x_115] = -2;
         break;
       }
       case 5: {
         int const x_113 = i_3;
-        (*(tint_symbol_9)).arr[x_113] = -1;
+        (*(tint_symbol_7)).arr[x_113] = -1;
         break;
       }
       case 4: {
         int const x_111 = i_3;
-        (*(tint_symbol_9)).arr[x_111] = 0;
+        (*(tint_symbol_7)).arr[x_111] = 0;
         break;
       }
       case 3: {
         int const x_109 = i_3;
-        (*(tint_symbol_9)).arr[x_109] = 1;
+        (*(tint_symbol_7)).arr[x_109] = 1;
         break;
       }
       case 2: {
         int const x_107 = i_3;
-        (*(tint_symbol_9)).arr[x_107] = 2;
+        (*(tint_symbol_7)).arr[x_107] = 2;
         break;
       }
       case 1: {
         int const x_105 = i_3;
-        (*(tint_symbol_9)).arr[x_105] = 3;
+        (*(tint_symbol_7)).arr[x_105] = 3;
         break;
       }
       case 0: {
         int const x_103 = i_3;
-        (*(tint_symbol_9)).arr[x_103] = 4;
+        (*(tint_symbol_7)).arr[x_103] = 4;
         break;
       }
       default: {
@@ -233,35 +233,35 @@
     }
     int const x_134 = j_1;
     int const x_135 = j_1;
-    int const x_137 = (*(tint_symbol_9)).arr[x_135];
-    (*(tint_symbol_10)).arr[x_134] = x_137;
+    int const x_137 = (*(tint_symbol_7)).arr[x_135];
+    (*(tint_symbol_8)).arr[x_134] = x_137;
     {
       int const x_139 = j_1;
       j_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
     }
   }
-  mergeSort_(tint_symbol_9, tint_symbol_10);
-  float const x_143 = (*(tint_symbol_11)).y;
+  mergeSort_(tint_symbol_7, tint_symbol_8);
+  float const x_143 = (*(tint_symbol_9)).y;
   if ((int(x_143) < 30)) {
-    int const x_150 = (*(tint_symbol_9)).arr[0];
+    int const x_150 = (*(tint_symbol_7)).arr[0];
     grey = (0.5f + (float(x_150) / 10.0f));
   } else {
-    float const x_155 = (*(tint_symbol_11)).y;
+    float const x_155 = (*(tint_symbol_9)).y;
     if ((int(x_155) < 60)) {
-      int const x_162 = (*(tint_symbol_9)).arr[1];
+      int const x_162 = (*(tint_symbol_7)).arr[1];
       grey = (0.5f + (float(x_162) / 10.0f));
     } else {
-      float const x_167 = (*(tint_symbol_11)).y;
+      float const x_167 = (*(tint_symbol_9)).y;
       if ((int(x_167) < 90)) {
-        int const x_174 = (*(tint_symbol_9)).arr[2];
+        int const x_174 = (*(tint_symbol_7)).arr[2];
         grey = (0.5f + (float(x_174) / 10.0f));
       } else {
-        float const x_179 = (*(tint_symbol_11)).y;
+        float const x_179 = (*(tint_symbol_9)).y;
         if ((int(x_179) < 120)) {
-          int const x_186 = (*(tint_symbol_9)).arr[3];
+          int const x_186 = (*(tint_symbol_7)).arr[3];
           grey = (0.5f + (float(x_186) / 10.0f));
         } else {
-          float const x_191 = (*(tint_symbol_11)).y;
+          float const x_191 = (*(tint_symbol_9)).y;
           if ((int(x_191) < 150)) {
             int_i = 1;
             while (true) {
@@ -274,24 +274,24 @@
               discard_fragment();
             }
           } else {
-            float const x_208 = (*(tint_symbol_11)).y;
+            float const x_208 = (*(tint_symbol_9)).y;
             if ((int(x_208) < 180)) {
-              int const x_215 = (*(tint_symbol_9)).arr[5];
+              int const x_215 = (*(tint_symbol_7)).arr[5];
               grey = (0.5f + (float(x_215) / 10.0f));
             } else {
-              float const x_220 = (*(tint_symbol_11)).y;
+              float const x_220 = (*(tint_symbol_9)).y;
               if ((int(x_220) < 210)) {
-                int const x_227 = (*(tint_symbol_9)).arr[6];
+                int const x_227 = (*(tint_symbol_7)).arr[6];
                 grey = (0.5f + (float(x_227) / 10.0f));
               } else {
-                float const x_232 = (*(tint_symbol_11)).y;
+                float const x_232 = (*(tint_symbol_9)).y;
                 if ((int(x_232) < 240)) {
-                  int const x_239 = (*(tint_symbol_9)).arr[7];
+                  int const x_239 = (*(tint_symbol_7)).arr[7];
                   grey = (0.5f + (float(x_239) / 10.0f));
                 } else {
-                  float const x_244 = (*(tint_symbol_11)).y;
+                  float const x_244 = (*(tint_symbol_9)).y;
                   if ((int(x_244) < 270)) {
-                    int const x_251 = (*(tint_symbol_9)).arr[8];
+                    int const x_251 = (*(tint_symbol_7)).arr[8];
                     grey = (0.5f + (float(x_251) / 10.0f));
                   } else {
                     discard_fragment();
@@ -306,19 +306,25 @@
   }
   float const x_255 = grey;
   float3 const x_256 = float3(x_255, x_255, x_255);
-  *(tint_symbol_12) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
+  *(tint_symbol_10) = float4(x_256.x, x_256.y, x_256.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
-  thread float4 tint_symbol_13 = 0.0f;
-  thread tint_array_wrapper tint_symbol_14 = {};
-  thread tint_array_wrapper tint_symbol_15 = {};
-  thread float4 tint_symbol_16 = 0.0f;
-  tint_symbol_13 = gl_FragCoord_param;
-  main_1(x_28, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_13), &(tint_symbol_16));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_16};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_28, float4 gl_FragCoord_param, thread float4* const tint_symbol_11, thread tint_array_wrapper* const tint_symbol_12, thread tint_array_wrapper* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_11) = gl_FragCoord_param;
+  main_1(x_28, tint_symbol_12, tint_symbol_13, tint_symbol_11, tint_symbol_14);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_14)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_28 [[buffer(0)]]) {
+  thread float4 tint_symbol_15 = 0.0f;
+  thread tint_array_wrapper tint_symbol_16 = {};
+  thread tint_array_wrapper tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_28, gl_FragCoord_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl
index fe68f09..02e660f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl
@@ -13,26 +13,26 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_230 = *(i);
-  int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230];
+  int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230];
   temp = x_232;
   int const x_233 = *(i);
   int const x_234 = *(j);
-  int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234];
-  (*(tint_symbol_5)).numbers.arr[x_233] = x_236;
+  int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234];
+  (*(tint_symbol_3)).numbers.arr[x_233] = x_236;
   int const x_238 = *(j);
   int const x_239 = temp;
-  (*(tint_symbol_5)).numbers.arr[x_238] = x_239;
+  (*(tint_symbol_3)).numbers.arr[x_238] = x_239;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_242 = *(h);
-  int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242];
+  int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242];
   pivot = x_244;
   int const x_245 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_245) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_257 = j_1;
-    int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257];
+    int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257];
     int const x_260 = pivot;
     if ((x_259 <= x_260)) {
       int const x_264 = i_1;
@@ -64,7 +64,7 @@
       param = x_266;
       int const x_267 = j_1;
       param_1 = x_267;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_4);
     }
     {
       int const x_269 = j_1;
@@ -77,12 +77,12 @@
   param_2 = x_273;
   int const x_274 = *(h);
   param_3 = x_274;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4);
   int const x_276 = i_1;
   return x_276;
 }
 
-void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread float4* const tint_symbol_5, thread QuicksortObject* const tint_symbol_6) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -102,7 +102,7 @@
   top = x_281;
   int const x_282 = l_1;
   stack.arr[x_281] = x_282;
-  float const x_285 = (*(tint_symbol_7)).y;
+  float const x_285 = (*(tint_symbol_5)).y;
   if ((x_285 >= 0.0f)) {
     int const x_290 = h_1;
     if (false) {
@@ -145,7 +145,7 @@
     param_4 = x_323;
     int const x_324 = h_1;
     param_5 = x_324;
-    int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6);
     p = x_325;
     int const x_326 = p;
     int const x_328 = l_1;
@@ -179,7 +179,7 @@
   return;
 }
 
-void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
@@ -192,89 +192,95 @@
     }
     int const x_93 = i_2;
     int const x_94 = i_2;
-    (*(tint_symbol_9)).numbers.arr[x_93] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_94)));
+    (*(tint_symbol_7)).numbers.arr[x_93] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_94)));
     int const x_97 = i_2;
     int const x_98 = i_2;
-    int const x_100 = (*(tint_symbol_9)).numbers.arr[x_98];
+    int const x_100 = (*(tint_symbol_7)).numbers.arr[x_98];
     int const x_101 = i_2;
-    int const x_103 = (*(tint_symbol_9)).numbers.arr[x_101];
-    (*(tint_symbol_9)).numbers.arr[x_97] = as_type<int>((as_type<uint>(x_100) * as_type<uint>(x_103)));
+    int const x_103 = (*(tint_symbol_7)).numbers.arr[x_101];
+    (*(tint_symbol_7)).numbers.arr[x_97] = as_type<int>((as_type<uint>(x_100) * as_type<uint>(x_103)));
     {
       int const x_106 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_10, tint_symbol_9);
-  float4 const x_109 = *(tint_symbol_10);
+  quicksort_(tint_symbol_8, tint_symbol_7);
+  float4 const x_109 = *(tint_symbol_8);
   float2 const x_112 = x_34.resolution;
   uv = (float2(x_109.x, x_109.y) / x_112);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_115 = (*(tint_symbol_9)).numbers.arr[0];
+  int const x_115 = (*(tint_symbol_7)).numbers.arr[0];
   float const x_118 = color.x;
   color.x = (x_118 + float(x_115));
   float const x_122 = uv.x;
   if ((x_122 > 0.25f)) {
-    int const x_127 = (*(tint_symbol_9)).numbers.arr[1];
+    int const x_127 = (*(tint_symbol_7)).numbers.arr[1];
     float const x_130 = color.x;
     color.x = (x_130 + float(x_127));
   }
   float const x_134 = uv.x;
   if ((x_134 > 0.5f)) {
-    int const x_139 = (*(tint_symbol_9)).numbers.arr[2];
+    int const x_139 = (*(tint_symbol_7)).numbers.arr[2];
     float const x_142 = color.y;
     color.y = (x_142 + float(x_139));
   }
   float const x_146 = uv.x;
   if ((x_146 > 0.75f)) {
-    int const x_151 = (*(tint_symbol_9)).numbers.arr[3];
+    int const x_151 = (*(tint_symbol_7)).numbers.arr[3];
     float const x_154 = color.z;
     color.z = (x_154 + float(x_151));
   }
-  int const x_158 = (*(tint_symbol_9)).numbers.arr[4];
+  int const x_158 = (*(tint_symbol_7)).numbers.arr[4];
   float const x_161 = color.y;
   color.y = (x_161 + float(x_158));
   float const x_165 = uv.y;
   if ((x_165 > 0.25f)) {
-    int const x_170 = (*(tint_symbol_9)).numbers.arr[5];
+    int const x_170 = (*(tint_symbol_7)).numbers.arr[5];
     float const x_173 = color.x;
     color.x = (x_173 + float(x_170));
   }
   float const x_177 = uv.y;
   if ((x_177 > 0.5f)) {
-    int const x_182 = (*(tint_symbol_9)).numbers.arr[6];
+    int const x_182 = (*(tint_symbol_7)).numbers.arr[6];
     float const x_185 = color.y;
     color.y = (x_185 + float(x_182));
   }
   float const x_189 = uv.y;
   if ((x_189 > 0.75f)) {
-    int const x_194 = (*(tint_symbol_9)).numbers.arr[7];
+    int const x_194 = (*(tint_symbol_7)).numbers.arr[7];
     float const x_197 = color.z;
     color.z = (x_197 + float(x_194));
   }
-  int const x_201 = (*(tint_symbol_9)).numbers.arr[8];
+  int const x_201 = (*(tint_symbol_7)).numbers.arr[8];
   float const x_204 = color.z;
   color.z = (x_204 + float(x_201));
   float const x_208 = uv.x;
   float const x_210 = uv.y;
   if ((fabs((x_208 - x_210)) < 0.25f)) {
-    int const x_217 = (*(tint_symbol_9)).numbers.arr[9];
+    int const x_217 = (*(tint_symbol_7)).numbers.arr[9];
     float const x_220 = color.x;
     color.x = (x_220 + float(x_217));
   }
   float3 const x_223 = color;
   float3 const x_224 = normalize(x_223);
-  *(tint_symbol_11) = float4(x_224.x, x_224.y, x_224.z, 1.0f);
+  *(tint_symbol_9) = float4(x_224.x, x_224.y, x_224.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread QuicksortObject tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_34, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_34, tint_symbol_11, tint_symbol_10, tint_symbol_12);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread QuicksortObject tint_symbol_14 = {};
+  thread float4 tint_symbol_15 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl
index fe68f09..02e660f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl
@@ -13,26 +13,26 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_3) {
   int temp = 0;
   int const x_230 = *(i);
-  int const x_232 = (*(tint_symbol_5)).numbers.arr[x_230];
+  int const x_232 = (*(tint_symbol_3)).numbers.arr[x_230];
   temp = x_232;
   int const x_233 = *(i);
   int const x_234 = *(j);
-  int const x_236 = (*(tint_symbol_5)).numbers.arr[x_234];
-  (*(tint_symbol_5)).numbers.arr[x_233] = x_236;
+  int const x_236 = (*(tint_symbol_3)).numbers.arr[x_234];
+  (*(tint_symbol_3)).numbers.arr[x_233] = x_236;
   int const x_238 = *(j);
   int const x_239 = temp;
-  (*(tint_symbol_5)).numbers.arr[x_238] = x_239;
+  (*(tint_symbol_3)).numbers.arr[x_238] = x_239;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_4) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -41,7 +41,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_242 = *(h);
-  int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242];
+  int const x_244 = (*(tint_symbol_4)).numbers.arr[x_242];
   pivot = x_244;
   int const x_245 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_245) - as_type<uint>(1)));
@@ -55,7 +55,7 @@
       break;
     }
     int const x_257 = j_1;
-    int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257];
+    int const x_259 = (*(tint_symbol_4)).numbers.arr[x_257];
     int const x_260 = pivot;
     if ((x_259 <= x_260)) {
       int const x_264 = i_1;
@@ -64,7 +64,7 @@
       param = x_266;
       int const x_267 = j_1;
       param_1 = x_267;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_4);
     }
     {
       int const x_269 = j_1;
@@ -77,12 +77,12 @@
   param_2 = x_273;
   int const x_274 = *(h);
   param_3 = x_274;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_4);
   int const x_276 = i_1;
   return x_276;
 }
 
-void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread float4* const tint_symbol_5, thread QuicksortObject* const tint_symbol_6) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -102,7 +102,7 @@
   top = x_281;
   int const x_282 = l_1;
   stack.arr[x_281] = x_282;
-  float const x_285 = (*(tint_symbol_7)).y;
+  float const x_285 = (*(tint_symbol_5)).y;
   if ((x_285 >= 0.0f)) {
     int const x_290 = h_1;
     if (false) {
@@ -145,7 +145,7 @@
     param_4 = x_323;
     int const x_324 = h_1;
     param_5 = x_324;
-    int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_325 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_6);
     p = x_325;
     int const x_326 = p;
     int const x_328 = l_1;
@@ -179,7 +179,7 @@
   return;
 }
 
-void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
@@ -192,89 +192,95 @@
     }
     int const x_93 = i_2;
     int const x_94 = i_2;
-    (*(tint_symbol_9)).numbers.arr[x_93] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_94)));
+    (*(tint_symbol_7)).numbers.arr[x_93] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_94)));
     int const x_97 = i_2;
     int const x_98 = i_2;
-    int const x_100 = (*(tint_symbol_9)).numbers.arr[x_98];
+    int const x_100 = (*(tint_symbol_7)).numbers.arr[x_98];
     int const x_101 = i_2;
-    int const x_103 = (*(tint_symbol_9)).numbers.arr[x_101];
-    (*(tint_symbol_9)).numbers.arr[x_97] = as_type<int>((as_type<uint>(x_100) * as_type<uint>(x_103)));
+    int const x_103 = (*(tint_symbol_7)).numbers.arr[x_101];
+    (*(tint_symbol_7)).numbers.arr[x_97] = as_type<int>((as_type<uint>(x_100) * as_type<uint>(x_103)));
     {
       int const x_106 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_10, tint_symbol_9);
-  float4 const x_109 = *(tint_symbol_10);
+  quicksort_(tint_symbol_8, tint_symbol_7);
+  float4 const x_109 = *(tint_symbol_8);
   float2 const x_112 = x_34.resolution;
   uv = (float2(x_109.x, x_109.y) / x_112);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_115 = (*(tint_symbol_9)).numbers.arr[0];
+  int const x_115 = (*(tint_symbol_7)).numbers.arr[0];
   float const x_118 = color.x;
   color.x = (x_118 + float(x_115));
   float const x_122 = uv.x;
   if ((x_122 > 0.25f)) {
-    int const x_127 = (*(tint_symbol_9)).numbers.arr[1];
+    int const x_127 = (*(tint_symbol_7)).numbers.arr[1];
     float const x_130 = color.x;
     color.x = (x_130 + float(x_127));
   }
   float const x_134 = uv.x;
   if ((x_134 > 0.5f)) {
-    int const x_139 = (*(tint_symbol_9)).numbers.arr[2];
+    int const x_139 = (*(tint_symbol_7)).numbers.arr[2];
     float const x_142 = color.y;
     color.y = (x_142 + float(x_139));
   }
   float const x_146 = uv.x;
   if ((x_146 > 0.75f)) {
-    int const x_151 = (*(tint_symbol_9)).numbers.arr[3];
+    int const x_151 = (*(tint_symbol_7)).numbers.arr[3];
     float const x_154 = color.z;
     color.z = (x_154 + float(x_151));
   }
-  int const x_158 = (*(tint_symbol_9)).numbers.arr[4];
+  int const x_158 = (*(tint_symbol_7)).numbers.arr[4];
   float const x_161 = color.y;
   color.y = (x_161 + float(x_158));
   float const x_165 = uv.y;
   if ((x_165 > 0.25f)) {
-    int const x_170 = (*(tint_symbol_9)).numbers.arr[5];
+    int const x_170 = (*(tint_symbol_7)).numbers.arr[5];
     float const x_173 = color.x;
     color.x = (x_173 + float(x_170));
   }
   float const x_177 = uv.y;
   if ((x_177 > 0.5f)) {
-    int const x_182 = (*(tint_symbol_9)).numbers.arr[6];
+    int const x_182 = (*(tint_symbol_7)).numbers.arr[6];
     float const x_185 = color.y;
     color.y = (x_185 + float(x_182));
   }
   float const x_189 = uv.y;
   if ((x_189 > 0.75f)) {
-    int const x_194 = (*(tint_symbol_9)).numbers.arr[7];
+    int const x_194 = (*(tint_symbol_7)).numbers.arr[7];
     float const x_197 = color.z;
     color.z = (x_197 + float(x_194));
   }
-  int const x_201 = (*(tint_symbol_9)).numbers.arr[8];
+  int const x_201 = (*(tint_symbol_7)).numbers.arr[8];
   float const x_204 = color.z;
   color.z = (x_204 + float(x_201));
   float const x_208 = uv.x;
   float const x_210 = uv.y;
   if ((fabs((x_208 - x_210)) < 0.25f)) {
-    int const x_217 = (*(tint_symbol_9)).numbers.arr[9];
+    int const x_217 = (*(tint_symbol_7)).numbers.arr[9];
     float const x_220 = color.x;
     color.x = (x_220 + float(x_217));
   }
   float3 const x_223 = color;
   float3 const x_224 = normalize(x_223);
-  *(tint_symbol_11) = float4(x_224.x, x_224.y, x_224.z, 1.0f);
+  *(tint_symbol_9) = float4(x_224.x, x_224.y, x_224.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread QuicksortObject tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_34, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_34, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_34, tint_symbol_11, tint_symbol_10, tint_symbol_12);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_34 [[buffer(0)]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread QuicksortObject tint_symbol_14 = {};
+  thread float4 tint_symbol_15 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl
index a320629..d58db35 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.hlsl
@@ -209,11 +209,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {frag_color, gl_Position};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl
index ea7fc7a..3eeabc0 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl
@@ -22,22 +22,22 @@
   float4 gl_Position [[position]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
   int temp = 0;
   int const x_239 = *(i);
-  int const x_241 = (*(tint_symbol_6)).numbers.arr[x_239];
+  int const x_241 = (*(tint_symbol_5)).numbers.arr[x_239];
   temp = x_241;
   int const x_242 = *(i);
   int const x_243 = *(j);
-  int const x_245 = (*(tint_symbol_6)).numbers.arr[x_243];
-  (*(tint_symbol_6)).numbers.arr[x_242] = x_245;
+  int const x_245 = (*(tint_symbol_5)).numbers.arr[x_243];
+  (*(tint_symbol_5)).numbers.arr[x_242] = x_245;
   int const x_247 = *(j);
   int const x_248 = temp;
-  (*(tint_symbol_6)).numbers.arr[x_247] = x_248;
+  (*(tint_symbol_5)).numbers.arr[x_247] = x_248;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -46,7 +46,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_251 = *(h);
-  int const x_253 = (*(tint_symbol_7)).numbers.arr[x_251];
+  int const x_253 = (*(tint_symbol_6)).numbers.arr[x_251];
   pivot = x_253;
   int const x_254 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)));
@@ -60,7 +60,7 @@
       break;
     }
     int const x_266 = j_1;
-    int const x_268 = (*(tint_symbol_7)).numbers.arr[x_266];
+    int const x_268 = (*(tint_symbol_6)).numbers.arr[x_266];
     int const x_269 = pivot;
     if ((x_268 <= x_269)) {
       int const x_273 = i_1;
@@ -69,7 +69,7 @@
       param = x_275;
       int const x_276 = j_1;
       param_1 = x_276;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_7);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
     }
     {
       int const x_278 = j_1;
@@ -80,12 +80,12 @@
   param_2 = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
   int const x_282 = *(h);
   param_3 = x_282;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
   int const x_284 = i_1;
   return as_type<int>((as_type<uint>(x_284) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread QuicksortObject* const tint_symbol_7) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -124,7 +124,7 @@
     param_4 = x_310;
     int const x_311 = h_1;
     param_5 = x_311;
-    int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
     p = x_312;
     int const x_313 = p;
     int const x_315 = l_1;
@@ -158,12 +158,12 @@
   return;
 }
 
-void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) {
+void main_1(constant buf0& x_34, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_90 = *(tint_symbol_9);
-  *(tint_symbol_10) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_90 = *(tint_symbol_8);
+  *(tint_symbol_9) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_97 = i_2;
@@ -173,94 +173,100 @@
     }
     int const x_100 = i_2;
     int const x_101 = i_2;
-    (*(tint_symbol_11)).numbers.arr[x_100] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_101)));
+    (*(tint_symbol_10)).numbers.arr[x_100] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_101)));
     int const x_104 = i_2;
     int const x_105 = i_2;
-    int const x_107 = (*(tint_symbol_11)).numbers.arr[x_105];
+    int const x_107 = (*(tint_symbol_10)).numbers.arr[x_105];
     int const x_108 = i_2;
-    int const x_110 = (*(tint_symbol_11)).numbers.arr[x_108];
-    (*(tint_symbol_11)).numbers.arr[x_104] = as_type<int>((as_type<uint>(x_107) * as_type<uint>(x_110)));
+    int const x_110 = (*(tint_symbol_10)).numbers.arr[x_108];
+    (*(tint_symbol_10)).numbers.arr[x_104] = as_type<int>((as_type<uint>(x_107) * as_type<uint>(x_110)));
     {
       int const x_113 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_11);
-  float4 const x_116 = *(tint_symbol_10);
+  quicksort_(tint_symbol_10);
+  float4 const x_116 = *(tint_symbol_9);
   float2 const x_119 = x_34.resolution;
   uv = (float2(x_116.x, x_116.y) / x_119);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_122 = (*(tint_symbol_11)).numbers.arr[0];
+  int const x_122 = (*(tint_symbol_10)).numbers.arr[0];
   float const x_125 = color.x;
   color.x = (x_125 + float(x_122));
   float const x_129 = uv.x;
   if ((x_129 > 0.25f)) {
-    int const x_134 = (*(tint_symbol_11)).numbers.arr[1];
+    int const x_134 = (*(tint_symbol_10)).numbers.arr[1];
     float const x_137 = color.x;
     color.x = (x_137 + float(x_134));
   }
   float const x_141 = uv.x;
   if ((x_141 > 0.5f)) {
-    int const x_146 = (*(tint_symbol_11)).numbers.arr[2];
+    int const x_146 = (*(tint_symbol_10)).numbers.arr[2];
     float const x_149 = color.y;
     color.y = (x_149 + float(x_146));
   }
   float const x_153 = uv.x;
   if ((x_153 > 0.75f)) {
-    int const x_158 = (*(tint_symbol_11)).numbers.arr[3];
+    int const x_158 = (*(tint_symbol_10)).numbers.arr[3];
     float const x_161 = color.z;
     color.z = (x_161 + float(x_158));
   }
-  int const x_165 = (*(tint_symbol_11)).numbers.arr[4];
+  int const x_165 = (*(tint_symbol_10)).numbers.arr[4];
   float const x_168 = color.y;
   color.y = (x_168 + float(x_165));
   float const x_172 = uv.y;
   if ((x_172 > 0.25f)) {
-    int const x_177 = (*(tint_symbol_11)).numbers.arr[5];
+    int const x_177 = (*(tint_symbol_10)).numbers.arr[5];
     float const x_180 = color.x;
     color.x = (x_180 + float(x_177));
   }
   float const x_184 = uv.y;
   if ((x_184 > 0.5f)) {
-    int const x_189 = (*(tint_symbol_11)).numbers.arr[6];
+    int const x_189 = (*(tint_symbol_10)).numbers.arr[6];
     float const x_192 = color.y;
     color.y = (x_192 + float(x_189));
   }
   float const x_196 = uv.y;
   if ((x_196 > 0.75f)) {
-    int const x_201 = (*(tint_symbol_11)).numbers.arr[7];
+    int const x_201 = (*(tint_symbol_10)).numbers.arr[7];
     float const x_204 = color.z;
     color.z = (x_204 + float(x_201));
   }
-  int const x_208 = (*(tint_symbol_11)).numbers.arr[8];
+  int const x_208 = (*(tint_symbol_10)).numbers.arr[8];
   float const x_211 = color.z;
   color.z = (x_211 + float(x_208));
   float const x_215 = uv.x;
   float const x_217 = uv.y;
   if ((fabs((x_215 - x_217)) < 0.25f)) {
-    int const x_224 = (*(tint_symbol_11)).numbers.arr[9];
+    int const x_224 = (*(tint_symbol_10)).numbers.arr[9];
     float const x_227 = color.x;
     color.x = (x_227 + float(x_224));
   }
   float3 const x_230 = color;
   float3 const x_231 = normalize(x_230);
-  *(tint_symbol_12) = float4(x_231.x, x_231.y, x_231.z, 1.0f);
-  float4 const x_236 = *(tint_symbol_9);
-  *(tint_symbol_13) = x_236;
+  *(tint_symbol_11) = float4(x_231.x, x_231.y, x_231.z, 1.0f);
+  float4 const x_236 = *(tint_symbol_8);
+  *(tint_symbol_12) = x_236;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) {
+  *(tint_symbol_13) = x_GLF_pos_param;
+  main_1(x_34, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_14 = 0.0f;
-  thread float4 tint_symbol_15 = 0.0f;
-  thread QuicksortObject tint_symbol_16 = {};
-  thread float4 tint_symbol_17 = 0.0f;
   thread float4 tint_symbol_18 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_14 = x_GLF_pos_param;
-  main_1(x_34, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_19 = 0.0f;
+  thread QuicksortObject tint_symbol_20 = {};
+  thread float4 tint_symbol_21 = 0.0f;
+  thread float4 tint_symbol_22 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl
index a320629..d58db35 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.hlsl
@@ -209,11 +209,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {frag_color, gl_Position};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl
index ea7fc7a..3eeabc0 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl
@@ -22,22 +22,22 @@
   float4 gl_Position [[position]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
   int temp = 0;
   int const x_239 = *(i);
-  int const x_241 = (*(tint_symbol_6)).numbers.arr[x_239];
+  int const x_241 = (*(tint_symbol_5)).numbers.arr[x_239];
   temp = x_241;
   int const x_242 = *(i);
   int const x_243 = *(j);
-  int const x_245 = (*(tint_symbol_6)).numbers.arr[x_243];
-  (*(tint_symbol_6)).numbers.arr[x_242] = x_245;
+  int const x_245 = (*(tint_symbol_5)).numbers.arr[x_243];
+  (*(tint_symbol_5)).numbers.arr[x_242] = x_245;
   int const x_247 = *(j);
   int const x_248 = temp;
-  (*(tint_symbol_6)).numbers.arr[x_247] = x_248;
+  (*(tint_symbol_5)).numbers.arr[x_247] = x_248;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -46,7 +46,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_251 = *(h);
-  int const x_253 = (*(tint_symbol_7)).numbers.arr[x_251];
+  int const x_253 = (*(tint_symbol_6)).numbers.arr[x_251];
   pivot = x_253;
   int const x_254 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)));
@@ -60,7 +60,7 @@
       break;
     }
     int const x_266 = j_1;
-    int const x_268 = (*(tint_symbol_7)).numbers.arr[x_266];
+    int const x_268 = (*(tint_symbol_6)).numbers.arr[x_266];
     int const x_269 = pivot;
     if ((x_268 <= x_269)) {
       int const x_273 = i_1;
@@ -69,7 +69,7 @@
       param = x_275;
       int const x_276 = j_1;
       param_1 = x_276;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_7);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
     }
     {
       int const x_278 = j_1;
@@ -80,12 +80,12 @@
   param_2 = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
   int const x_282 = *(h);
   param_3 = x_282;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
   int const x_284 = i_1;
   return as_type<int>((as_type<uint>(x_284) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread QuicksortObject* const tint_symbol_7) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -124,7 +124,7 @@
     param_4 = x_310;
     int const x_311 = h_1;
     param_5 = x_311;
-    int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_312 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
     p = x_312;
     int const x_313 = p;
     int const x_315 = l_1;
@@ -158,12 +158,12 @@
   return;
 }
 
-void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) {
+void main_1(constant buf0& x_34, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_90 = *(tint_symbol_9);
-  *(tint_symbol_10) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_90 = *(tint_symbol_8);
+  *(tint_symbol_9) = ((x_90 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_97 = i_2;
@@ -173,94 +173,100 @@
     }
     int const x_100 = i_2;
     int const x_101 = i_2;
-    (*(tint_symbol_11)).numbers.arr[x_100] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_101)));
+    (*(tint_symbol_10)).numbers.arr[x_100] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_101)));
     int const x_104 = i_2;
     int const x_105 = i_2;
-    int const x_107 = (*(tint_symbol_11)).numbers.arr[x_105];
+    int const x_107 = (*(tint_symbol_10)).numbers.arr[x_105];
     int const x_108 = i_2;
-    int const x_110 = (*(tint_symbol_11)).numbers.arr[x_108];
-    (*(tint_symbol_11)).numbers.arr[x_104] = as_type<int>((as_type<uint>(x_107) * as_type<uint>(x_110)));
+    int const x_110 = (*(tint_symbol_10)).numbers.arr[x_108];
+    (*(tint_symbol_10)).numbers.arr[x_104] = as_type<int>((as_type<uint>(x_107) * as_type<uint>(x_110)));
     {
       int const x_113 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_11);
-  float4 const x_116 = *(tint_symbol_10);
+  quicksort_(tint_symbol_10);
+  float4 const x_116 = *(tint_symbol_9);
   float2 const x_119 = x_34.resolution;
   uv = (float2(x_116.x, x_116.y) / x_119);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_122 = (*(tint_symbol_11)).numbers.arr[0];
+  int const x_122 = (*(tint_symbol_10)).numbers.arr[0];
   float const x_125 = color.x;
   color.x = (x_125 + float(x_122));
   float const x_129 = uv.x;
   if ((x_129 > 0.25f)) {
-    int const x_134 = (*(tint_symbol_11)).numbers.arr[1];
+    int const x_134 = (*(tint_symbol_10)).numbers.arr[1];
     float const x_137 = color.x;
     color.x = (x_137 + float(x_134));
   }
   float const x_141 = uv.x;
   if ((x_141 > 0.5f)) {
-    int const x_146 = (*(tint_symbol_11)).numbers.arr[2];
+    int const x_146 = (*(tint_symbol_10)).numbers.arr[2];
     float const x_149 = color.y;
     color.y = (x_149 + float(x_146));
   }
   float const x_153 = uv.x;
   if ((x_153 > 0.75f)) {
-    int const x_158 = (*(tint_symbol_11)).numbers.arr[3];
+    int const x_158 = (*(tint_symbol_10)).numbers.arr[3];
     float const x_161 = color.z;
     color.z = (x_161 + float(x_158));
   }
-  int const x_165 = (*(tint_symbol_11)).numbers.arr[4];
+  int const x_165 = (*(tint_symbol_10)).numbers.arr[4];
   float const x_168 = color.y;
   color.y = (x_168 + float(x_165));
   float const x_172 = uv.y;
   if ((x_172 > 0.25f)) {
-    int const x_177 = (*(tint_symbol_11)).numbers.arr[5];
+    int const x_177 = (*(tint_symbol_10)).numbers.arr[5];
     float const x_180 = color.x;
     color.x = (x_180 + float(x_177));
   }
   float const x_184 = uv.y;
   if ((x_184 > 0.5f)) {
-    int const x_189 = (*(tint_symbol_11)).numbers.arr[6];
+    int const x_189 = (*(tint_symbol_10)).numbers.arr[6];
     float const x_192 = color.y;
     color.y = (x_192 + float(x_189));
   }
   float const x_196 = uv.y;
   if ((x_196 > 0.75f)) {
-    int const x_201 = (*(tint_symbol_11)).numbers.arr[7];
+    int const x_201 = (*(tint_symbol_10)).numbers.arr[7];
     float const x_204 = color.z;
     color.z = (x_204 + float(x_201));
   }
-  int const x_208 = (*(tint_symbol_11)).numbers.arr[8];
+  int const x_208 = (*(tint_symbol_10)).numbers.arr[8];
   float const x_211 = color.z;
   color.z = (x_211 + float(x_208));
   float const x_215 = uv.x;
   float const x_217 = uv.y;
   if ((fabs((x_215 - x_217)) < 0.25f)) {
-    int const x_224 = (*(tint_symbol_11)).numbers.arr[9];
+    int const x_224 = (*(tint_symbol_10)).numbers.arr[9];
     float const x_227 = color.x;
     color.x = (x_227 + float(x_224));
   }
   float3 const x_230 = color;
   float3 const x_231 = normalize(x_230);
-  *(tint_symbol_12) = float4(x_231.x, x_231.y, x_231.z, 1.0f);
-  float4 const x_236 = *(tint_symbol_9);
-  *(tint_symbol_13) = x_236;
+  *(tint_symbol_11) = float4(x_231.x, x_231.y, x_231.z, 1.0f);
+  float4 const x_236 = *(tint_symbol_8);
+  *(tint_symbol_12) = x_236;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) {
+  *(tint_symbol_13) = x_GLF_pos_param;
+  main_1(x_34, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_14 = 0.0f;
-  thread float4 tint_symbol_15 = 0.0f;
-  thread QuicksortObject tint_symbol_16 = {};
-  thread float4 tint_symbol_17 = 0.0f;
   thread float4 tint_symbol_18 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_14 = x_GLF_pos_param;
-  main_1(x_34, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_19 = 0.0f;
+  thread QuicksortObject tint_symbol_20 = {};
+  thread float4 tint_symbol_21 = 0.0f;
+  thread float4 tint_symbol_22 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl
index 266b98a..8dba20c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 frag_color_param = tint_symbol.frag_color_param;
+main_out main_inner(float4 frag_color_param) {
   frag_color = frag_color_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.frag_color_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl
index bd94fa8..c305a2b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.spvasm.expected.msl
@@ -11,20 +11,25 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_12 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_12;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_12 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_12;
   return;
 }
 
+main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = frag_color_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const frag_color_param = tint_symbol_1.frag_color_param;
-  tint_symbol_8 = frag_color_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_4.x_GLF_color_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl
index 266b98a..8dba20c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.hlsl
@@ -16,11 +16,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 frag_color_param = tint_symbol.frag_color_param;
+main_out main_inner(float4 frag_color_param) {
   frag_color = frag_color_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.frag_color_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl
index bd94fa8..c305a2b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl.expected.msl
@@ -11,20 +11,25 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_12 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_12;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_12 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_12;
   return;
 }
 
+main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = frag_color_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.x_GLF_color_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const frag_color_param = tint_symbol_1.frag_color_param;
-  tint_symbol_8 = frag_color_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_4.x_GLF_color_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl
index 865d472..3fa889c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl
@@ -25,22 +25,22 @@
   float4 gl_Position [[position]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
   int temp = 0;
   int const x_250 = *(i);
-  int const x_252 = (*(tint_symbol_6)).numbers.arr[x_250];
+  int const x_252 = (*(tint_symbol_5)).numbers.arr[x_250];
   temp = x_252;
   int const x_253 = *(i);
   int const x_254 = *(j);
-  int const x_256 = (*(tint_symbol_6)).numbers.arr[x_254];
-  (*(tint_symbol_6)).numbers.arr[x_253] = x_256;
+  int const x_256 = (*(tint_symbol_5)).numbers.arr[x_254];
+  (*(tint_symbol_5)).numbers.arr[x_253] = x_256;
   int const x_258 = *(j);
   int const x_259 = temp;
-  (*(tint_symbol_6)).numbers.arr[x_258] = x_259;
+  (*(tint_symbol_5)).numbers.arr[x_258] = x_259;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -49,7 +49,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_262 = *(h);
-  int const x_264 = (*(tint_symbol_7)).numbers.arr[x_262];
+  int const x_264 = (*(tint_symbol_6)).numbers.arr[x_262];
   pivot = x_264;
   int const x_265 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_265) - as_type<uint>(1)));
@@ -63,7 +63,7 @@
       break;
     }
     int const x_277 = j_1;
-    int const x_279 = (*(tint_symbol_7)).numbers.arr[x_277];
+    int const x_279 = (*(tint_symbol_6)).numbers.arr[x_277];
     int const x_280 = pivot;
     if ((x_279 <= x_280)) {
       int const x_284 = i_1;
@@ -72,7 +72,7 @@
       param = x_286;
       int const x_287 = j_1;
       param_1 = x_287;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_7);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
     }
     {
       int const x_289 = j_1;
@@ -83,12 +83,12 @@
   param_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
   int const x_293 = *(h);
   param_3 = x_293;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
   int const x_295 = i_1;
   return as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread QuicksortObject* const tint_symbol_7) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -127,7 +127,7 @@
     param_4 = x_321;
     int const x_322 = h_1;
     param_5 = x_322;
-    int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
     p = x_323;
     int const x_324 = p;
     int const x_326 = l_1;
@@ -161,12 +161,12 @@
   return;
 }
 
-void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) {
+void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_94 = *(tint_symbol_9);
-  *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_94 = *(tint_symbol_8);
+  *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_101 = i_2;
@@ -176,7 +176,7 @@
     }
     int const x_104 = i_2;
     int const x_105 = i_2;
-    (*(tint_symbol_11)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
+    (*(tint_symbol_10)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
     float const x_109 = x_33.injectionSwitch.x;
     float const x_111 = x_33.injectionSwitch.y;
     if ((x_109 > x_111)) {
@@ -184,91 +184,97 @@
     }
     int const x_115 = i_2;
     int const x_116 = i_2;
-    int const x_118 = (*(tint_symbol_11)).numbers.arr[x_116];
+    int const x_118 = (*(tint_symbol_10)).numbers.arr[x_116];
     int const x_119 = i_2;
-    int const x_121 = (*(tint_symbol_11)).numbers.arr[x_119];
-    (*(tint_symbol_11)).numbers.arr[x_115] = as_type<int>((as_type<uint>(x_118) * as_type<uint>(x_121)));
+    int const x_121 = (*(tint_symbol_10)).numbers.arr[x_119];
+    (*(tint_symbol_10)).numbers.arr[x_115] = as_type<int>((as_type<uint>(x_118) * as_type<uint>(x_121)));
     {
       int const x_124 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_11);
-  float4 const x_127 = *(tint_symbol_10);
+  quicksort_(tint_symbol_10);
+  float4 const x_127 = *(tint_symbol_9);
   float2 const x_130 = x_36.resolution;
   uv = (float2(x_127.x, x_127.y) / x_130);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_133 = (*(tint_symbol_11)).numbers.arr[0];
+  int const x_133 = (*(tint_symbol_10)).numbers.arr[0];
   float const x_136 = color.x;
   color.x = (x_136 + float(x_133));
   float const x_140 = uv.x;
   if ((x_140 > 0.25f)) {
-    int const x_145 = (*(tint_symbol_11)).numbers.arr[1];
+    int const x_145 = (*(tint_symbol_10)).numbers.arr[1];
     float const x_148 = color.x;
     color.x = (x_148 + float(x_145));
   }
   float const x_152 = uv.x;
   if ((x_152 > 0.5f)) {
-    int const x_157 = (*(tint_symbol_11)).numbers.arr[2];
+    int const x_157 = (*(tint_symbol_10)).numbers.arr[2];
     float const x_160 = color.y;
     color.y = (x_160 + float(x_157));
   }
   float const x_164 = uv.x;
   if ((x_164 > 0.75f)) {
-    int const x_169 = (*(tint_symbol_11)).numbers.arr[3];
+    int const x_169 = (*(tint_symbol_10)).numbers.arr[3];
     float const x_172 = color.z;
     color.z = (x_172 + float(x_169));
   }
-  int const x_176 = (*(tint_symbol_11)).numbers.arr[4];
+  int const x_176 = (*(tint_symbol_10)).numbers.arr[4];
   float const x_179 = color.y;
   color.y = (x_179 + float(x_176));
   float const x_183 = uv.y;
   if ((x_183 > 0.25f)) {
-    int const x_188 = (*(tint_symbol_11)).numbers.arr[5];
+    int const x_188 = (*(tint_symbol_10)).numbers.arr[5];
     float const x_191 = color.x;
     color.x = (x_191 + float(x_188));
   }
   float const x_195 = uv.y;
   if ((x_195 > 0.5f)) {
-    int const x_200 = (*(tint_symbol_11)).numbers.arr[6];
+    int const x_200 = (*(tint_symbol_10)).numbers.arr[6];
     float const x_203 = color.y;
     color.y = (x_203 + float(x_200));
   }
   float const x_207 = uv.y;
   if ((x_207 > 0.75f)) {
-    int const x_212 = (*(tint_symbol_11)).numbers.arr[7];
+    int const x_212 = (*(tint_symbol_10)).numbers.arr[7];
     float const x_215 = color.z;
     color.z = (x_215 + float(x_212));
   }
-  int const x_219 = (*(tint_symbol_11)).numbers.arr[8];
+  int const x_219 = (*(tint_symbol_10)).numbers.arr[8];
   float const x_222 = color.z;
   color.z = (x_222 + float(x_219));
   float const x_226 = uv.x;
   float const x_228 = uv.y;
   if ((fabs((x_226 - x_228)) < 0.25f)) {
-    int const x_235 = (*(tint_symbol_11)).numbers.arr[9];
+    int const x_235 = (*(tint_symbol_10)).numbers.arr[9];
     float const x_238 = color.x;
     color.x = (x_238 + float(x_235));
   }
   float3 const x_241 = color;
   float3 const x_242 = normalize(x_241);
-  *(tint_symbol_12) = float4(x_242.x, x_242.y, x_242.z, 1.0f);
-  float4 const x_247 = *(tint_symbol_9);
-  *(tint_symbol_13) = x_247;
+  *(tint_symbol_11) = float4(x_242.x, x_242.y, x_242.z, 1.0f);
+  float4 const x_247 = *(tint_symbol_8);
+  *(tint_symbol_12) = x_247;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_33, constant buf1& x_36, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) {
+  *(tint_symbol_13) = x_GLF_pos_param;
+  main_1(x_33, x_36, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_33 [[buffer(0)]], constant buf1& x_36 [[buffer(1)]]) {
-  thread float4 tint_symbol_14 = 0.0f;
-  thread float4 tint_symbol_15 = 0.0f;
-  thread QuicksortObject tint_symbol_16 = {};
-  thread float4 tint_symbol_17 = 0.0f;
   thread float4 tint_symbol_18 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_14 = x_GLF_pos_param;
-  main_1(x_33, x_36, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_19 = 0.0f;
+  thread QuicksortObject tint_symbol_20 = {};
+  thread float4 tint_symbol_21 = 0.0f;
+  thread float4 tint_symbol_22 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_33, x_36, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl
index 865d472..3fa889c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl
@@ -25,22 +25,22 @@
   float4 gl_Position [[position]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
   int temp = 0;
   int const x_250 = *(i);
-  int const x_252 = (*(tint_symbol_6)).numbers.arr[x_250];
+  int const x_252 = (*(tint_symbol_5)).numbers.arr[x_250];
   temp = x_252;
   int const x_253 = *(i);
   int const x_254 = *(j);
-  int const x_256 = (*(tint_symbol_6)).numbers.arr[x_254];
-  (*(tint_symbol_6)).numbers.arr[x_253] = x_256;
+  int const x_256 = (*(tint_symbol_5)).numbers.arr[x_254];
+  (*(tint_symbol_5)).numbers.arr[x_253] = x_256;
   int const x_258 = *(j);
   int const x_259 = temp;
-  (*(tint_symbol_6)).numbers.arr[x_258] = x_259;
+  (*(tint_symbol_5)).numbers.arr[x_258] = x_259;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -49,7 +49,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_262 = *(h);
-  int const x_264 = (*(tint_symbol_7)).numbers.arr[x_262];
+  int const x_264 = (*(tint_symbol_6)).numbers.arr[x_262];
   pivot = x_264;
   int const x_265 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_265) - as_type<uint>(1)));
@@ -63,7 +63,7 @@
       break;
     }
     int const x_277 = j_1;
-    int const x_279 = (*(tint_symbol_7)).numbers.arr[x_277];
+    int const x_279 = (*(tint_symbol_6)).numbers.arr[x_277];
     int const x_280 = pivot;
     if ((x_279 <= x_280)) {
       int const x_284 = i_1;
@@ -72,7 +72,7 @@
       param = x_286;
       int const x_287 = j_1;
       param_1 = x_287;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_7);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
     }
     {
       int const x_289 = j_1;
@@ -83,12 +83,12 @@
   param_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
   int const x_293 = *(h);
   param_3 = x_293;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
   int const x_295 = i_1;
   return as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread QuicksortObject* const tint_symbol_7) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -127,7 +127,7 @@
     param_4 = x_321;
     int const x_322 = h_1;
     param_5 = x_322;
-    int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_323 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
     p = x_323;
     int const x_324 = p;
     int const x_326 = l_1;
@@ -161,12 +161,12 @@
   return;
 }
 
-void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) {
+void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_94 = *(tint_symbol_9);
-  *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_94 = *(tint_symbol_8);
+  *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_101 = i_2;
@@ -176,7 +176,7 @@
     }
     int const x_104 = i_2;
     int const x_105 = i_2;
-    (*(tint_symbol_11)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
+    (*(tint_symbol_10)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
     float const x_109 = x_33.injectionSwitch.x;
     float const x_111 = x_33.injectionSwitch.y;
     if ((x_109 > x_111)) {
@@ -184,91 +184,97 @@
     }
     int const x_115 = i_2;
     int const x_116 = i_2;
-    int const x_118 = (*(tint_symbol_11)).numbers.arr[x_116];
+    int const x_118 = (*(tint_symbol_10)).numbers.arr[x_116];
     int const x_119 = i_2;
-    int const x_121 = (*(tint_symbol_11)).numbers.arr[x_119];
-    (*(tint_symbol_11)).numbers.arr[x_115] = as_type<int>((as_type<uint>(x_118) * as_type<uint>(x_121)));
+    int const x_121 = (*(tint_symbol_10)).numbers.arr[x_119];
+    (*(tint_symbol_10)).numbers.arr[x_115] = as_type<int>((as_type<uint>(x_118) * as_type<uint>(x_121)));
     {
       int const x_124 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_11);
-  float4 const x_127 = *(tint_symbol_10);
+  quicksort_(tint_symbol_10);
+  float4 const x_127 = *(tint_symbol_9);
   float2 const x_130 = x_36.resolution;
   uv = (float2(x_127.x, x_127.y) / x_130);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_133 = (*(tint_symbol_11)).numbers.arr[0];
+  int const x_133 = (*(tint_symbol_10)).numbers.arr[0];
   float const x_136 = color.x;
   color.x = (x_136 + float(x_133));
   float const x_140 = uv.x;
   if ((x_140 > 0.25f)) {
-    int const x_145 = (*(tint_symbol_11)).numbers.arr[1];
+    int const x_145 = (*(tint_symbol_10)).numbers.arr[1];
     float const x_148 = color.x;
     color.x = (x_148 + float(x_145));
   }
   float const x_152 = uv.x;
   if ((x_152 > 0.5f)) {
-    int const x_157 = (*(tint_symbol_11)).numbers.arr[2];
+    int const x_157 = (*(tint_symbol_10)).numbers.arr[2];
     float const x_160 = color.y;
     color.y = (x_160 + float(x_157));
   }
   float const x_164 = uv.x;
   if ((x_164 > 0.75f)) {
-    int const x_169 = (*(tint_symbol_11)).numbers.arr[3];
+    int const x_169 = (*(tint_symbol_10)).numbers.arr[3];
     float const x_172 = color.z;
     color.z = (x_172 + float(x_169));
   }
-  int const x_176 = (*(tint_symbol_11)).numbers.arr[4];
+  int const x_176 = (*(tint_symbol_10)).numbers.arr[4];
   float const x_179 = color.y;
   color.y = (x_179 + float(x_176));
   float const x_183 = uv.y;
   if ((x_183 > 0.25f)) {
-    int const x_188 = (*(tint_symbol_11)).numbers.arr[5];
+    int const x_188 = (*(tint_symbol_10)).numbers.arr[5];
     float const x_191 = color.x;
     color.x = (x_191 + float(x_188));
   }
   float const x_195 = uv.y;
   if ((x_195 > 0.5f)) {
-    int const x_200 = (*(tint_symbol_11)).numbers.arr[6];
+    int const x_200 = (*(tint_symbol_10)).numbers.arr[6];
     float const x_203 = color.y;
     color.y = (x_203 + float(x_200));
   }
   float const x_207 = uv.y;
   if ((x_207 > 0.75f)) {
-    int const x_212 = (*(tint_symbol_11)).numbers.arr[7];
+    int const x_212 = (*(tint_symbol_10)).numbers.arr[7];
     float const x_215 = color.z;
     color.z = (x_215 + float(x_212));
   }
-  int const x_219 = (*(tint_symbol_11)).numbers.arr[8];
+  int const x_219 = (*(tint_symbol_10)).numbers.arr[8];
   float const x_222 = color.z;
   color.z = (x_222 + float(x_219));
   float const x_226 = uv.x;
   float const x_228 = uv.y;
   if ((fabs((x_226 - x_228)) < 0.25f)) {
-    int const x_235 = (*(tint_symbol_11)).numbers.arr[9];
+    int const x_235 = (*(tint_symbol_10)).numbers.arr[9];
     float const x_238 = color.x;
     color.x = (x_238 + float(x_235));
   }
   float3 const x_241 = color;
   float3 const x_242 = normalize(x_241);
-  *(tint_symbol_12) = float4(x_242.x, x_242.y, x_242.z, 1.0f);
-  float4 const x_247 = *(tint_symbol_9);
-  *(tint_symbol_13) = x_247;
+  *(tint_symbol_11) = float4(x_242.x, x_242.y, x_242.z, 1.0f);
+  float4 const x_247 = *(tint_symbol_8);
+  *(tint_symbol_12) = x_247;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_33, constant buf1& x_36, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) {
+  *(tint_symbol_13) = x_GLF_pos_param;
+  main_1(x_33, x_36, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_33 [[buffer(0)]], constant buf1& x_36 [[buffer(1)]]) {
-  thread float4 tint_symbol_14 = 0.0f;
-  thread float4 tint_symbol_15 = 0.0f;
-  thread QuicksortObject tint_symbol_16 = {};
-  thread float4 tint_symbol_17 = 0.0f;
   thread float4 tint_symbol_18 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_14 = x_GLF_pos_param;
-  main_1(x_33, x_36, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_19 = 0.0f;
+  thread QuicksortObject tint_symbol_20 = {};
+  thread float4 tint_symbol_21 = 0.0f;
+  thread float4 tint_symbol_22 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_33, x_36, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl
index 99862c3..2d65bff 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.hlsl
@@ -188,13 +188,19 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {frag_color, gl_Position};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
 void swap_i1_i1_(inout int i, inout int j) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl
index c34f593..c013d1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl
@@ -22,7 +22,7 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_34, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int x_90 = 0;
   int x_91 = 0;
   int x_92 = 0;
@@ -43,8 +43,8 @@
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_107 = *(tint_symbol_6);
-  *(tint_symbol_7) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_107 = *(tint_symbol_5);
+  *(tint_symbol_6) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_114 = i_2;
@@ -54,13 +54,13 @@
     }
     int const x_117 = i_2;
     int const x_118 = i_2;
-    (*(tint_symbol_8)).numbers.arr[x_117] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_118)));
+    (*(tint_symbol_7)).numbers.arr[x_117] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_118)));
     int const x_121 = i_2;
     int const x_122 = i_2;
-    int const x_124 = (*(tint_symbol_8)).numbers.arr[x_122];
+    int const x_124 = (*(tint_symbol_7)).numbers.arr[x_122];
     int const x_125 = i_2;
-    int const x_127 = (*(tint_symbol_8)).numbers.arr[x_125];
-    (*(tint_symbol_8)).numbers.arr[x_121] = as_type<int>((as_type<uint>(x_124) * as_type<uint>(x_127)));
+    int const x_127 = (*(tint_symbol_7)).numbers.arr[x_125];
+    (*(tint_symbol_7)).numbers.arr[x_121] = as_type<int>((as_type<uint>(x_124) * as_type<uint>(x_127)));
     {
       int const x_130 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(1)));
@@ -98,7 +98,7 @@
     int const x_156 = x_101;
     x_106 = x_156;
     int const x_157 = x_106;
-    int const x_159 = (*(tint_symbol_8)).numbers.arr[x_157];
+    int const x_159 = (*(tint_symbol_7)).numbers.arr[x_157];
     x_92 = x_159;
     int const x_160 = x_105;
     x_93 = as_type<int>((as_type<uint>(x_160) - as_type<uint>(1)));
@@ -112,7 +112,7 @@
         break;
       }
       int const x_172 = x_94;
-      int const x_174 = (*(tint_symbol_8)).numbers.arr[x_172];
+      int const x_174 = (*(tint_symbol_7)).numbers.arr[x_172];
       int const x_175 = x_92;
       if ((x_174 <= x_175)) {
         int const x_179 = x_93;
@@ -122,15 +122,15 @@
         int const x_182 = x_94;
         x_96 = x_182;
         int const x_183 = x_95;
-        int const x_185 = (*(tint_symbol_8)).numbers.arr[x_183];
+        int const x_185 = (*(tint_symbol_7)).numbers.arr[x_183];
         x_91 = x_185;
         int const x_186 = x_95;
         int const x_187 = x_96;
-        int const x_189 = (*(tint_symbol_8)).numbers.arr[x_187];
-        (*(tint_symbol_8)).numbers.arr[x_186] = x_189;
+        int const x_189 = (*(tint_symbol_7)).numbers.arr[x_187];
+        (*(tint_symbol_7)).numbers.arr[x_186] = x_189;
         int const x_191 = x_96;
         int const x_192 = x_91;
-        (*(tint_symbol_8)).numbers.arr[x_191] = x_192;
+        (*(tint_symbol_7)).numbers.arr[x_191] = x_192;
       }
       {
         int const x_194 = x_94;
@@ -142,15 +142,15 @@
     int const x_198 = x_106;
     x_98 = x_198;
     int const x_199 = x_97;
-    int const x_201 = (*(tint_symbol_8)).numbers.arr[x_199];
+    int const x_201 = (*(tint_symbol_7)).numbers.arr[x_199];
     x_90 = x_201;
     int const x_202 = x_97;
     int const x_203 = x_98;
-    int const x_205 = (*(tint_symbol_8)).numbers.arr[x_203];
-    (*(tint_symbol_8)).numbers.arr[x_202] = x_205;
+    int const x_205 = (*(tint_symbol_7)).numbers.arr[x_203];
+    (*(tint_symbol_7)).numbers.arr[x_202] = x_205;
     int const x_207 = x_98;
     int const x_208 = x_90;
-    (*(tint_symbol_8)).numbers.arr[x_207] = x_208;
+    (*(tint_symbol_7)).numbers.arr[x_207] = x_208;
     int const x_210 = x_93;
     x_99 = as_type<int>((as_type<uint>(x_210) + as_type<uint>(1)));
     int const x_212 = x_99;
@@ -184,100 +184,106 @@
       x_103.arr[x_240] = x_241;
     }
   }
-  float4 const x_243 = *(tint_symbol_7);
+  float4 const x_243 = *(tint_symbol_6);
   float2 const x_246 = x_34.resolution;
   uv = (float2(x_243.x, x_243.y) / x_246);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_249 = (*(tint_symbol_8)).numbers.arr[0];
+  int const x_249 = (*(tint_symbol_7)).numbers.arr[0];
   float const x_252 = color.x;
   color.x = (x_252 + float(x_249));
   float const x_256 = uv.x;
   if ((x_256 > 0.25f)) {
-    int const x_261 = (*(tint_symbol_8)).numbers.arr[1];
+    int const x_261 = (*(tint_symbol_7)).numbers.arr[1];
     float const x_264 = color.x;
     color.x = (x_264 + float(x_261));
   }
   float const x_268 = uv.x;
   if ((x_268 > 0.5f)) {
-    int const x_273 = (*(tint_symbol_8)).numbers.arr[2];
+    int const x_273 = (*(tint_symbol_7)).numbers.arr[2];
     float const x_276 = color.y;
     color.y = (x_276 + float(x_273));
   }
   float const x_280 = uv.x;
   if ((x_280 > 0.75f)) {
-    int const x_285 = (*(tint_symbol_8)).numbers.arr[3];
+    int const x_285 = (*(tint_symbol_7)).numbers.arr[3];
     float const x_288 = color.z;
     color.z = (x_288 + float(x_285));
   }
-  int const x_292 = (*(tint_symbol_8)).numbers.arr[4];
+  int const x_292 = (*(tint_symbol_7)).numbers.arr[4];
   float const x_295 = color.y;
   color.y = (x_295 + float(x_292));
   float const x_299 = uv.y;
   if ((x_299 > 0.25f)) {
-    int const x_304 = (*(tint_symbol_8)).numbers.arr[5];
+    int const x_304 = (*(tint_symbol_7)).numbers.arr[5];
     float const x_307 = color.x;
     color.x = (x_307 + float(x_304));
   }
   float const x_311 = uv.y;
   if ((x_311 > 0.5f)) {
-    int const x_316 = (*(tint_symbol_8)).numbers.arr[6];
+    int const x_316 = (*(tint_symbol_7)).numbers.arr[6];
     float const x_319 = color.y;
     color.y = (x_319 + float(x_316));
   }
   float const x_323 = uv.y;
   if ((x_323 > 0.75f)) {
-    int const x_328 = (*(tint_symbol_8)).numbers.arr[7];
+    int const x_328 = (*(tint_symbol_7)).numbers.arr[7];
     float const x_331 = color.z;
     color.z = (x_331 + float(x_328));
   }
-  int const x_335 = (*(tint_symbol_8)).numbers.arr[8];
+  int const x_335 = (*(tint_symbol_7)).numbers.arr[8];
   float const x_338 = color.z;
   color.z = (x_338 + float(x_335));
   float const x_342 = uv.x;
   float const x_344 = uv.y;
   if ((fabs((x_342 - x_344)) < 0.25f)) {
-    int const x_351 = (*(tint_symbol_8)).numbers.arr[9];
+    int const x_351 = (*(tint_symbol_7)).numbers.arr[9];
     float const x_354 = color.x;
     color.x = (x_354 + float(x_351));
   }
   float3 const x_357 = color;
   float3 const x_358 = normalize(x_357);
-  *(tint_symbol_9) = float4(x_358.x, x_358.y, x_358.z, 1.0f);
-  float4 const x_363 = *(tint_symbol_6);
-  *(tint_symbol_10) = x_363;
+  *(tint_symbol_8) = float4(x_358.x, x_358.y, x_358.z, 1.0f);
+  float4 const x_363 = *(tint_symbol_5);
+  *(tint_symbol_9) = x_363;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11, thread QuicksortObject* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_10) = x_GLF_pos_param;
+  main_1(x_34, tint_symbol_10, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_13), .gl_Position=*(tint_symbol_14)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread float4 tint_symbol_12 = 0.0f;
-  thread QuicksortObject tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
   thread float4 tint_symbol_15 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_11 = x_GLF_pos_param;
-  main_1(x_34, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_14, .gl_Position=tint_symbol_15};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_16 = 0.0f;
+  thread QuicksortObject tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  thread float4 tint_symbol_19 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_16) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_20) {
   int temp = 0;
   int const x_366 = *(i);
-  int const x_368 = (*(tint_symbol_16)).numbers.arr[x_366];
+  int const x_368 = (*(tint_symbol_20)).numbers.arr[x_366];
   temp = x_368;
   int const x_369 = *(i);
   int const x_370 = *(j);
-  int const x_372 = (*(tint_symbol_16)).numbers.arr[x_370];
-  (*(tint_symbol_16)).numbers.arr[x_369] = x_372;
+  int const x_372 = (*(tint_symbol_20)).numbers.arr[x_370];
+  (*(tint_symbol_20)).numbers.arr[x_369] = x_372;
   int const x_374 = *(j);
   int const x_375 = temp;
-  (*(tint_symbol_16)).numbers.arr[x_374] = x_375;
+  (*(tint_symbol_20)).numbers.arr[x_374] = x_375;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_17) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_21) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -286,7 +292,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_378 = *(h);
-  int const x_380 = (*(tint_symbol_17)).numbers.arr[x_378];
+  int const x_380 = (*(tint_symbol_21)).numbers.arr[x_378];
   pivot = x_380;
   int const x_381 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_381) - as_type<uint>(1)));
@@ -300,7 +306,7 @@
       break;
     }
     int const x_393 = j_1;
-    int const x_395 = (*(tint_symbol_17)).numbers.arr[x_393];
+    int const x_395 = (*(tint_symbol_21)).numbers.arr[x_393];
     int const x_396 = pivot;
     if ((x_395 <= x_396)) {
       int const x_400 = i_1;
@@ -309,7 +315,7 @@
       param = x_402;
       int const x_403 = j_1;
       param_1 = x_403;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_17);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_21);
     }
     {
       int const x_405 = j_1;
@@ -320,12 +326,12 @@
   param_2 = as_type<int>((as_type<uint>(x_407) + as_type<uint>(1)));
   int const x_409 = *(h);
   param_3 = x_409;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_17);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_21);
   int const x_411 = i_1;
   return as_type<int>((as_type<uint>(x_411) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_18) {
+void quicksort_(thread QuicksortObject* const tint_symbol_22) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -364,7 +370,7 @@
     param_4 = x_437;
     int const x_438 = h_1;
     param_5 = x_438;
-    int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18);
+    int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22);
     p = x_439;
     int const x_440 = p;
     int const x_442 = l_1;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl
index 99862c3..2d65bff 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.hlsl
@@ -188,13 +188,19 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {frag_color, gl_Position};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
 void swap_i1_i1_(inout int i, inout int j) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl
index c34f593..c013d1c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl
@@ -22,7 +22,7 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
+void main_1(constant buf0& x_34, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread QuicksortObject* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int x_90 = 0;
   int x_91 = 0;
   int x_92 = 0;
@@ -43,8 +43,8 @@
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_107 = *(tint_symbol_6);
-  *(tint_symbol_7) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_107 = *(tint_symbol_5);
+  *(tint_symbol_6) = ((x_107 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_114 = i_2;
@@ -54,13 +54,13 @@
     }
     int const x_117 = i_2;
     int const x_118 = i_2;
-    (*(tint_symbol_8)).numbers.arr[x_117] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_118)));
+    (*(tint_symbol_7)).numbers.arr[x_117] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_118)));
     int const x_121 = i_2;
     int const x_122 = i_2;
-    int const x_124 = (*(tint_symbol_8)).numbers.arr[x_122];
+    int const x_124 = (*(tint_symbol_7)).numbers.arr[x_122];
     int const x_125 = i_2;
-    int const x_127 = (*(tint_symbol_8)).numbers.arr[x_125];
-    (*(tint_symbol_8)).numbers.arr[x_121] = as_type<int>((as_type<uint>(x_124) * as_type<uint>(x_127)));
+    int const x_127 = (*(tint_symbol_7)).numbers.arr[x_125];
+    (*(tint_symbol_7)).numbers.arr[x_121] = as_type<int>((as_type<uint>(x_124) * as_type<uint>(x_127)));
     {
       int const x_130 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(1)));
@@ -98,7 +98,7 @@
     int const x_156 = x_101;
     x_106 = x_156;
     int const x_157 = x_106;
-    int const x_159 = (*(tint_symbol_8)).numbers.arr[x_157];
+    int const x_159 = (*(tint_symbol_7)).numbers.arr[x_157];
     x_92 = x_159;
     int const x_160 = x_105;
     x_93 = as_type<int>((as_type<uint>(x_160) - as_type<uint>(1)));
@@ -112,7 +112,7 @@
         break;
       }
       int const x_172 = x_94;
-      int const x_174 = (*(tint_symbol_8)).numbers.arr[x_172];
+      int const x_174 = (*(tint_symbol_7)).numbers.arr[x_172];
       int const x_175 = x_92;
       if ((x_174 <= x_175)) {
         int const x_179 = x_93;
@@ -122,15 +122,15 @@
         int const x_182 = x_94;
         x_96 = x_182;
         int const x_183 = x_95;
-        int const x_185 = (*(tint_symbol_8)).numbers.arr[x_183];
+        int const x_185 = (*(tint_symbol_7)).numbers.arr[x_183];
         x_91 = x_185;
         int const x_186 = x_95;
         int const x_187 = x_96;
-        int const x_189 = (*(tint_symbol_8)).numbers.arr[x_187];
-        (*(tint_symbol_8)).numbers.arr[x_186] = x_189;
+        int const x_189 = (*(tint_symbol_7)).numbers.arr[x_187];
+        (*(tint_symbol_7)).numbers.arr[x_186] = x_189;
         int const x_191 = x_96;
         int const x_192 = x_91;
-        (*(tint_symbol_8)).numbers.arr[x_191] = x_192;
+        (*(tint_symbol_7)).numbers.arr[x_191] = x_192;
       }
       {
         int const x_194 = x_94;
@@ -142,15 +142,15 @@
     int const x_198 = x_106;
     x_98 = x_198;
     int const x_199 = x_97;
-    int const x_201 = (*(tint_symbol_8)).numbers.arr[x_199];
+    int const x_201 = (*(tint_symbol_7)).numbers.arr[x_199];
     x_90 = x_201;
     int const x_202 = x_97;
     int const x_203 = x_98;
-    int const x_205 = (*(tint_symbol_8)).numbers.arr[x_203];
-    (*(tint_symbol_8)).numbers.arr[x_202] = x_205;
+    int const x_205 = (*(tint_symbol_7)).numbers.arr[x_203];
+    (*(tint_symbol_7)).numbers.arr[x_202] = x_205;
     int const x_207 = x_98;
     int const x_208 = x_90;
-    (*(tint_symbol_8)).numbers.arr[x_207] = x_208;
+    (*(tint_symbol_7)).numbers.arr[x_207] = x_208;
     int const x_210 = x_93;
     x_99 = as_type<int>((as_type<uint>(x_210) + as_type<uint>(1)));
     int const x_212 = x_99;
@@ -184,100 +184,106 @@
       x_103.arr[x_240] = x_241;
     }
   }
-  float4 const x_243 = *(tint_symbol_7);
+  float4 const x_243 = *(tint_symbol_6);
   float2 const x_246 = x_34.resolution;
   uv = (float2(x_243.x, x_243.y) / x_246);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_249 = (*(tint_symbol_8)).numbers.arr[0];
+  int const x_249 = (*(tint_symbol_7)).numbers.arr[0];
   float const x_252 = color.x;
   color.x = (x_252 + float(x_249));
   float const x_256 = uv.x;
   if ((x_256 > 0.25f)) {
-    int const x_261 = (*(tint_symbol_8)).numbers.arr[1];
+    int const x_261 = (*(tint_symbol_7)).numbers.arr[1];
     float const x_264 = color.x;
     color.x = (x_264 + float(x_261));
   }
   float const x_268 = uv.x;
   if ((x_268 > 0.5f)) {
-    int const x_273 = (*(tint_symbol_8)).numbers.arr[2];
+    int const x_273 = (*(tint_symbol_7)).numbers.arr[2];
     float const x_276 = color.y;
     color.y = (x_276 + float(x_273));
   }
   float const x_280 = uv.x;
   if ((x_280 > 0.75f)) {
-    int const x_285 = (*(tint_symbol_8)).numbers.arr[3];
+    int const x_285 = (*(tint_symbol_7)).numbers.arr[3];
     float const x_288 = color.z;
     color.z = (x_288 + float(x_285));
   }
-  int const x_292 = (*(tint_symbol_8)).numbers.arr[4];
+  int const x_292 = (*(tint_symbol_7)).numbers.arr[4];
   float const x_295 = color.y;
   color.y = (x_295 + float(x_292));
   float const x_299 = uv.y;
   if ((x_299 > 0.25f)) {
-    int const x_304 = (*(tint_symbol_8)).numbers.arr[5];
+    int const x_304 = (*(tint_symbol_7)).numbers.arr[5];
     float const x_307 = color.x;
     color.x = (x_307 + float(x_304));
   }
   float const x_311 = uv.y;
   if ((x_311 > 0.5f)) {
-    int const x_316 = (*(tint_symbol_8)).numbers.arr[6];
+    int const x_316 = (*(tint_symbol_7)).numbers.arr[6];
     float const x_319 = color.y;
     color.y = (x_319 + float(x_316));
   }
   float const x_323 = uv.y;
   if ((x_323 > 0.75f)) {
-    int const x_328 = (*(tint_symbol_8)).numbers.arr[7];
+    int const x_328 = (*(tint_symbol_7)).numbers.arr[7];
     float const x_331 = color.z;
     color.z = (x_331 + float(x_328));
   }
-  int const x_335 = (*(tint_symbol_8)).numbers.arr[8];
+  int const x_335 = (*(tint_symbol_7)).numbers.arr[8];
   float const x_338 = color.z;
   color.z = (x_338 + float(x_335));
   float const x_342 = uv.x;
   float const x_344 = uv.y;
   if ((fabs((x_342 - x_344)) < 0.25f)) {
-    int const x_351 = (*(tint_symbol_8)).numbers.arr[9];
+    int const x_351 = (*(tint_symbol_7)).numbers.arr[9];
     float const x_354 = color.x;
     color.x = (x_354 + float(x_351));
   }
   float3 const x_357 = color;
   float3 const x_358 = normalize(x_357);
-  *(tint_symbol_9) = float4(x_358.x, x_358.y, x_358.z, 1.0f);
-  float4 const x_363 = *(tint_symbol_6);
-  *(tint_symbol_10) = x_363;
+  *(tint_symbol_8) = float4(x_358.x, x_358.y, x_358.z, 1.0f);
+  float4 const x_363 = *(tint_symbol_5);
+  *(tint_symbol_9) = x_363;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11, thread QuicksortObject* const tint_symbol_12, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14) {
+  *(tint_symbol_10) = x_GLF_pos_param;
+  main_1(x_34, tint_symbol_10, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_13), .gl_Position=*(tint_symbol_14)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_11 = 0.0f;
-  thread float4 tint_symbol_12 = 0.0f;
-  thread QuicksortObject tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
   thread float4 tint_symbol_15 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_11 = x_GLF_pos_param;
-  main_1(x_34, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_14, .gl_Position=tint_symbol_15};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_16 = 0.0f;
+  thread QuicksortObject tint_symbol_17 = {};
+  thread float4 tint_symbol_18 = 0.0f;
+  thread float4 tint_symbol_19 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_16) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_20) {
   int temp = 0;
   int const x_366 = *(i);
-  int const x_368 = (*(tint_symbol_16)).numbers.arr[x_366];
+  int const x_368 = (*(tint_symbol_20)).numbers.arr[x_366];
   temp = x_368;
   int const x_369 = *(i);
   int const x_370 = *(j);
-  int const x_372 = (*(tint_symbol_16)).numbers.arr[x_370];
-  (*(tint_symbol_16)).numbers.arr[x_369] = x_372;
+  int const x_372 = (*(tint_symbol_20)).numbers.arr[x_370];
+  (*(tint_symbol_20)).numbers.arr[x_369] = x_372;
   int const x_374 = *(j);
   int const x_375 = temp;
-  (*(tint_symbol_16)).numbers.arr[x_374] = x_375;
+  (*(tint_symbol_20)).numbers.arr[x_374] = x_375;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_17) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_21) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -286,7 +292,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_378 = *(h);
-  int const x_380 = (*(tint_symbol_17)).numbers.arr[x_378];
+  int const x_380 = (*(tint_symbol_21)).numbers.arr[x_378];
   pivot = x_380;
   int const x_381 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_381) - as_type<uint>(1)));
@@ -300,7 +306,7 @@
       break;
     }
     int const x_393 = j_1;
-    int const x_395 = (*(tint_symbol_17)).numbers.arr[x_393];
+    int const x_395 = (*(tint_symbol_21)).numbers.arr[x_393];
     int const x_396 = pivot;
     if ((x_395 <= x_396)) {
       int const x_400 = i_1;
@@ -309,7 +315,7 @@
       param = x_402;
       int const x_403 = j_1;
       param_1 = x_403;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_17);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_21);
     }
     {
       int const x_405 = j_1;
@@ -320,12 +326,12 @@
   param_2 = as_type<int>((as_type<uint>(x_407) + as_type<uint>(1)));
   int const x_409 = *(h);
   param_3 = x_409;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_17);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_21);
   int const x_411 = i_1;
   return as_type<int>((as_type<uint>(x_411) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_18) {
+void quicksort_(thread QuicksortObject* const tint_symbol_22) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -364,7 +370,7 @@
     param_4 = x_437;
     int const x_438 = h_1;
     param_5 = x_438;
-    int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18);
+    int const x_439 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22);
     p = x_439;
     int const x_440 = p;
     int const x_442 = l_1;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl
index dd128c4..53c62af 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.hlsl
@@ -206,13 +206,19 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {frag_color, gl_Position};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
 void swap_i1_i1_(inout int i, inout int j) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl
index c4cabb8..cd63817 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl
@@ -22,7 +22,7 @@
   float4 gl_Position [[position]];
 };
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) {
   int x_314 = 0;
   int x_315 = 0;
   int pivot = 0;
@@ -33,7 +33,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_316 = *(h);
-  int const x_318 = (*(tint_symbol_6)).numbers.arr[x_316];
+  int const x_318 = (*(tint_symbol_5)).numbers.arr[x_316];
   pivot = x_318;
   int const x_319 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_319) - as_type<uint>(1)));
@@ -47,7 +47,7 @@
       break;
     }
     int const x_331 = j_1;
-    int const x_333 = (*(tint_symbol_6)).numbers.arr[x_331];
+    int const x_333 = (*(tint_symbol_5)).numbers.arr[x_331];
     int const x_334 = pivot;
     if ((x_333 <= x_334)) {
       int const x_338 = i_1;
@@ -57,15 +57,15 @@
       int const x_341 = j_1;
       param_1 = x_341;
       int const x_342 = param;
-      int const x_344 = (*(tint_symbol_6)).numbers.arr[x_342];
+      int const x_344 = (*(tint_symbol_5)).numbers.arr[x_342];
       x_315 = x_344;
       int const x_345 = param;
       int const x_346 = param_1;
-      int const x_348 = (*(tint_symbol_6)).numbers.arr[x_346];
-      (*(tint_symbol_6)).numbers.arr[x_345] = x_348;
+      int const x_348 = (*(tint_symbol_5)).numbers.arr[x_346];
+      (*(tint_symbol_5)).numbers.arr[x_345] = x_348;
       int const x_350 = param_1;
       int const x_351 = x_315;
-      (*(tint_symbol_6)).numbers.arr[x_350] = x_351;
+      (*(tint_symbol_5)).numbers.arr[x_350] = x_351;
     }
     {
       int const x_353 = j_1;
@@ -77,15 +77,15 @@
   int const x_357 = *(h);
   param_3 = x_357;
   int const x_358 = param_2;
-  int const x_360 = (*(tint_symbol_6)).numbers.arr[x_358];
+  int const x_360 = (*(tint_symbol_5)).numbers.arr[x_358];
   x_314 = x_360;
   int const x_361 = param_2;
   int const x_362 = param_3;
-  int const x_364 = (*(tint_symbol_6)).numbers.arr[x_362];
-  (*(tint_symbol_6)).numbers.arr[x_361] = x_364;
+  int const x_364 = (*(tint_symbol_5)).numbers.arr[x_362];
+  (*(tint_symbol_5)).numbers.arr[x_361] = x_364;
   int const x_366 = param_3;
   int const x_367 = x_314;
-  (*(tint_symbol_6)).numbers.arr[x_366] = x_367;
+  (*(tint_symbol_5)).numbers.arr[x_366] = x_367;
   if (false) {
   } else {
     int const x_372 = i_1;
@@ -94,7 +94,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int x_91 = 0;
   int x_92 = 0;
   int x_93 = 0;
@@ -105,8 +105,8 @@
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_98 = *(tint_symbol_7);
-  *(tint_symbol_8) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_98 = *(tint_symbol_6);
+  *(tint_symbol_7) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_105 = i_2;
@@ -116,13 +116,13 @@
     }
     int const x_108 = i_2;
     int const x_109 = i_2;
-    (*(tint_symbol_9)).numbers.arr[x_108] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_109)));
+    (*(tint_symbol_8)).numbers.arr[x_108] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_109)));
     int const x_112 = i_2;
     int const x_113 = i_2;
-    int const x_115 = (*(tint_symbol_9)).numbers.arr[x_113];
+    int const x_115 = (*(tint_symbol_8)).numbers.arr[x_113];
     int const x_116 = i_2;
-    int const x_118 = (*(tint_symbol_9)).numbers.arr[x_116];
-    (*(tint_symbol_9)).numbers.arr[x_112] = as_type<int>((as_type<uint>(x_115) * as_type<uint>(x_118)));
+    int const x_118 = (*(tint_symbol_8)).numbers.arr[x_116];
+    (*(tint_symbol_8)).numbers.arr[x_112] = as_type<int>((as_type<uint>(x_115) * as_type<uint>(x_118)));
     {
       int const x_121 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
@@ -159,7 +159,7 @@
     x_96 = x_146;
     int const x_147 = x_92;
     x_97 = x_147;
-    int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_9);
+    int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_8);
     x_95 = x_148;
     int const x_149 = x_95;
     int const x_151 = x_91;
@@ -190,100 +190,106 @@
       x_94.arr[x_176] = x_177;
     }
   }
-  float4 const x_179 = *(tint_symbol_8);
+  float4 const x_179 = *(tint_symbol_7);
   float2 const x_182 = x_34.resolution;
   uv = (float2(x_179.x, x_179.y) / x_182);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_185 = (*(tint_symbol_9)).numbers.arr[0];
+  int const x_185 = (*(tint_symbol_8)).numbers.arr[0];
   float const x_188 = color.x;
   color.x = (x_188 + float(x_185));
   float const x_192 = uv.x;
   if ((x_192 > 0.25f)) {
-    int const x_197 = (*(tint_symbol_9)).numbers.arr[1];
+    int const x_197 = (*(tint_symbol_8)).numbers.arr[1];
     float const x_200 = color.x;
     color.x = (x_200 + float(x_197));
   }
   float const x_204 = uv.x;
   if ((x_204 > 0.5f)) {
-    int const x_209 = (*(tint_symbol_9)).numbers.arr[2];
+    int const x_209 = (*(tint_symbol_8)).numbers.arr[2];
     float const x_212 = color.y;
     color.y = (x_212 + float(x_209));
   }
   float const x_216 = uv.x;
   if ((x_216 > 0.75f)) {
-    int const x_221 = (*(tint_symbol_9)).numbers.arr[3];
+    int const x_221 = (*(tint_symbol_8)).numbers.arr[3];
     float const x_224 = color.z;
     color.z = (x_224 + float(x_221));
   }
-  int const x_228 = (*(tint_symbol_9)).numbers.arr[4];
+  int const x_228 = (*(tint_symbol_8)).numbers.arr[4];
   float const x_231 = color.y;
   color.y = (x_231 + float(x_228));
   float const x_235 = uv.y;
   if ((x_235 > 0.25f)) {
-    int const x_240 = (*(tint_symbol_9)).numbers.arr[5];
+    int const x_240 = (*(tint_symbol_8)).numbers.arr[5];
     float const x_243 = color.x;
     color.x = (x_243 + float(x_240));
   }
   float const x_247 = uv.y;
   if ((x_247 > 0.5f)) {
-    int const x_252 = (*(tint_symbol_9)).numbers.arr[6];
+    int const x_252 = (*(tint_symbol_8)).numbers.arr[6];
     float const x_255 = color.y;
     color.y = (x_255 + float(x_252));
   }
   float const x_259 = uv.y;
   if ((x_259 > 0.75f)) {
-    int const x_264 = (*(tint_symbol_9)).numbers.arr[7];
+    int const x_264 = (*(tint_symbol_8)).numbers.arr[7];
     float const x_267 = color.z;
     color.z = (x_267 + float(x_264));
   }
-  int const x_271 = (*(tint_symbol_9)).numbers.arr[8];
+  int const x_271 = (*(tint_symbol_8)).numbers.arr[8];
   float const x_274 = color.z;
   color.z = (x_274 + float(x_271));
   float const x_278 = uv.x;
   float const x_280 = uv.y;
   if ((fabs((x_278 - x_280)) < 0.25f)) {
-    int const x_287 = (*(tint_symbol_9)).numbers.arr[9];
+    int const x_287 = (*(tint_symbol_8)).numbers.arr[9];
     float const x_290 = color.x;
     color.x = (x_290 + float(x_287));
   }
   float3 const x_293 = color;
   float3 const x_294 = normalize(x_293);
-  *(tint_symbol_10) = float4(x_294.x, x_294.y, x_294.z, 1.0f);
-  float4 const x_299 = *(tint_symbol_7);
-  *(tint_symbol_11) = x_299;
+  *(tint_symbol_9) = float4(x_294.x, x_294.y, x_294.z, 1.0f);
+  float4 const x_299 = *(tint_symbol_6);
+  *(tint_symbol_10) = x_299;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12, thread QuicksortObject* const tint_symbol_13, thread float4* const tint_symbol_14, thread float4* const tint_symbol_15) {
+  *(tint_symbol_11) = x_GLF_pos_param;
+  main_1(x_34, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14, tint_symbol_15);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_14), .gl_Position=*(tint_symbol_15)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread float4 tint_symbol_13 = 0.0f;
-  thread QuicksortObject tint_symbol_14 = {};
-  thread float4 tint_symbol_15 = 0.0f;
   thread float4 tint_symbol_16 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_12 = x_GLF_pos_param;
-  main_1(x_34, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_15, .gl_Position=tint_symbol_16};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_17 = 0.0f;
+  thread QuicksortObject tint_symbol_18 = {};
+  thread float4 tint_symbol_19 = 0.0f;
+  thread float4 tint_symbol_20 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_17) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_21) {
   int temp = 0;
   int const x_302 = *(i);
-  int const x_304 = (*(tint_symbol_17)).numbers.arr[x_302];
+  int const x_304 = (*(tint_symbol_21)).numbers.arr[x_302];
   temp = x_304;
   int const x_305 = *(i);
   int const x_306 = *(j);
-  int const x_308 = (*(tint_symbol_17)).numbers.arr[x_306];
-  (*(tint_symbol_17)).numbers.arr[x_305] = x_308;
+  int const x_308 = (*(tint_symbol_21)).numbers.arr[x_306];
+  (*(tint_symbol_21)).numbers.arr[x_305] = x_308;
   int const x_310 = *(j);
   int const x_311 = temp;
-  (*(tint_symbol_17)).numbers.arr[x_310] = x_311;
+  (*(tint_symbol_21)).numbers.arr[x_310] = x_311;
   return;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_18) {
+void quicksort_(thread QuicksortObject* const tint_symbol_22) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -322,7 +328,7 @@
     param_4 = x_399;
     int const x_400 = h_1;
     param_5 = x_400;
-    int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18);
+    int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22);
     p = x_401;
     int const x_402 = p;
     int const x_404 = l_1;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl
index dd128c4..53c62af 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.hlsl
@@ -206,13 +206,19 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {frag_color, gl_Position};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
 void swap_i1_i1_(inout int i, inout int j) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl
index c4cabb8..cd63817 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl
@@ -22,7 +22,7 @@
   float4 gl_Position [[position]];
 };
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_5) {
   int x_314 = 0;
   int x_315 = 0;
   int pivot = 0;
@@ -33,7 +33,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_316 = *(h);
-  int const x_318 = (*(tint_symbol_6)).numbers.arr[x_316];
+  int const x_318 = (*(tint_symbol_5)).numbers.arr[x_316];
   pivot = x_318;
   int const x_319 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_319) - as_type<uint>(1)));
@@ -47,7 +47,7 @@
       break;
     }
     int const x_331 = j_1;
-    int const x_333 = (*(tint_symbol_6)).numbers.arr[x_331];
+    int const x_333 = (*(tint_symbol_5)).numbers.arr[x_331];
     int const x_334 = pivot;
     if ((x_333 <= x_334)) {
       int const x_338 = i_1;
@@ -57,15 +57,15 @@
       int const x_341 = j_1;
       param_1 = x_341;
       int const x_342 = param;
-      int const x_344 = (*(tint_symbol_6)).numbers.arr[x_342];
+      int const x_344 = (*(tint_symbol_5)).numbers.arr[x_342];
       x_315 = x_344;
       int const x_345 = param;
       int const x_346 = param_1;
-      int const x_348 = (*(tint_symbol_6)).numbers.arr[x_346];
-      (*(tint_symbol_6)).numbers.arr[x_345] = x_348;
+      int const x_348 = (*(tint_symbol_5)).numbers.arr[x_346];
+      (*(tint_symbol_5)).numbers.arr[x_345] = x_348;
       int const x_350 = param_1;
       int const x_351 = x_315;
-      (*(tint_symbol_6)).numbers.arr[x_350] = x_351;
+      (*(tint_symbol_5)).numbers.arr[x_350] = x_351;
     }
     {
       int const x_353 = j_1;
@@ -77,15 +77,15 @@
   int const x_357 = *(h);
   param_3 = x_357;
   int const x_358 = param_2;
-  int const x_360 = (*(tint_symbol_6)).numbers.arr[x_358];
+  int const x_360 = (*(tint_symbol_5)).numbers.arr[x_358];
   x_314 = x_360;
   int const x_361 = param_2;
   int const x_362 = param_3;
-  int const x_364 = (*(tint_symbol_6)).numbers.arr[x_362];
-  (*(tint_symbol_6)).numbers.arr[x_361] = x_364;
+  int const x_364 = (*(tint_symbol_5)).numbers.arr[x_362];
+  (*(tint_symbol_5)).numbers.arr[x_361] = x_364;
   int const x_366 = param_3;
   int const x_367 = x_314;
-  (*(tint_symbol_6)).numbers.arr[x_366] = x_367;
+  (*(tint_symbol_5)).numbers.arr[x_366] = x_367;
   if (false) {
   } else {
     int const x_372 = i_1;
@@ -94,7 +94,7 @@
   return 0;
 }
 
-void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread QuicksortObject* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread QuicksortObject* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
   int x_91 = 0;
   int x_92 = 0;
   int x_93 = 0;
@@ -105,8 +105,8 @@
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_98 = *(tint_symbol_7);
-  *(tint_symbol_8) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_98 = *(tint_symbol_6);
+  *(tint_symbol_7) = ((x_98 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_105 = i_2;
@@ -116,13 +116,13 @@
     }
     int const x_108 = i_2;
     int const x_109 = i_2;
-    (*(tint_symbol_9)).numbers.arr[x_108] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_109)));
+    (*(tint_symbol_8)).numbers.arr[x_108] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_109)));
     int const x_112 = i_2;
     int const x_113 = i_2;
-    int const x_115 = (*(tint_symbol_9)).numbers.arr[x_113];
+    int const x_115 = (*(tint_symbol_8)).numbers.arr[x_113];
     int const x_116 = i_2;
-    int const x_118 = (*(tint_symbol_9)).numbers.arr[x_116];
-    (*(tint_symbol_9)).numbers.arr[x_112] = as_type<int>((as_type<uint>(x_115) * as_type<uint>(x_118)));
+    int const x_118 = (*(tint_symbol_8)).numbers.arr[x_116];
+    (*(tint_symbol_8)).numbers.arr[x_112] = as_type<int>((as_type<uint>(x_115) * as_type<uint>(x_118)));
     {
       int const x_121 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
@@ -159,7 +159,7 @@
     x_96 = x_146;
     int const x_147 = x_92;
     x_97 = x_147;
-    int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_9);
+    int const x_148 = performPartition_i1_i1_(&(x_96), &(x_97), tint_symbol_8);
     x_95 = x_148;
     int const x_149 = x_95;
     int const x_151 = x_91;
@@ -190,100 +190,106 @@
       x_94.arr[x_176] = x_177;
     }
   }
-  float4 const x_179 = *(tint_symbol_8);
+  float4 const x_179 = *(tint_symbol_7);
   float2 const x_182 = x_34.resolution;
   uv = (float2(x_179.x, x_179.y) / x_182);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_185 = (*(tint_symbol_9)).numbers.arr[0];
+  int const x_185 = (*(tint_symbol_8)).numbers.arr[0];
   float const x_188 = color.x;
   color.x = (x_188 + float(x_185));
   float const x_192 = uv.x;
   if ((x_192 > 0.25f)) {
-    int const x_197 = (*(tint_symbol_9)).numbers.arr[1];
+    int const x_197 = (*(tint_symbol_8)).numbers.arr[1];
     float const x_200 = color.x;
     color.x = (x_200 + float(x_197));
   }
   float const x_204 = uv.x;
   if ((x_204 > 0.5f)) {
-    int const x_209 = (*(tint_symbol_9)).numbers.arr[2];
+    int const x_209 = (*(tint_symbol_8)).numbers.arr[2];
     float const x_212 = color.y;
     color.y = (x_212 + float(x_209));
   }
   float const x_216 = uv.x;
   if ((x_216 > 0.75f)) {
-    int const x_221 = (*(tint_symbol_9)).numbers.arr[3];
+    int const x_221 = (*(tint_symbol_8)).numbers.arr[3];
     float const x_224 = color.z;
     color.z = (x_224 + float(x_221));
   }
-  int const x_228 = (*(tint_symbol_9)).numbers.arr[4];
+  int const x_228 = (*(tint_symbol_8)).numbers.arr[4];
   float const x_231 = color.y;
   color.y = (x_231 + float(x_228));
   float const x_235 = uv.y;
   if ((x_235 > 0.25f)) {
-    int const x_240 = (*(tint_symbol_9)).numbers.arr[5];
+    int const x_240 = (*(tint_symbol_8)).numbers.arr[5];
     float const x_243 = color.x;
     color.x = (x_243 + float(x_240));
   }
   float const x_247 = uv.y;
   if ((x_247 > 0.5f)) {
-    int const x_252 = (*(tint_symbol_9)).numbers.arr[6];
+    int const x_252 = (*(tint_symbol_8)).numbers.arr[6];
     float const x_255 = color.y;
     color.y = (x_255 + float(x_252));
   }
   float const x_259 = uv.y;
   if ((x_259 > 0.75f)) {
-    int const x_264 = (*(tint_symbol_9)).numbers.arr[7];
+    int const x_264 = (*(tint_symbol_8)).numbers.arr[7];
     float const x_267 = color.z;
     color.z = (x_267 + float(x_264));
   }
-  int const x_271 = (*(tint_symbol_9)).numbers.arr[8];
+  int const x_271 = (*(tint_symbol_8)).numbers.arr[8];
   float const x_274 = color.z;
   color.z = (x_274 + float(x_271));
   float const x_278 = uv.x;
   float const x_280 = uv.y;
   if ((fabs((x_278 - x_280)) < 0.25f)) {
-    int const x_287 = (*(tint_symbol_9)).numbers.arr[9];
+    int const x_287 = (*(tint_symbol_8)).numbers.arr[9];
     float const x_290 = color.x;
     color.x = (x_290 + float(x_287));
   }
   float3 const x_293 = color;
   float3 const x_294 = normalize(x_293);
-  *(tint_symbol_10) = float4(x_294.x, x_294.y, x_294.z, 1.0f);
-  float4 const x_299 = *(tint_symbol_7);
-  *(tint_symbol_11) = x_299;
+  *(tint_symbol_9) = float4(x_294.x, x_294.y, x_294.z, 1.0f);
+  float4 const x_299 = *(tint_symbol_6);
+  *(tint_symbol_10) = x_299;
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_34, float4 x_GLF_pos_param, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12, thread QuicksortObject* const tint_symbol_13, thread float4* const tint_symbol_14, thread float4* const tint_symbol_15) {
+  *(tint_symbol_11) = x_GLF_pos_param;
+  main_1(x_34, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14, tint_symbol_15);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_14), .gl_Position=*(tint_symbol_15)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf0& x_34 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread float4 tint_symbol_13 = 0.0f;
-  thread QuicksortObject tint_symbol_14 = {};
-  thread float4 tint_symbol_15 = 0.0f;
   thread float4 tint_symbol_16 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_12 = x_GLF_pos_param;
-  main_1(x_34, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_15, .gl_Position=tint_symbol_16};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_17 = 0.0f;
+  thread QuicksortObject tint_symbol_18 = {};
+  thread float4 tint_symbol_19 = 0.0f;
+  thread float4 tint_symbol_20 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_17) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_21) {
   int temp = 0;
   int const x_302 = *(i);
-  int const x_304 = (*(tint_symbol_17)).numbers.arr[x_302];
+  int const x_304 = (*(tint_symbol_21)).numbers.arr[x_302];
   temp = x_304;
   int const x_305 = *(i);
   int const x_306 = *(j);
-  int const x_308 = (*(tint_symbol_17)).numbers.arr[x_306];
-  (*(tint_symbol_17)).numbers.arr[x_305] = x_308;
+  int const x_308 = (*(tint_symbol_21)).numbers.arr[x_306];
+  (*(tint_symbol_21)).numbers.arr[x_305] = x_308;
   int const x_310 = *(j);
   int const x_311 = temp;
-  (*(tint_symbol_17)).numbers.arr[x_310] = x_311;
+  (*(tint_symbol_21)).numbers.arr[x_310] = x_311;
   return;
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_18) {
+void quicksort_(thread QuicksortObject* const tint_symbol_22) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -322,7 +328,7 @@
     param_4 = x_399;
     int const x_400 = h_1;
     param_5 = x_400;
-    int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_18);
+    int const x_401 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_22);
     p = x_401;
     int const x_402 = p;
     int const x_404 = l_1;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl
index 231fdaf..070307a 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.hlsl
@@ -215,11 +215,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {frag_color, gl_Position};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl
index f8dc575..e6931e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl
@@ -25,22 +25,22 @@
   float4 gl_Position [[position]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
   int temp = 0;
   int const x_257 = *(i);
-  int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257];
+  int const x_259 = (*(tint_symbol_5)).numbers.arr[x_257];
   temp = x_259;
   int const x_260 = *(i);
   int const x_261 = *(j);
-  int const x_263 = (*(tint_symbol_6)).numbers.arr[x_261];
-  (*(tint_symbol_6)).numbers.arr[x_260] = x_263;
+  int const x_263 = (*(tint_symbol_5)).numbers.arr[x_261];
+  (*(tint_symbol_5)).numbers.arr[x_260] = x_263;
   int const x_265 = *(j);
   int const x_266 = temp;
-  (*(tint_symbol_6)).numbers.arr[x_265] = x_266;
+  (*(tint_symbol_5)).numbers.arr[x_265] = x_266;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -49,7 +49,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_269 = *(h);
-  int const x_271 = (*(tint_symbol_7)).numbers.arr[x_269];
+  int const x_271 = (*(tint_symbol_6)).numbers.arr[x_269];
   pivot = x_271;
   int const x_272 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_272) - as_type<uint>(1)));
@@ -63,7 +63,7 @@
       break;
     }
     int const x_284 = j_1;
-    int const x_286 = (*(tint_symbol_7)).numbers.arr[x_284];
+    int const x_286 = (*(tint_symbol_6)).numbers.arr[x_284];
     int const x_287 = pivot;
     if ((x_286 <= x_287)) {
       int const x_291 = i_1;
@@ -72,7 +72,7 @@
       param = x_293;
       int const x_294 = j_1;
       param_1 = x_294;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_7);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
     }
     {
       int const x_296 = j_1;
@@ -83,12 +83,12 @@
   param_2 = as_type<int>((as_type<uint>(x_298) + as_type<uint>(1)));
   int const x_300 = *(h);
   param_3 = x_300;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
   int const x_302 = i_1;
   return as_type<int>((as_type<uint>(x_302) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread QuicksortObject* const tint_symbol_7) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -127,7 +127,7 @@
     param_4 = x_328;
     int const x_329 = h_1;
     param_5 = x_329;
-    int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
     p = x_330;
     int const x_331 = p;
     int const x_333 = l_1;
@@ -161,12 +161,12 @@
   return;
 }
 
-void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) {
+void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_94 = *(tint_symbol_9);
-  *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_94 = *(tint_symbol_8);
+  *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_101 = i_2;
@@ -176,97 +176,103 @@
     }
     int const x_104 = i_2;
     int const x_105 = i_2;
-    (*(tint_symbol_11)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
+    (*(tint_symbol_10)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
     int const x_108 = i_2;
     int const x_109 = i_2;
-    int const x_111 = (*(tint_symbol_11)).numbers.arr[x_109];
+    int const x_111 = (*(tint_symbol_10)).numbers.arr[x_109];
     int const x_112 = i_2;
-    int const x_114 = (*(tint_symbol_11)).numbers.arr[x_112];
-    (*(tint_symbol_11)).numbers.arr[x_108] = as_type<int>((as_type<uint>(x_111) * as_type<uint>(x_114)));
+    int const x_114 = (*(tint_symbol_10)).numbers.arr[x_112];
+    (*(tint_symbol_10)).numbers.arr[x_108] = as_type<int>((as_type<uint>(x_111) * as_type<uint>(x_114)));
     {
       int const x_117 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_11);
-  float4 const x_120 = *(tint_symbol_10);
+  quicksort_(tint_symbol_10);
+  float4 const x_120 = *(tint_symbol_9);
   float2 const x_123 = x_34.resolution;
   uv = (float2(x_120.x, x_120.y) / x_123);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_126 = (*(tint_symbol_11)).numbers.arr[0];
+  int const x_126 = (*(tint_symbol_10)).numbers.arr[0];
   float const x_129 = color.x;
   color.x = (x_129 + float(x_126));
   float const x_133 = uv.x;
   if ((x_133 > 0.25f)) {
-    int const x_138 = (*(tint_symbol_11)).numbers.arr[1];
+    int const x_138 = (*(tint_symbol_10)).numbers.arr[1];
     float const x_141 = color.x;
     color.x = (x_141 + float(x_138));
   }
   float const x_145 = uv.x;
   if ((x_145 > 0.5f)) {
     float const x_150 = x_37.injectionSwitch.y;
-    int const x_155 = (*(tint_symbol_11)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_150)))), 2)];
+    int const x_155 = (*(tint_symbol_10)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_150)))), 2)];
     float const x_158 = x_37.injectionSwitch.y;
-    int const x_163 = (*(tint_symbol_11)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_158)))), 2)];
+    int const x_163 = (*(tint_symbol_10)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_158)))), 2)];
     float const x_167 = color.y;
     color.y = (x_167 + fmax(float(x_155), float(x_163)));
   }
   float const x_171 = uv.x;
   if ((x_171 > 0.75f)) {
-    int const x_176 = (*(tint_symbol_11)).numbers.arr[3];
+    int const x_176 = (*(tint_symbol_10)).numbers.arr[3];
     float const x_179 = color.z;
     color.z = (x_179 + float(x_176));
   }
-  int const x_183 = (*(tint_symbol_11)).numbers.arr[4];
+  int const x_183 = (*(tint_symbol_10)).numbers.arr[4];
   float const x_186 = color.y;
   color.y = (x_186 + float(x_183));
   float const x_190 = uv.y;
   if ((x_190 > 0.25f)) {
-    int const x_195 = (*(tint_symbol_11)).numbers.arr[5];
+    int const x_195 = (*(tint_symbol_10)).numbers.arr[5];
     float const x_198 = color.x;
     color.x = (x_198 + float(x_195));
   }
   float const x_202 = uv.y;
   if ((x_202 > 0.5f)) {
-    int const x_207 = (*(tint_symbol_11)).numbers.arr[6];
+    int const x_207 = (*(tint_symbol_10)).numbers.arr[6];
     float const x_210 = color.y;
     color.y = (x_210 + float(x_207));
   }
   float const x_214 = uv.y;
   if ((x_214 > 0.75f)) {
-    int const x_219 = (*(tint_symbol_11)).numbers.arr[7];
+    int const x_219 = (*(tint_symbol_10)).numbers.arr[7];
     float const x_222 = color.z;
     color.z = (x_222 + float(x_219));
   }
-  int const x_226 = (*(tint_symbol_11)).numbers.arr[8];
+  int const x_226 = (*(tint_symbol_10)).numbers.arr[8];
   float const x_229 = color.z;
   color.z = (x_229 + float(x_226));
   float const x_233 = uv.x;
   float const x_235 = uv.y;
   if ((fabs((x_233 - x_235)) < 0.25f)) {
-    int const x_242 = (*(tint_symbol_11)).numbers.arr[9];
+    int const x_242 = (*(tint_symbol_10)).numbers.arr[9];
     float const x_245 = color.x;
     color.x = (x_245 + float(x_242));
   }
   float3 const x_248 = color;
   float3 const x_249 = normalize(x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
-  float4 const x_254 = *(tint_symbol_9);
-  *(tint_symbol_13) = x_254;
+  *(tint_symbol_11) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  float4 const x_254 = *(tint_symbol_8);
+  *(tint_symbol_12) = x_254;
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_34, constant buf0& x_37, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) {
+  *(tint_symbol_13) = x_GLF_pos_param;
+  main_1(x_34, x_37, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) {
-  thread float4 tint_symbol_14 = 0.0f;
-  thread float4 tint_symbol_15 = 0.0f;
-  thread QuicksortObject tint_symbol_16 = {};
-  thread float4 tint_symbol_17 = 0.0f;
   thread float4 tint_symbol_18 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_14 = x_GLF_pos_param;
-  main_1(x_34, x_37, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_19 = 0.0f;
+  thread QuicksortObject tint_symbol_20 = {};
+  thread float4 tint_symbol_21 = 0.0f;
+  thread float4 tint_symbol_22 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, x_37, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl
index 231fdaf..070307a 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.hlsl
@@ -215,11 +215,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_GLF_pos_param = tint_symbol.x_GLF_pos_param;
+main_out main_inner(float4 x_GLF_pos_param) {
   x_GLF_pos = x_GLF_pos_param;
   main_1();
-  const main_out tint_symbol_3 = {frag_color, gl_Position};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.frag_color_1, tint_symbol_3.gl_Position};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {frag_color, gl_Position};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_GLF_pos_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl
index f8dc575..e6931e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl
@@ -25,22 +25,22 @@
   float4 gl_Position [[position]];
 };
 
-void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_6) {
+void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_5) {
   int temp = 0;
   int const x_257 = *(i);
-  int const x_259 = (*(tint_symbol_6)).numbers.arr[x_257];
+  int const x_259 = (*(tint_symbol_5)).numbers.arr[x_257];
   temp = x_259;
   int const x_260 = *(i);
   int const x_261 = *(j);
-  int const x_263 = (*(tint_symbol_6)).numbers.arr[x_261];
-  (*(tint_symbol_6)).numbers.arr[x_260] = x_263;
+  int const x_263 = (*(tint_symbol_5)).numbers.arr[x_261];
+  (*(tint_symbol_5)).numbers.arr[x_260] = x_263;
   int const x_265 = *(j);
   int const x_266 = temp;
-  (*(tint_symbol_6)).numbers.arr[x_265] = x_266;
+  (*(tint_symbol_5)).numbers.arr[x_265] = x_266;
   return;
 }
 
-int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_7) {
+int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_6) {
   int pivot = 0;
   int i_1 = 0;
   int j_1 = 0;
@@ -49,7 +49,7 @@
   int param_2 = 0;
   int param_3 = 0;
   int const x_269 = *(h);
-  int const x_271 = (*(tint_symbol_7)).numbers.arr[x_269];
+  int const x_271 = (*(tint_symbol_6)).numbers.arr[x_269];
   pivot = x_271;
   int const x_272 = *(l);
   i_1 = as_type<int>((as_type<uint>(x_272) - as_type<uint>(1)));
@@ -63,7 +63,7 @@
       break;
     }
     int const x_284 = j_1;
-    int const x_286 = (*(tint_symbol_7)).numbers.arr[x_284];
+    int const x_286 = (*(tint_symbol_6)).numbers.arr[x_284];
     int const x_287 = pivot;
     if ((x_286 <= x_287)) {
       int const x_291 = i_1;
@@ -72,7 +72,7 @@
       param = x_293;
       int const x_294 = j_1;
       param_1 = x_294;
-      swap_i1_i1_(&(param), &(param_1), tint_symbol_7);
+      swap_i1_i1_(&(param), &(param_1), tint_symbol_6);
     }
     {
       int const x_296 = j_1;
@@ -83,12 +83,12 @@
   param_2 = as_type<int>((as_type<uint>(x_298) + as_type<uint>(1)));
   int const x_300 = *(h);
   param_3 = x_300;
-  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7);
+  swap_i1_i1_(&(param_2), &(param_3), tint_symbol_6);
   int const x_302 = i_1;
   return as_type<int>((as_type<uint>(x_302) + as_type<uint>(1)));
 }
 
-void quicksort_(thread QuicksortObject* const tint_symbol_8) {
+void quicksort_(thread QuicksortObject* const tint_symbol_7) {
   int l_1 = 0;
   int h_1 = 0;
   int top = 0;
@@ -127,7 +127,7 @@
     param_4 = x_328;
     int const x_329 = h_1;
     param_5 = x_329;
-    int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_8);
+    int const x_330 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_7);
     p = x_330;
     int const x_331 = p;
     int const x_333 = l_1;
@@ -161,12 +161,12 @@
   return;
 }
 
-void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread QuicksortObject* const tint_symbol_11, thread float4* const tint_symbol_12, thread float4* const tint_symbol_13) {
+void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread QuicksortObject* const tint_symbol_10, thread float4* const tint_symbol_11, thread float4* const tint_symbol_12) {
   int i_2 = 0;
   float2 uv = 0.0f;
   float3 color = 0.0f;
-  float4 const x_94 = *(tint_symbol_9);
-  *(tint_symbol_10) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
+  float4 const x_94 = *(tint_symbol_8);
+  *(tint_symbol_9) = ((x_94 + float4(1.0f, 1.0f, 0.0f, 0.0f)) * float4(128.0f, 128.0f, 1.0f, 1.0f));
   i_2 = 0;
   while (true) {
     int const x_101 = i_2;
@@ -176,97 +176,103 @@
     }
     int const x_104 = i_2;
     int const x_105 = i_2;
-    (*(tint_symbol_11)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
+    (*(tint_symbol_10)).numbers.arr[x_104] = as_type<int>((as_type<uint>(10) - as_type<uint>(x_105)));
     int const x_108 = i_2;
     int const x_109 = i_2;
-    int const x_111 = (*(tint_symbol_11)).numbers.arr[x_109];
+    int const x_111 = (*(tint_symbol_10)).numbers.arr[x_109];
     int const x_112 = i_2;
-    int const x_114 = (*(tint_symbol_11)).numbers.arr[x_112];
-    (*(tint_symbol_11)).numbers.arr[x_108] = as_type<int>((as_type<uint>(x_111) * as_type<uint>(x_114)));
+    int const x_114 = (*(tint_symbol_10)).numbers.arr[x_112];
+    (*(tint_symbol_10)).numbers.arr[x_108] = as_type<int>((as_type<uint>(x_111) * as_type<uint>(x_114)));
     {
       int const x_117 = i_2;
       i_2 = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
     }
   }
-  quicksort_(tint_symbol_11);
-  float4 const x_120 = *(tint_symbol_10);
+  quicksort_(tint_symbol_10);
+  float4 const x_120 = *(tint_symbol_9);
   float2 const x_123 = x_34.resolution;
   uv = (float2(x_120.x, x_120.y) / x_123);
   color = float3(1.0f, 2.0f, 3.0f);
-  int const x_126 = (*(tint_symbol_11)).numbers.arr[0];
+  int const x_126 = (*(tint_symbol_10)).numbers.arr[0];
   float const x_129 = color.x;
   color.x = (x_129 + float(x_126));
   float const x_133 = uv.x;
   if ((x_133 > 0.25f)) {
-    int const x_138 = (*(tint_symbol_11)).numbers.arr[1];
+    int const x_138 = (*(tint_symbol_10)).numbers.arr[1];
     float const x_141 = color.x;
     color.x = (x_141 + float(x_138));
   }
   float const x_145 = uv.x;
   if ((x_145 > 0.5f)) {
     float const x_150 = x_37.injectionSwitch.y;
-    int const x_155 = (*(tint_symbol_11)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_150)))), 2)];
+    int const x_155 = (*(tint_symbol_10)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_150)))), 2)];
     float const x_158 = x_37.injectionSwitch.y;
-    int const x_163 = (*(tint_symbol_11)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_158)))), 2)];
+    int const x_163 = (*(tint_symbol_10)).numbers.arr[max(as_type<int>((as_type<uint>(2) * as_type<uint>(int(x_158)))), 2)];
     float const x_167 = color.y;
     color.y = (x_167 + fmax(float(x_155), float(x_163)));
   }
   float const x_171 = uv.x;
   if ((x_171 > 0.75f)) {
-    int const x_176 = (*(tint_symbol_11)).numbers.arr[3];
+    int const x_176 = (*(tint_symbol_10)).numbers.arr[3];
     float const x_179 = color.z;
     color.z = (x_179 + float(x_176));
   }
-  int const x_183 = (*(tint_symbol_11)).numbers.arr[4];
+  int const x_183 = (*(tint_symbol_10)).numbers.arr[4];
   float const x_186 = color.y;
   color.y = (x_186 + float(x_183));
   float const x_190 = uv.y;
   if ((x_190 > 0.25f)) {
-    int const x_195 = (*(tint_symbol_11)).numbers.arr[5];
+    int const x_195 = (*(tint_symbol_10)).numbers.arr[5];
     float const x_198 = color.x;
     color.x = (x_198 + float(x_195));
   }
   float const x_202 = uv.y;
   if ((x_202 > 0.5f)) {
-    int const x_207 = (*(tint_symbol_11)).numbers.arr[6];
+    int const x_207 = (*(tint_symbol_10)).numbers.arr[6];
     float const x_210 = color.y;
     color.y = (x_210 + float(x_207));
   }
   float const x_214 = uv.y;
   if ((x_214 > 0.75f)) {
-    int const x_219 = (*(tint_symbol_11)).numbers.arr[7];
+    int const x_219 = (*(tint_symbol_10)).numbers.arr[7];
     float const x_222 = color.z;
     color.z = (x_222 + float(x_219));
   }
-  int const x_226 = (*(tint_symbol_11)).numbers.arr[8];
+  int const x_226 = (*(tint_symbol_10)).numbers.arr[8];
   float const x_229 = color.z;
   color.z = (x_229 + float(x_226));
   float const x_233 = uv.x;
   float const x_235 = uv.y;
   if ((fabs((x_233 - x_235)) < 0.25f)) {
-    int const x_242 = (*(tint_symbol_11)).numbers.arr[9];
+    int const x_242 = (*(tint_symbol_10)).numbers.arr[9];
     float const x_245 = color.x;
     color.x = (x_245 + float(x_242));
   }
   float3 const x_248 = color;
   float3 const x_249 = normalize(x_248);
-  *(tint_symbol_12) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
-  float4 const x_254 = *(tint_symbol_9);
-  *(tint_symbol_13) = x_254;
+  *(tint_symbol_11) = float4(x_249.x, x_249.y, x_249.z, 1.0f);
+  float4 const x_254 = *(tint_symbol_8);
+  *(tint_symbol_12) = x_254;
   return;
 }
 
+main_out tint_symbol_inner(constant buf1& x_34, constant buf0& x_37, float4 x_GLF_pos_param, thread float4* const tint_symbol_13, thread float4* const tint_symbol_14, thread QuicksortObject* const tint_symbol_15, thread float4* const tint_symbol_16, thread float4* const tint_symbol_17) {
+  *(tint_symbol_13) = x_GLF_pos_param;
+  main_1(x_34, x_37, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17);
+  main_out const tint_symbol_4 = {.frag_color_1=*(tint_symbol_16), .gl_Position=*(tint_symbol_17)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) {
-  thread float4 tint_symbol_14 = 0.0f;
-  thread float4 tint_symbol_15 = 0.0f;
-  thread QuicksortObject tint_symbol_16 = {};
-  thread float4 tint_symbol_17 = 0.0f;
   thread float4 tint_symbol_18 = 0.0f;
-  float4 const x_GLF_pos_param = tint_symbol_1.x_GLF_pos_param;
-  tint_symbol_14 = x_GLF_pos_param;
-  main_1(x_34, x_37, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
-  main_out const tint_symbol_4 = {.frag_color_1=tint_symbol_17, .gl_Position=tint_symbol_18};
-  tint_symbol_3 const tint_symbol_5 = {.frag_color_1=tint_symbol_4.frag_color_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_19 = 0.0f;
+  thread QuicksortObject tint_symbol_20 = {};
+  thread float4 tint_symbol_21 = 0.0f;
+  thread float4 tint_symbol_22 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_34, x_37, tint_symbol_1.x_GLF_pos_param, &(tint_symbol_18), &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), &(tint_symbol_22));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.frag_color_1 = inner_result.frag_color_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl
index 69f3fe6..f5639d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.hlsl
@@ -61,23 +61,23 @@
       const int x_174 = i;
       const float2 x_175 = pos_1;
       param = x_175;
-      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      indexable = tint_symbol_5;
+      const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      indexable = tint_symbol_4;
       const float4 x_177 = indexable[x_174];
       param_1 = x_177;
       const bool x_178 = collision_vf2_vf4_(param, param_1);
       if (x_178) {
         const int x_181 = i;
-        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_1 = tint_symbol_6;
+        const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_1 = tint_symbol_5;
         const float x_183 = indexable_1[x_181].x;
         const int x_185 = i;
-        const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_2 = tint_symbol_7;
+        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_2 = tint_symbol_6;
         const float x_187 = indexable_2[x_185].y;
         const int x_190 = i;
-        const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-        indexable_3 = tint_symbol_8;
+        const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+        indexable_3 = tint_symbol_7;
         const float4 x_196 = indexable_3[((((int(x_183) * int(x_187)) + (x_190 * 9)) + 11) % 16)];
         res = x_196;
       }
@@ -109,11 +109,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl
index 29a6f01..b78cdb2 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl
@@ -13,7 +13,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -43,7 +43,7 @@
   return true;
 }
 
-float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9) {
+float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_7) {
   float4 res = 0.0f;
   float x_144 = 0.0f;
   float x_145 = 0.0f;
@@ -54,13 +54,13 @@
   tint_array_wrapper indexable_1 = {};
   tint_array_wrapper indexable_2 = {};
   tint_array_wrapper_1 indexable_3 = {};
-  float const x_147 = (*(tint_symbol_9)).x;
+  float const x_147 = (*(tint_symbol_7)).x;
   if ((x_147 < 0.0f)) {
     x_144 = -1.0f;
   } else {
-    float const x_153 = (*(tint_symbol_9)).x;
+    float const x_153 = (*(tint_symbol_7)).x;
     if ((x_153 >= 0.0f)) {
-      float const x_159 = (*(tint_symbol_9)).x;
+      float const x_159 = (*(tint_symbol_7)).x;
       x_145 = select(1.0f, 0.5f, (x_159 >= 0.0f));
     } else {
       x_145 = 1.0f;
@@ -80,23 +80,23 @@
     int const x_174 = i;
     float2 const x_175 = *(pos_1);
     param = x_175;
-    tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    indexable = tint_symbol_2;
     float4 const x_177 = indexable.arr[x_174];
     param_1 = x_177;
     bool const x_178 = collision_vf2_vf4_(&(param), &(param_1));
     if (x_178) {
       int const x_181 = i;
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_1 = tint_symbol_3;
       float const x_183 = indexable_1.arr[x_181].x;
       int const x_185 = i;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_2 = tint_symbol_4;
       float const x_187 = indexable_2.arr[x_185].y;
       int const x_190 = i;
-      tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      indexable_3 = tint_symbol_7;
+      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      indexable_3 = tint_symbol_5;
       float4 const x_196 = indexable_3.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_183)) * as_type<uint>(int(x_187))))) + as_type<uint>(as_type<int>((as_type<uint>(x_190) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       res = x_196;
     }
@@ -109,28 +109,34 @@
   return x_199;
 }
 
-void main_1(constant buf0& x_20, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_20, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   float2 lin = 0.0f;
   float2 param_2 = 0.0f;
-  float4 const x_98 = *(tint_symbol_10);
+  float4 const x_98 = *(tint_symbol_8);
   float2 const x_101 = x_20.resolution;
   lin = (float2(x_98.x, x_98.y) / x_101);
   float2 const x_103 = lin;
   lin = floor((x_103 * 32.0f));
   float2 const x_106 = lin;
   param_2 = x_106;
-  float4 const x_107 = match_vf2_(&(param_2), tint_symbol_10);
-  *(tint_symbol_11) = x_107;
+  float4 const x_107 = match_vf2_(&(param_2), tint_symbol_8);
+  *(tint_symbol_9) = x_107;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_20, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
   thread float4 tint_symbol_12 = 0.0f;
   thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_20, &(tint_symbol_12), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl
index 69f3fe6..f5639d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.hlsl
@@ -61,23 +61,23 @@
       const int x_174 = i;
       const float2 x_175 = pos_1;
       param = x_175;
-      const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-      indexable = tint_symbol_5;
+      const float4 tint_symbol_4[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+      indexable = tint_symbol_4;
       const float4 x_177 = indexable[x_174];
       param_1 = x_177;
       const bool x_178 = collision_vf2_vf4_(param, param_1);
       if (x_178) {
         const int x_181 = i;
-        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_1 = tint_symbol_6;
+        const float4 tint_symbol_5[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_1 = tint_symbol_5;
         const float x_183 = indexable_1[x_181].x;
         const int x_185 = i;
-        const float4 tint_symbol_7[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
-        indexable_2 = tint_symbol_7;
+        const float4 tint_symbol_6[8] = {float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)};
+        indexable_2 = tint_symbol_6;
         const float x_187 = indexable_2[x_185].y;
         const int x_190 = i;
-        const float4 tint_symbol_8[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
-        indexable_3 = tint_symbol_8;
+        const float4 tint_symbol_7[16] = {float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)};
+        indexable_3 = tint_symbol_7;
         const float4 x_196 = indexable_3[((((int(x_183) * int(x_187)) + (x_190 * 9)) + 11) % 16)];
         res = x_196;
       }
@@ -109,11 +109,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_9 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_9;
+  const main_out tint_symbol_8 = {x_GLF_color};
+  return tint_symbol_8;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl
index 29a6f01..b78cdb2 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl
@@ -13,7 +13,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -43,7 +43,7 @@
   return true;
 }
 
-float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9) {
+float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_7) {
   float4 res = 0.0f;
   float x_144 = 0.0f;
   float x_145 = 0.0f;
@@ -54,13 +54,13 @@
   tint_array_wrapper indexable_1 = {};
   tint_array_wrapper indexable_2 = {};
   tint_array_wrapper_1 indexable_3 = {};
-  float const x_147 = (*(tint_symbol_9)).x;
+  float const x_147 = (*(tint_symbol_7)).x;
   if ((x_147 < 0.0f)) {
     x_144 = -1.0f;
   } else {
-    float const x_153 = (*(tint_symbol_9)).x;
+    float const x_153 = (*(tint_symbol_7)).x;
     if ((x_153 >= 0.0f)) {
-      float const x_159 = (*(tint_symbol_9)).x;
+      float const x_159 = (*(tint_symbol_7)).x;
       x_145 = select(1.0f, 0.5f, (x_159 >= 0.0f));
     } else {
       x_145 = 1.0f;
@@ -80,23 +80,23 @@
     int const x_174 = i;
     float2 const x_175 = *(pos_1);
     param = x_175;
-    tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-    indexable = tint_symbol_4;
+    tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+    indexable = tint_symbol_2;
     float4 const x_177 = indexable.arr[x_174];
     param_1 = x_177;
     bool const x_178 = collision_vf2_vf4_(&(param), &(param_1));
     if (x_178) {
       int const x_181 = i;
-      tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_1 = tint_symbol_5;
+      tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_1 = tint_symbol_3;
       float const x_183 = indexable_1.arr[x_181].x;
       int const x_185 = i;
-      tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
-      indexable_2 = tint_symbol_6;
+      tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
+      indexable_2 = tint_symbol_4;
       float const x_187 = indexable_2.arr[x_185].y;
       int const x_190 = i;
-      tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
-      indexable_3 = tint_symbol_7;
+      tint_array_wrapper_1 const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
+      indexable_3 = tint_symbol_5;
       float4 const x_196 = indexable_3.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_183)) * as_type<uint>(int(x_187))))) + as_type<uint>(as_type<int>((as_type<uint>(x_190) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
       res = x_196;
     }
@@ -109,28 +109,34 @@
   return x_199;
 }
 
-void main_1(constant buf0& x_20, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_20, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   float2 lin = 0.0f;
   float2 param_2 = 0.0f;
-  float4 const x_98 = *(tint_symbol_10);
+  float4 const x_98 = *(tint_symbol_8);
   float2 const x_101 = x_20.resolution;
   lin = (float2(x_98.x, x_98.y) / x_101);
   float2 const x_103 = lin;
   lin = floor((x_103 * 32.0f));
   float2 const x_106 = lin;
   param_2 = x_106;
-  float4 const x_107 = match_vf2_(&(param_2), tint_symbol_10);
-  *(tint_symbol_11) = x_107;
+  float4 const x_107 = match_vf2_(&(param_2), tint_symbol_8);
+  *(tint_symbol_9) = x_107;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_20, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_20, tint_symbol_10, tint_symbol_11);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_11)};
+  return tint_symbol_6;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_20 [[buffer(0)]]) {
   thread float4 tint_symbol_12 = 0.0f;
   thread float4 tint_symbol_13 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_20, &(tint_symbol_12), &(tint_symbol_13));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_13};
-  tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_8;
+  main_out const inner_result = tint_symbol_inner(x_20, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl
index 4b03ca9..e9c7854 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl
@@ -133,11 +133,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl
index 43a265b..e876cbc 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -110,13 +110,13 @@
   return x_173;
 }
 
-void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_67 = *(tint_symbol_5);
+  float4 const x_67 = *(tint_symbol_3);
   float2 const x_70 = x_24.resolution;
   float2 const x_71 = (float2(x_67.x, x_67.y) / x_70);
   pos = x_71;
@@ -126,20 +126,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_72 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_72 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_24, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_24, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl
index fd9d668..b3d0880 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.hlsl
@@ -149,11 +149,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl
index c8cbf19..7cbe87b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -110,13 +110,13 @@
   return x_173;
 }
 
-void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_67 = *(tint_symbol_5);
+  float4 const x_67 = *(tint_symbol_3);
   float2 const x_70 = x_24.resolution;
   float2 const x_71 = (float2(x_67.x, x_67.y) / x_70);
   pos = x_71;
@@ -126,20 +126,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_72 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_72 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_24, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_24, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl
index 6a87269..1bf883a 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl
@@ -115,11 +115,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl
index 2285b7e..1081007 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -100,13 +100,13 @@
   return 1;
 }
 
-void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_63 = *(tint_symbol_5);
+  float4 const x_63 = *(tint_symbol_3);
   float2 const x_66 = x_24.resolution;
   pos = (float2(x_63.x, x_63.y) / x_66);
   float2 const x_68 = pos;
@@ -116,20 +116,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_69 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_24, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_24, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl
index 421b7ed..3579c25 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.hlsl
@@ -131,11 +131,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl
index ed7f078..e07a9ab 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -100,13 +100,13 @@
   return 1;
 }
 
-void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_63 = *(tint_symbol_5);
+  float4 const x_63 = *(tint_symbol_3);
   float2 const x_66 = x_24.resolution;
   pos = (float2(x_63.x, x_63.y) / x_66);
   float2 const x_68 = pos;
@@ -116,20 +116,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_69 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_24, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_24, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl
index 2c4cd16..870fcb0 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl
@@ -142,11 +142,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl
index 75d95c2..c038002 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -129,13 +129,13 @@
   return 1;
 }
 
-void main_1(constant buf0& x_15, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_15, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_72 = *(tint_symbol_5);
+  float4 const x_72 = *(tint_symbol_3);
   float2 const x_75 = x_15.resolution;
   pos = (float2(x_72.x, x_72.y) / x_75);
   float2 const x_77 = pos;
@@ -145,20 +145,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_78 = pointInTriangle_vf2_vf2_vf2_vf2_(x_15, &(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_78 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_15, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_15, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_15, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_15, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl
index 75aaaf6..9e43c5f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.hlsl
@@ -158,11 +158,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl
index d0400d8..e847253 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -129,13 +129,13 @@
   return 1;
 }
 
-void main_1(constant buf0& x_15, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_15, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_72 = *(tint_symbol_5);
+  float4 const x_72 = *(tint_symbol_3);
   float2 const x_75 = x_15.resolution;
   pos = (float2(x_72.x, x_72.y) / x_75);
   float2 const x_77 = pos;
@@ -145,20 +145,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_78 = pointInTriangle_vf2_vf2_vf2_vf2_(x_15, &(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_78 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_15, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_15, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_15 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_15, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_15, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl
index 55c6a35..bac141a 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl
@@ -115,11 +115,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl
index 9d7d4bb..8cecda9 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -100,13 +100,13 @@
   return 1;
 }
 
-void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_63 = *(tint_symbol_5);
+  float4 const x_63 = *(tint_symbol_3);
   float2 const x_66 = x_24.resolution;
   pos = (float2(x_63.x, x_63.y) / x_66);
   float2 const x_68 = pos;
@@ -116,20 +116,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_69 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_24, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_24, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl
index f228156..62ce0ec 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.hlsl
@@ -131,11 +131,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl
index 8d1f7be..1c1d527 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -100,13 +100,13 @@
   return 1;
 }
 
-void main_1(constant buf0& x_24, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_24, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 pos = 0.0f;
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_63 = *(tint_symbol_5);
+  float4 const x_63 = *(tint_symbol_3);
   float2 const x_66 = x_24.resolution;
   pos = (float2(x_63.x, x_63.y) / x_66);
   float2 const x_68 = pos;
@@ -116,20 +116,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_69 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_69 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_24, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_24, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_24 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_24, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_24, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl
index 8f680e0..22b028b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl
@@ -118,11 +118,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl
index 5b5a4a7..c9cce2f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -97,12 +97,12 @@
   return 1;
 }
 
-void main_1(constant buf0& x_17, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_17, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_55 = *(tint_symbol_5);
+  float4 const x_55 = *(tint_symbol_3);
   float2 const x_58 = x_17.resolution;
   param_6 = (float2(x_55.x, x_55.y) / x_58);
   param_7 = float2(0.699999988f, 0.300000012f);
@@ -110,20 +110,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_60 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_60 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_17, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_17, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_17, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_17, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl
index c32dae7..6d8725a 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.hlsl
@@ -134,11 +134,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl
index fc78937..d048ada 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -97,12 +97,12 @@
   return 1;
 }
 
-void main_1(constant buf0& x_17, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_17, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_55 = *(tint_symbol_5);
+  float4 const x_55 = *(tint_symbol_3);
   float2 const x_58 = x_17.resolution;
   param_6 = (float2(x_55.x, x_55.y) / x_58);
   param_7 = float2(0.699999988f, 0.300000012f);
@@ -110,20 +110,26 @@
   param_9 = float2(0.100000001f, 0.400000006f);
   int const x_60 = pointInTriangle_vf2_vf2_vf2_vf2_(&(param_6), &(param_7), &(param_8), &(param_9));
   if ((x_60 == 1)) {
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_17, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_17, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_17 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_17, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_17, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl
index 1593598..3f249ae 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl
@@ -157,11 +157,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl
index 40e2a56..cb0746b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_5) {
+int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_3) {
   float x_78 = 0.0f;
   float x_79 = 0.0f;
   float x_80 = 0.0f;
@@ -81,7 +81,7 @@
       } else {
         break;
       }
-      *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       x_164_phi = 0;
       while (true) {
         int x_165 = 0;
@@ -90,7 +90,7 @@
         } else {
           break;
         }
-        *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
         {
           x_165 = as_type<int>((as_type<uint>(x_164) + as_type<uint>(1)));
           x_164_phi = x_165;
@@ -132,37 +132,43 @@
   return 1;
 }
 
-void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_60 = *(tint_symbol_6);
+  float4 const x_60 = *(tint_symbol_4);
   float2 const x_63 = x_19.resolution;
   param_6 = (float2(x_60.x, x_60.y) / x_63);
   param_7 = float2(0.699999988f, 0.300000012f);
   param_8 = float2(0.5f, 0.899999976f);
   param_9 = float2(0.100000001f, 0.400000006f);
-  int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_7);
+  int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_5);
   if ((x_65 == 1)) {
     float const x_71 = x_11.injectionSwitch.y;
     float const x_73 = x_11.injectionSwitch.x;
     if ((x_71 >= x_73)) {
-      *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_19, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_19, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_19, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_19, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl
index 1e6b252..f9a1fa7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.hlsl
@@ -173,11 +173,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl
index 17d0242..0026d06 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl
@@ -10,11 +10,11 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_5) {
+int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p, thread float2* const a, thread float2* const b, thread float2* const c, thread float4* const tint_symbol_3) {
   float x_78 = 0.0f;
   float x_79 = 0.0f;
   float x_80 = 0.0f;
@@ -81,7 +81,7 @@
       } else {
         break;
       }
-      *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
       x_164_phi = 0;
       while (true) {
         int x_165 = 0;
@@ -90,7 +90,7 @@
         } else {
           break;
         }
-        *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+        *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
         {
           x_165 = as_type<int>((as_type<uint>(x_164) + as_type<uint>(1)));
           x_164_phi = x_165;
@@ -132,37 +132,43 @@
   return 1;
 }
 
-void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_19, constant buf1& x_11, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   float2 param_6 = 0.0f;
   float2 param_7 = 0.0f;
   float2 param_8 = 0.0f;
   float2 param_9 = 0.0f;
-  float4 const x_60 = *(tint_symbol_6);
+  float4 const x_60 = *(tint_symbol_4);
   float2 const x_63 = x_19.resolution;
   param_6 = (float2(x_60.x, x_60.y) / x_63);
   param_7 = float2(0.699999988f, 0.300000012f);
   param_8 = float2(0.5f, 0.899999976f);
   param_9 = float2(0.100000001f, 0.400000006f);
-  int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_7);
+  int const x_65 = pointInTriangle_vf2_vf2_vf2_vf2_(x_11, &(param_6), &(param_7), &(param_8), &(param_9), tint_symbol_5);
   if ((x_65 == 1)) {
     float const x_71 = x_11.injectionSwitch.y;
     float const x_73 = x_11.injectionSwitch.x;
     if ((x_71 >= x_73)) {
-      *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
+main_out tint_symbol_inner(constant buf0& x_19, constant buf1& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_19, x_11, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_19 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_19, x_11, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_19, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl
index f6f974f..3fcb795 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl
index 0c45980..6631485 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   tint_array_wrapper tree_1 = {};
   BST param = {};
   tint_array_wrapper const x_37 = tree_1;
@@ -40,15 +40,21 @@
     return;
   }
   tint_array_wrapper const x_12 = tree_1;
-  *(tint_symbol_4) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl
index f6f974f..3fcb795 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl
index 0c45980..6631485 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-and-unreachable-infinite-loop/0.wgsl.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   tint_array_wrapper tree_1 = {};
   BST param = {};
   tint_array_wrapper const x_37 = tree_1;
@@ -40,15 +40,21 @@
     return;
   }
   tint_array_wrapper const x_12 = tree_1;
-  *(tint_symbol_4) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(float(x_12.arr[0u].rightIndex), 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl
index a1dacbe..c7913b7 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.hlsl
@@ -12,11 +12,11 @@
 
 void main_1() {
   int index = 0;
+  const struct_base tint_symbol_2 = {1, 1, 1};
   const struct_base tint_symbol_3 = {1, 1, 1};
   const struct_base tint_symbol_4 = {1, 1, 1};
-  const struct_base tint_symbol_5 = {1, 1, 1};
-  const struct_base tint_symbol_6[3] = {tint_symbol_3, tint_symbol_4, tint_symbol_5};
-  struct_array = tint_symbol_6;
+  const struct_base tint_symbol_5[3] = {tint_symbol_2, tint_symbol_3, tint_symbol_4};
+  struct_array = tint_symbol_5;
   index = 1;
   struct_array[1].rightIndex = 1;
   const int x_39 = struct_array[1].leftIndex;
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl
index 0f1196e..72d1271 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm.expected.msl
@@ -19,40 +19,46 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int index = 0;
+  struct_base const tint_symbol_2 = {.data=1, .leftIndex=1, .rightIndex=1};
   struct_base const tint_symbol_3 = {.data=1, .leftIndex=1, .rightIndex=1};
   struct_base const tint_symbol_4 = {.data=1, .leftIndex=1, .rightIndex=1};
-  struct_base const tint_symbol_5 = {.data=1, .leftIndex=1, .rightIndex=1};
-  tint_array_wrapper const tint_symbol_6 = {.arr={tint_symbol_3, tint_symbol_4, tint_symbol_5}};
-  *(tint_symbol_8) = tint_symbol_6;
+  tint_array_wrapper const tint_symbol_5 = {.arr={tint_symbol_2, tint_symbol_3, tint_symbol_4}};
+  *(tint_symbol_7) = tint_symbol_5;
   index = 1;
-  (*(tint_symbol_8)).arr[1].rightIndex = 1;
-  int const x_39 = (*(tint_symbol_8)).arr[1].leftIndex;
+  (*(tint_symbol_7)).arr[1].rightIndex = 1;
+  int const x_39 = (*(tint_symbol_7)).arr[1].leftIndex;
   if ((x_39 == 1)) {
     float const x_45 = x_8.injectionSwitch.x;
-    int const x_48 = (*(tint_symbol_8)).arr[int(x_45)].rightIndex;
+    int const x_48 = (*(tint_symbol_7)).arr[int(x_45)].rightIndex;
     index = x_48;
   } else {
     float const x_50 = x_8.injectionSwitch.y;
-    int const x_53 = (*(tint_symbol_8)).arr[int(x_50)].leftIndex;
+    int const x_53 = (*(tint_symbol_7)).arr[int(x_50)].leftIndex;
     index = x_53;
   }
-  int const x_55 = (*(tint_symbol_8)).arr[1].leftIndex;
+  int const x_55 = (*(tint_symbol_7)).arr[1].leftIndex;
   if ((x_55 == 1)) {
-    *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  main_1(x_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
-  thread tint_array_wrapper tint_symbol_10 = {};
-  thread float4 tint_symbol_11 = 0.0f;
-  main_1(x_8, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_7;
+  thread tint_array_wrapper tint_symbol_11 = {};
+  thread float4 tint_symbol_12 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl
index a1dacbe..c7913b7 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.hlsl
@@ -12,11 +12,11 @@
 
 void main_1() {
   int index = 0;
+  const struct_base tint_symbol_2 = {1, 1, 1};
   const struct_base tint_symbol_3 = {1, 1, 1};
   const struct_base tint_symbol_4 = {1, 1, 1};
-  const struct_base tint_symbol_5 = {1, 1, 1};
-  const struct_base tint_symbol_6[3] = {tint_symbol_3, tint_symbol_4, tint_symbol_5};
-  struct_array = tint_symbol_6;
+  const struct_base tint_symbol_5[3] = {tint_symbol_2, tint_symbol_3, tint_symbol_4};
+  struct_array = tint_symbol_5;
   index = 1;
   struct_array[1].rightIndex = 1;
   const int x_39 = struct_array[1].leftIndex;
@@ -45,9 +45,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_7 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_7;
+  const main_out tint_symbol_6 = {x_GLF_color};
+  return tint_symbol_6;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl
index 0f1196e..72d1271 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl.expected.msl
@@ -19,40 +19,46 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_8, thread float4* const tint_symbol_9) {
+void main_1(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_7, thread float4* const tint_symbol_8) {
   int index = 0;
+  struct_base const tint_symbol_2 = {.data=1, .leftIndex=1, .rightIndex=1};
   struct_base const tint_symbol_3 = {.data=1, .leftIndex=1, .rightIndex=1};
   struct_base const tint_symbol_4 = {.data=1, .leftIndex=1, .rightIndex=1};
-  struct_base const tint_symbol_5 = {.data=1, .leftIndex=1, .rightIndex=1};
-  tint_array_wrapper const tint_symbol_6 = {.arr={tint_symbol_3, tint_symbol_4, tint_symbol_5}};
-  *(tint_symbol_8) = tint_symbol_6;
+  tint_array_wrapper const tint_symbol_5 = {.arr={tint_symbol_2, tint_symbol_3, tint_symbol_4}};
+  *(tint_symbol_7) = tint_symbol_5;
   index = 1;
-  (*(tint_symbol_8)).arr[1].rightIndex = 1;
-  int const x_39 = (*(tint_symbol_8)).arr[1].leftIndex;
+  (*(tint_symbol_7)).arr[1].rightIndex = 1;
+  int const x_39 = (*(tint_symbol_7)).arr[1].leftIndex;
   if ((x_39 == 1)) {
     float const x_45 = x_8.injectionSwitch.x;
-    int const x_48 = (*(tint_symbol_8)).arr[int(x_45)].rightIndex;
+    int const x_48 = (*(tint_symbol_7)).arr[int(x_45)].rightIndex;
     index = x_48;
   } else {
     float const x_50 = x_8.injectionSwitch.y;
-    int const x_53 = (*(tint_symbol_8)).arr[int(x_50)].leftIndex;
+    int const x_53 = (*(tint_symbol_7)).arr[int(x_50)].leftIndex;
     index = x_53;
   }
-  int const x_55 = (*(tint_symbol_8)).arr[1].leftIndex;
+  int const x_55 = (*(tint_symbol_7)).arr[1].leftIndex;
   if ((x_55 == 1)) {
-    *(tint_symbol_9) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_8) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+    *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  main_1(x_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
+  return tint_symbol_6;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
-  thread tint_array_wrapper tint_symbol_10 = {};
-  thread float4 tint_symbol_11 = 0.0f;
-  main_1(x_8, &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_11};
-  tint_symbol_1 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_7;
+  thread tint_array_wrapper tint_symbol_11 = {};
+  thread float4 tint_symbol_12 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_11), &(tint_symbol_12));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl
index ba47317..e93a1af 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.hlsl
@@ -11,8 +11,8 @@
 void main_1() {
   S ll = (S)0;
   float sums[9] = (float[9])0;
-  const S tint_symbol_3 = {0, bool3(true, true, true)};
-  ll = tint_symbol_3;
+  const S tint_symbol_2 = {0, bool3(true, true, true)};
+  ll = tint_symbol_2;
   while (true) {
     const S x_12 = ll;
     const float x_45 = asfloat(x_7[0].y);
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl
index 61dfc81..afc2ac2 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl
@@ -18,11 +18,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
   S ll = {};
   tint_array_wrapper sums = {};
-  S const tint_symbol_3 = {.f0=0, .f1=bool3(true, true, true)};
-  ll = tint_symbol_3;
+  S const tint_symbol_2 = {.f0=0, .f1=bool3(true, true, true)};
+  ll = tint_symbol_2;
   while (true) {
     S const x_12 = ll;
     float const x_45 = x_7.injectionSwitch.y;
@@ -42,15 +42,21 @@
   }
   float const x_53 = sums.arr[0];
   float2 const x_54 = float2(x_53, x_53);
-  *(tint_symbol_5) = float4(1.0f, x_54.x, x_54.y, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, x_54.x, x_54.y, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl
index ba47317..e93a1af 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.hlsl
@@ -11,8 +11,8 @@
 void main_1() {
   S ll = (S)0;
   float sums[9] = (float[9])0;
-  const S tint_symbol_3 = {0, bool3(true, true, true)};
-  ll = tint_symbol_3;
+  const S tint_symbol_2 = {0, bool3(true, true, true)};
+  ll = tint_symbol_2;
   while (true) {
     const S x_12 = ll;
     const float x_45 = asfloat(x_7[0].y);
@@ -41,9 +41,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl
index 61dfc81..afc2ac2 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl
@@ -18,11 +18,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
   S ll = {};
   tint_array_wrapper sums = {};
-  S const tint_symbol_3 = {.f0=0, .f1=bool3(true, true, true)};
-  ll = tint_symbol_3;
+  S const tint_symbol_2 = {.f0=0, .f1=bool3(true, true, true)};
+  ll = tint_symbol_2;
   while (true) {
     S const x_12 = ll;
     float const x_45 = x_7.injectionSwitch.y;
@@ -42,15 +42,21 @@
   }
   float const x_53 = sums.arr[0];
   float2 const x_54 = float2(x_53, x_53);
-  *(tint_symbol_5) = float4(1.0f, x_54.x, x_54.y, 1.0f);
+  *(tint_symbol_4) = float4(1.0f, x_54.x, x_54.y, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl
index 82d98ae..889d38a 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_3_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_3};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_3_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_3};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl
index c193507..4e2f0d0 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.spvasm.expected.msl
@@ -14,20 +14,26 @@
   float4 x_3_1 [[color(0)]];
 };
 
-void main_1(constant S& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant S& x_5, thread float4* const tint_symbol_3) {
   float4 const x_20 = x_5.field0;
   S_1 x_21_1 = {.field0=float4(0.0f, 0.0f, 0.0f, 0.0f)};
   x_21_1.field0 = x_20;
   S_1 const x_21 = x_21_1;
-  *(tint_symbol_4) = x_21.field0;
+  *(tint_symbol_3) = x_21.field0;
   return;
 }
 
+main_out tint_symbol_inner(constant S& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_3_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant S& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_3_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_3_1=tint_symbol_2.x_3_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl
index 82d98ae..889d38a 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_3_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_3};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_3_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_3};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl
index c193507..4e2f0d0 100644
--- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl.expected.msl
@@ -14,20 +14,26 @@
   float4 x_3_1 [[color(0)]];
 };
 
-void main_1(constant S& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant S& x_5, thread float4* const tint_symbol_3) {
   float4 const x_20 = x_5.field0;
   S_1 x_21_1 = {.field0=float4(0.0f, 0.0f, 0.0f, 0.0f)};
   x_21_1.field0 = x_20;
   S_1 const x_21 = x_21_1;
-  *(tint_symbol_4) = x_21.field0;
+  *(tint_symbol_3) = x_21.field0;
   return;
 }
 
+main_out tint_symbol_inner(constant S& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_3_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant S& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_3_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_3_1=tint_symbol_2.x_3_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_3_1 = inner_result.x_3_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl
index 89dad7e..4ae6c7c 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl
index e06f14d..c7ed117 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_25 = x_5.injectionSwitch.y;
   switch(int(x_25)) {
     case -1: {
@@ -26,15 +26,21 @@
       break;
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl
index 89dad7e..4ae6c7c 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.hlsl
@@ -29,9 +29,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl
index e06f14d..c7ed117 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float const x_25 = x_5.injectionSwitch.y;
   switch(int(x_25)) {
     case -1: {
@@ -26,15 +26,21 @@
       break;
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl
index 804140c..6e4aa39 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl
index e33cab5..0ade69e 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.spvasm.expected.msl
@@ -19,9 +19,9 @@
   return 0;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int res = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_32 = x_6.zero;
     switch(int(x_32)) {
@@ -44,15 +44,21 @@
   res = x_8;
   int const x_9 = res;
   float const x_36 = float(x_9);
-  *(tint_symbol_4) = float4(x_36, x_36, x_36, x_36);
+  *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl
index 804140c..6e4aa39 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl
index e33cab5..0ade69e 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl.expected.msl
@@ -19,9 +19,9 @@
   return 0;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int res = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_32 = x_6.zero;
     switch(int(x_32)) {
@@ -44,15 +44,21 @@
   res = x_8;
   int const x_9 = res;
   float const x_36 = float(x_9);
-  *(tint_symbol_4) = float4(x_36, x_36, x_36, x_36);
+  *(tint_symbol_3) = float4(x_36, x_36, x_36, x_36);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl
index b2d8ae5..992eceb 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   float const x_51 = x_6.injectionSwitch.x;
   i = int(x_51);
@@ -69,18 +69,24 @@
   }
   int const x_22 = i;
   if ((x_22 == -2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl
index b2d8ae5..992eceb 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   float const x_51 = x_6.injectionSwitch.x;
   i = int(x_51);
@@ -69,18 +69,24 @@
   }
   int const x_22 = i;
   if ((x_22 == -2)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl
index 3d10737..7abe1c8 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl
index 0c08cdc..bcf0061 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   switch(0) {
     case 0: {
       if (false) {
@@ -19,15 +19,21 @@
       break;
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl
index 3d10737..7abe1c8 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.hlsl
@@ -22,9 +22,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl
index 0c08cdc..bcf0061 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   switch(0) {
     case 0: {
       if (false) {
@@ -19,15 +19,21 @@
       break;
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl
index 2e3da9b..b914058 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.hlsl
@@ -96,9 +96,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl
index 3f25a16..1be3886 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   int value = 0;
   float y = 0.0f;
@@ -51,7 +51,7 @@
       case 2: {
         float const x_46 = x_46_phi;
         if ((x_46 == 1.0f)) {
-          *(tint_symbol_4) = float4(float(as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)))), 0.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(float(as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)))), 0.0f, 0.0f, 1.0f);
           return;
         }
         break;
@@ -66,11 +66,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl
index 2e3da9b..b914058 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.hlsl
@@ -96,9 +96,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl
index 3f25a16..1be3886 100644
--- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int i = 0;
   int value = 0;
   float y = 0.0f;
@@ -51,7 +51,7 @@
       case 2: {
         float const x_46 = x_46_phi;
         if ((x_46 == 1.0f)) {
-          *(tint_symbol_4) = float4(float(as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)))), 0.0f, 0.0f, 1.0f);
+          *(tint_symbol_3) = float4(float(as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)))), 0.0f, 0.0f, 1.0f);
           return;
         }
         break;
@@ -66,11 +66,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl
index 2999e7d..4a7a33d 100644
--- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.hlsl
@@ -36,11 +36,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl
index f58d0ac..35079da 100644
--- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.spvasm.expected.msl
@@ -4,15 +4,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4x3 x_37 = float4x3(0.0f);
   float4x3 x_38_phi = float4x3(0.0f);
   float3 x_48_phi = 0.0f;
-  float const x_32 = (*(tint_symbol_5)).y;
+  float const x_32 = (*(tint_symbol_3)).y;
   if ((x_32 < 1.0f)) {
     x_38_phi = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f));
   } else {
@@ -30,17 +30,23 @@
     break;
   }
   float3 const x_48 = x_48_phi;
-  *(tint_symbol_6) = float4(x_48.x, x_48.y, x_48.z, 1.0f);
+  *(tint_symbol_4) = float4(x_48.x, x_48.y, x_48.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl
index 2999e7d..4a7a33d 100644
--- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.hlsl
@@ -36,11 +36,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl
index f58d0ac..35079da 100644
--- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl.expected.msl
@@ -4,15 +4,15 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float4x3 x_37 = float4x3(0.0f);
   float4x3 x_38_phi = float4x3(0.0f);
   float3 x_48_phi = 0.0f;
-  float const x_32 = (*(tint_symbol_5)).y;
+  float const x_32 = (*(tint_symbol_3)).y;
   if ((x_32 < 1.0f)) {
     x_38_phi = float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f));
   } else {
@@ -30,17 +30,23 @@
     break;
   }
   float3 const x_48 = x_48_phi;
-  *(tint_symbol_6) = float4(x_48.x, x_48.y, x_48.z, 1.0f);
+  *(tint_symbol_4) = float4(x_48.x, x_48.y, x_48.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl
index e97beb7..d0d6cae 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.hlsl
@@ -86,11 +86,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl
index a21c19e..b2a9e1d 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl
@@ -7,23 +7,23 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int odd_index = 0;
   int even_index = 0;
   int j = 0;
   int ll = 0;
   bool x_59 = false;
   bool x_60_phi = false;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  float const x_53 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  float const x_53 = (*(tint_symbol_4)).x;
   bool const x_54 = (x_53 < 128.0f);
   x_60_phi = x_54;
   if (x_54) {
-    float const x_58 = (*(tint_symbol_6)).y;
+    float const x_58 = (*(tint_symbol_4)).y;
     x_59 = (x_58 < 128.0f);
     x_60_phi = x_59;
   }
@@ -38,8 +38,8 @@
     } else {
       break;
     }
-    float const x_70 = (*(tint_symbol_5)).x;
-    (*(tint_symbol_5)).x = (x_70 + 0.25f);
+    float const x_70 = (*(tint_symbol_3)).x;
+    (*(tint_symbol_3)).x = (x_70 + 0.25f);
     int const x_12 = odd_index;
     odd_index = as_type<int>((as_type<uint>(x_12) + as_type<uint>(1)));
   }
@@ -50,8 +50,8 @@
     } else {
       break;
     }
-    float const x_80 = (*(tint_symbol_5)).x;
-    (*(tint_symbol_5)).x = (x_80 + 0.25f);
+    float const x_80 = (*(tint_symbol_3)).x;
+    (*(tint_symbol_3)).x = (x_80 + 0.25f);
     float const x_84 = x_8.injectionSwitch.x;
     float const x_86 = x_8.injectionSwitch.y;
     if ((x_84 > x_86)) {
@@ -94,7 +94,7 @@
     float const x_113 = x_8.injectionSwitch.x;
     float const x_115 = x_8.injectionSwitch.y;
     if ((x_113 > x_115)) {
-      *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     }
     int const x_22 = even_index;
     even_index = as_type<int>((as_type<uint>(x_22) - as_type<uint>(1)));
@@ -102,13 +102,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl
index e97beb7..d0d6cae 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.hlsl
@@ -86,11 +86,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl
index a21c19e..b2a9e1d 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl
@@ -7,23 +7,23 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int odd_index = 0;
   int even_index = 0;
   int j = 0;
   int ll = 0;
   bool x_59 = false;
   bool x_60_phi = false;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  float const x_53 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  float const x_53 = (*(tint_symbol_4)).x;
   bool const x_54 = (x_53 < 128.0f);
   x_60_phi = x_54;
   if (x_54) {
-    float const x_58 = (*(tint_symbol_6)).y;
+    float const x_58 = (*(tint_symbol_4)).y;
     x_59 = (x_58 < 128.0f);
     x_60_phi = x_59;
   }
@@ -38,8 +38,8 @@
     } else {
       break;
     }
-    float const x_70 = (*(tint_symbol_5)).x;
-    (*(tint_symbol_5)).x = (x_70 + 0.25f);
+    float const x_70 = (*(tint_symbol_3)).x;
+    (*(tint_symbol_3)).x = (x_70 + 0.25f);
     int const x_12 = odd_index;
     odd_index = as_type<int>((as_type<uint>(x_12) + as_type<uint>(1)));
   }
@@ -50,8 +50,8 @@
     } else {
       break;
     }
-    float const x_80 = (*(tint_symbol_5)).x;
-    (*(tint_symbol_5)).x = (x_80 + 0.25f);
+    float const x_80 = (*(tint_symbol_3)).x;
+    (*(tint_symbol_3)).x = (x_80 + 0.25f);
     float const x_84 = x_8.injectionSwitch.x;
     float const x_86 = x_8.injectionSwitch.y;
     if ((x_84 > x_86)) {
@@ -94,7 +94,7 @@
     float const x_113 = x_8.injectionSwitch.x;
     float const x_115 = x_8.injectionSwitch.y;
     if ((x_113 > x_115)) {
-      *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
     }
     int const x_22 = even_index;
     even_index = as_type<int>((as_type<uint>(x_22) - as_type<uint>(1)));
@@ -102,13 +102,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_8, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_8, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_8, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl
index 807ea01..9fc8bfb 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl
index 4958a8e..001e8ee 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int x = 0;
   float4 matrix_u = 0.0f;
   int b = 0;
@@ -55,15 +55,21 @@
       b = as_type<int>((as_type<uint>(x_16) - as_type<uint>(1)));
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl
index 807ea01..9fc8bfb 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.hlsl
@@ -50,9 +50,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl
index 4958a8e..001e8ee 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
   int x = 0;
   float4 matrix_u = 0.0f;
   int b = 0;
@@ -55,15 +55,21 @@
       b = as_type<int>((as_type<uint>(x_16) - as_type<uint>(1)));
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
+  main_1(x_8, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_8, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl
index 3a00c14..459dc1b 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.hlsl
@@ -16,8 +16,8 @@
   int x_9_phi = 0;
   StructType x_42_phi = (StructType)0;
   int x_10_phi = 0;
-  const StructType tint_symbol_3 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)};
-  x_33_phi = tint_symbol_3;
+  const StructType tint_symbol_2 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)};
+  x_33_phi = tint_symbol_2;
   x_9_phi = 0;
   while (true) {
     StructType x_34 = (StructType)0;
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl
index 8092888..8357daf 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl
@@ -15,7 +15,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
   StructType x_33 = {};
   int x_38 = 0;
   StructType x_42 = {};
@@ -23,8 +23,8 @@
   int x_9_phi = 0;
   StructType x_42_phi = {};
   int x_10_phi = 0;
-  StructType const tint_symbol_3 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)};
-  x_33_phi = tint_symbol_3;
+  StructType const tint_symbol_2 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)};
+  x_33_phi = tint_symbol_2;
   x_9_phi = 0;
   while (true) {
     StructType x_34 = {};
@@ -65,15 +65,21 @@
     }
   }
   float3 const x_47 = x_42.col;
-  *(tint_symbol_5) = float4(x_47.x, x_47.y, x_47.z, 1.0f);
+  *(tint_symbol_4) = float4(x_47.x, x_47.y, x_47.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5) {
+  main_1(x_5, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_5, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl
index 3a00c14..459dc1b 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.hlsl
@@ -16,8 +16,8 @@
   int x_9_phi = 0;
   StructType x_42_phi = (StructType)0;
   int x_10_phi = 0;
-  const StructType tint_symbol_3 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)};
-  x_33_phi = tint_symbol_3;
+  const StructType tint_symbol_2 = {float3(0.0f, 0.0f, 0.0f), bool4(false, false, false, false)};
+  x_33_phi = tint_symbol_2;
   x_9_phi = 0;
   while (true) {
     StructType x_34 = (StructType)0;
@@ -69,9 +69,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_4;
+  const main_out tint_symbol_3 = {x_GLF_color};
+  return tint_symbol_3;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl
index 8092888..8357daf 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl
@@ -15,7 +15,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
   StructType x_33 = {};
   int x_38 = 0;
   StructType x_42 = {};
@@ -23,8 +23,8 @@
   int x_9_phi = 0;
   StructType x_42_phi = {};
   int x_10_phi = 0;
-  StructType const tint_symbol_3 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)};
-  x_33_phi = tint_symbol_3;
+  StructType const tint_symbol_2 = {.col=float3(0.0f, 0.0f, 0.0f), .bbbb=bool4(false, false, false, false)};
+  x_33_phi = tint_symbol_2;
   x_9_phi = 0;
   while (true) {
     StructType x_34 = {};
@@ -65,15 +65,21 @@
     }
   }
   float3 const x_47 = x_42.col;
-  *(tint_symbol_5) = float4(x_47.x, x_47.y, x_47.z, 1.0f);
+  *(tint_symbol_4) = float4(x_47.x, x_47.y, x_47.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_5) {
+  main_1(x_5, tint_symbol_5);
+  main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_3;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_5, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl
index 55bac3a..88ec1bb 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl
index 0cb64a4..3d21748 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 GLF_live15c = 0.0f;
   int GLF_live15i = 0;
   float4 GLF_live15d = 0.0f;
@@ -57,15 +57,21 @@
       GLF_live15i_1 = as_type<int>((as_type<uint>(x_16) + as_type<uint>(1)));
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl
index 55bac3a..88ec1bb 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.hlsl
@@ -46,9 +46,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl
index 0cb64a4..3d21748 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4 GLF_live15c = 0.0f;
   int GLF_live15i = 0;
   float4 GLF_live15d = 0.0f;
@@ -57,15 +57,21 @@
       GLF_live15i_1 = as_type<int>((as_type<uint>(x_16) + as_type<uint>(1)));
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl
index 47412bc..a05b43e 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.hlsl
@@ -66,11 +66,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl
index d76e41a..c13a2f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl
@@ -7,21 +7,21 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int i_1 = 0;
   int i_2 = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   float const x_35 = x_7.injectionSwitch.y;
   if ((x_35 < 0.0f)) {
   } else {
     bool x_42 = false;
-    float const x_41 = (*(tint_symbol_6)).y;
+    float const x_41 = (*(tint_symbol_4)).y;
     x_42 = (x_41 < -1.0f);
     if (x_42) {
     } else {
@@ -82,13 +82,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl
index 47412bc..a05b43e 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.hlsl
@@ -66,11 +66,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl
index d76e41a..c13a2f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl
@@ -7,21 +7,21 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   int i = 0;
   int i_1 = 0;
   int i_2 = 0;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   float const x_35 = x_7.injectionSwitch.y;
   if ((x_35 < 0.0f)) {
   } else {
     bool x_42 = false;
-    float const x_41 = (*(tint_symbol_6)).y;
+    float const x_41 = (*(tint_symbol_4)).y;
     x_42 = (x_41 < -1.0f);
     if (x_42) {
     } else {
@@ -82,13 +82,19 @@
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl
index 82947bc..4acc343 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return float3(1.0f, 1.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int j = 0;
   float const x_37 = x_7.injectionSwitch.x;
   float const x_39 = x_7.injectionSwitch.y;
@@ -40,15 +40,21 @@
       }
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl
index 82947bc..4acc343 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-nested-infinite-loops-discard/0-opt.wgsl.expected.msl
@@ -24,7 +24,7 @@
   return float3(1.0f, 1.0f, 1.0f);
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int j = 0;
   float const x_37 = x_7.injectionSwitch.x;
   float const x_39 = x_7.injectionSwitch.y;
@@ -40,15 +40,21 @@
       }
     }
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  main_1(x_7, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_7, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl
index 3986db2..6fc3bb7 100644
--- a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.spvasm.expected.msl
@@ -14,11 +14,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int GLF_dead6index = 0;
   int GLF_dead6currentNode = 0;
   tint_array_wrapper donor_replacementGLF_dead6tree = {};
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   GLF_dead6index = 0;
   float const x_34 = x_6.injectionSwitch.y;
   if ((x_34 < 0.0f)) {
@@ -37,11 +37,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl
index 3986db2..6fc3bb7 100644
--- a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl.expected.msl
@@ -14,11 +14,11 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int GLF_dead6index = 0;
   int GLF_dead6currentNode = 0;
   tint_array_wrapper donor_replacementGLF_dead6tree = {};
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   GLF_dead6index = 0;
   float const x_34 = x_6.injectionSwitch.y;
   if ((x_34 < 0.0f)) {
@@ -37,11 +37,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl
index 301c375..e683960 100644
--- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.hlsl
@@ -78,9 +78,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl
index 4c1cf9d..1d7bf38 100644
--- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.spvasm.expected.msl
@@ -11,12 +11,12 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_4) {
+int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int GLF_live0i = 0;
   int i = 0;
   int x_11 = 0;
   int x_10_phi = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   x_10_phi = 0;
   while (true) {
     int x_11_phi = 0;
@@ -74,16 +74,22 @@
   return x_11;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
-  int const x_9 = performPartition_(x_6, tint_symbol_5);
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  int const x_9 = performPartition_(x_6, tint_symbol_4);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl
index 301c375..e683960 100644
--- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.hlsl
@@ -78,9 +78,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl
index 4c1cf9d..1d7bf38 100644
--- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl.expected.msl
@@ -11,12 +11,12 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_4) {
+int performPartition_(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int GLF_live0i = 0;
   int i = 0;
   int x_11 = 0;
   int x_10_phi = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   x_10_phi = 0;
   while (true) {
     int x_11_phi = 0;
@@ -74,16 +74,22 @@
   return x_11;
 }
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
-  int const x_9 = performPartition_(x_6, tint_symbol_5);
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  int const x_9 = performPartition_(x_6, tint_symbol_4);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_5) {
+  main_1(x_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_6, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl
index 704ebff..7fadd48 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl
index f3bfdd2..58a69c7 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float x_30 = 0.0f;
   float x_32_phi = 0.0f;
   x_32_phi = 0.0f;
@@ -23,7 +23,7 @@
     float const x_39 = x_5.injectionSwitch.x;
     float const x_41 = x_5.injectionSwitch.y;
     if ((x_39 < x_41)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       return;
     } else {
       {
@@ -38,11 +38,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl
index 704ebff..7fadd48 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl
index f3bfdd2..58a69c7 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   float x_30 = 0.0f;
   float x_32_phi = 0.0f;
   x_32_phi = 0.0f;
@@ -23,7 +23,7 @@
     float const x_39 = x_5.injectionSwitch.x;
     float const x_41 = x_5.injectionSwitch.y;
     if ((x_39 < x_41)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       return;
     } else {
       {
@@ -38,11 +38,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl
index 9722e0d..e5df2ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.hlsl
@@ -28,11 +28,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl
index a3f6ec6..1a14fee 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.spvasm.expected.msl
@@ -4,17 +4,17 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float x_30 = 0.0f;
   uint foo = 0u;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  float const x_32 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  float const x_32 = (*(tint_symbol_4)).x;
   if ((x_32 > -1.0f)) {
-    float const x_38 = (*(tint_symbol_5)).x;
+    float const x_38 = (*(tint_symbol_3)).x;
     x_30 = x_38;
   } else {
     uint const x_6 = foo;
@@ -23,17 +23,23 @@
     x_30 = float((178493u + x_7));
   }
   float const x_40 = x_30;
-  (*(tint_symbol_5)).x = x_40;
+  (*(tint_symbol_3)).x = x_40;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl
index 9722e0d..e5df2ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.hlsl
@@ -28,11 +28,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl
index a3f6ec6..1a14fee 100644
--- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl.expected.msl
@@ -4,17 +4,17 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   float x_30 = 0.0f;
   uint foo = 0u;
-  *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  float const x_32 = (*(tint_symbol_6)).x;
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  float const x_32 = (*(tint_symbol_4)).x;
   if ((x_32 > -1.0f)) {
-    float const x_38 = (*(tint_symbol_5)).x;
+    float const x_38 = (*(tint_symbol_3)).x;
     x_30 = x_38;
   } else {
     uint const x_6 = foo;
@@ -23,17 +23,23 @@
     x_30 = float((178493u + x_7));
   }
   float const x_40 = x_30;
-  (*(tint_symbol_5)).x = x_40;
+  (*(tint_symbol_3)).x = x_40;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_6, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_7));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl
index 47ae9f1..6b88e19 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.hlsl
@@ -98,10 +98,13 @@
   uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param;
+void main_inner(uint3 gl_GlobalInvocationID_param) {
   gl_GlobalInvocationID = gl_GlobalInvocationID_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_GlobalInvocationID_param);
   return;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl
index 7138b3e..1efbb49 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float arr[1];
 };
 
-void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_2) {
+void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_1) {
   tint_array_wrapper A = {};
   int i = 0;
   float4 value = 0.0f;
@@ -41,7 +41,7 @@
     }
   }
   while (true) {
-    uint const x_80 = (*(tint_symbol_2)).x;
+    uint const x_80 = (*(tint_symbol_1)).x;
     if ((x_80 < 100u)) {
       value = float4(0.0f, 0.0f, 0.0f, 1.0f);
       m = 0;
@@ -91,7 +91,7 @@
         }
       }
     } else {
-      uint const x_127 = (*(tint_symbol_2)).x;
+      uint const x_127 = (*(tint_symbol_1)).x;
       if ((x_127 < 120u)) {
         float const x_133 = A.arr[0];
         float const x_135 = x_13.resolution.x;
@@ -130,10 +130,14 @@
   return;
 }
 
+void tint_symbol_inner(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_GlobalInvocationID_param;
+  main_1(x_10, x_13, x_15, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(1)]], constant buf2& x_13 [[buffer(2)]], device doesNotMatter& x_15 [[buffer(0)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_GlobalInvocationID_param;
-  main_1(x_10, x_13, x_15, &(tint_symbol_3));
+  tint_symbol_inner(x_10, x_13, x_15, gl_GlobalInvocationID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl
index 47ae9f1..6b88e19 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.hlsl
@@ -98,10 +98,13 @@
   uint3 gl_GlobalInvocationID_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_GlobalInvocationID_param = tint_symbol.gl_GlobalInvocationID_param;
+void main_inner(uint3 gl_GlobalInvocationID_param) {
   gl_GlobalInvocationID = gl_GlobalInvocationID_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_GlobalInvocationID_param);
   return;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl
index 7138b3e..1efbb49 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float arr[1];
 };
 
-void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_2) {
+void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, thread uint3* const tint_symbol_1) {
   tint_array_wrapper A = {};
   int i = 0;
   float4 value = 0.0f;
@@ -41,7 +41,7 @@
     }
   }
   while (true) {
-    uint const x_80 = (*(tint_symbol_2)).x;
+    uint const x_80 = (*(tint_symbol_1)).x;
     if ((x_80 < 100u)) {
       value = float4(0.0f, 0.0f, 0.0f, 1.0f);
       m = 0;
@@ -91,7 +91,7 @@
         }
       }
     } else {
-      uint const x_127 = (*(tint_symbol_2)).x;
+      uint const x_127 = (*(tint_symbol_1)).x;
       if ((x_127 < 120u)) {
         float const x_133 = A.arr[0];
         float const x_135 = x_13.resolution.x;
@@ -130,10 +130,14 @@
   return;
 }
 
+void tint_symbol_inner(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_GlobalInvocationID_param;
+  main_1(x_10, x_13, x_15, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(1)]], constant buf2& x_13 [[buffer(2)]], device doesNotMatter& x_15 [[buffer(0)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_GlobalInvocationID_param;
-  main_1(x_10, x_13, x_15, &(tint_symbol_3));
+  tint_symbol_inner(x_10, x_13, x_15, gl_GlobalInvocationID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl
index 701d8d9..3c44a6c 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl
index ac448be..83386e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.spvasm.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_4) {
+float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int x_injected_loop_counter = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   x_injected_loop_counter = 1;
   while (true) {
     float const x_38 = x_7.injectionSwitch.x;
@@ -31,16 +31,22 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
-  float3 const x_31 = computeColor_(x_7, tint_symbol_5);
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  float3 const x_31 = computeColor_(x_7, tint_symbol_4);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl
index 701d8d9..3c44a6c 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl
index ac448be..83386e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_4) {
+float3 computeColor_(constant buf0& x_7, thread float4* const tint_symbol_3) {
   int x_injected_loop_counter = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   x_injected_loop_counter = 1;
   while (true) {
     float const x_38 = x_7.injectionSwitch.x;
@@ -31,16 +31,22 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) {
-  float3 const x_31 = computeColor_(x_7, tint_symbol_5);
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) {
+  float3 const x_31 = computeColor_(x_7, tint_symbol_4);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_5) {
+  main_1(x_7, tint_symbol_5);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_5)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
-  main_1(x_7, &(tint_symbol_6));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_6};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_6));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl
index ccaa960..3afde97 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.hlsl
@@ -40,11 +40,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl
index d52c896..4a64335 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.spvasm.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -20,30 +20,36 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   bool x_34 = false;
   while (true) {
     float3 const x_36 = computePoint_(x_7);
-    float const x_41 = (*(tint_symbol_5)).x;
+    float const x_41 = (*(tint_symbol_3)).x;
     if ((x_41 < 0.0f)) {
       x_34 = true;
       break;
     }
     float3 const x_45 = computePoint_(x_7);
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     x_34 = true;
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl
index ccaa960..3afde97 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.hlsl
@@ -40,11 +40,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl
index d52c896..4a64335 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl.expected.msl
@@ -7,7 +7,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -20,30 +20,36 @@
   return float3(0.0f, 0.0f, 0.0f);
 }
 
-void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
   bool x_34 = false;
   while (true) {
     float3 const x_36 = computePoint_(x_7);
-    float const x_41 = (*(tint_symbol_5)).x;
+    float const x_41 = (*(tint_symbol_3)).x;
     if ((x_41 < 0.0f)) {
       x_34 = true;
       break;
     }
     float3 const x_45 = computePoint_(x_7);
-    *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     x_34 = true;
     break;
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_7, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(x_7, tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_7, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl
index a06fe40..ac1e10c 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.hlsl
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl
index e65fcde..e2334b4 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl
@@ -34,9 +34,9 @@
   return x_52;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   while (true) {
     int const x_8 = i;
@@ -53,11 +53,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl
index a06fe40..ac1e10c 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.hlsl
@@ -47,9 +47,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl
index e65fcde..e2334b4 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl
@@ -34,9 +34,9 @@
   return x_52;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   while (true) {
     int const x_8 = i;
@@ -53,11 +53,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl
index e10a3b8..2d66c64 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl
index 58160d1..2ca222e 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper data = {};
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   while (true) {
     int const x_6 = i;
@@ -60,11 +60,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl
index e10a3b8..2d66c64 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.hlsl
@@ -51,9 +51,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl
index 58160d1..2ca222e 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int i = 0;
   tint_array_wrapper data = {};
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   i = 0;
   while (true) {
     int const x_6 = i;
@@ -60,11 +60,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl
index da051cd..53a077e 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.spvasm.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int m = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   float const x_30 = x_5.injected.x;
   float const x_32 = x_5.injected.y;
   if ((x_30 > x_32)) {
@@ -31,17 +31,23 @@
       } else {
         break;
       }
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl
index da051cd..53a077e 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl.expected.msl
@@ -11,9 +11,9 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_5, thread float4* const tint_symbol_3) {
   int m = 0;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   float const x_30 = x_5.injected.x;
   float const x_32 = x_5.injected.y;
   if ((x_30 > x_32)) {
@@ -31,17 +31,23 @@
       } else {
         break;
       }
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     }
   }
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_5, thread float4* const tint_symbol_4) {
+  main_1(x_5, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_5, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_5, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl
index 1daa960..1adaed3 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool x_21_phi = false;
   x_21_phi = false;
   while (true) {
@@ -34,7 +34,7 @@
     if (x_30) {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     break;
     {
       x_21_phi = false;
@@ -43,11 +43,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl
index 1daa960..1adaed3 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool x_21_phi = false;
   x_21_phi = false;
   while (true) {
@@ -34,7 +34,7 @@
     if (x_30) {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     break;
     {
       x_21_phi = false;
@@ -43,11 +43,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl
index 49c10a4..d7508b2 100644
--- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl
index 7da4273..92961af 100644
--- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool c1 = false;
   float2 uv = 0.0f;
   int i = 0;
@@ -28,7 +28,7 @@
     } else {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     return;
     {
       int const x_7 = i;
@@ -43,11 +43,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl
index 49c10a4..d7508b2 100644
--- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.hlsl
@@ -40,9 +40,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl
index 7da4273..92961af 100644
--- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl
@@ -8,7 +8,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   bool c1 = false;
   float2 uv = 0.0f;
   int i = 0;
@@ -28,7 +28,7 @@
     } else {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     return;
     {
       int const x_7 = i;
@@ -43,11 +43,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl
index f65360e..1488543 100644
--- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.hlsl
@@ -94,11 +94,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl
index 58c2140..ce8bb27 100644
--- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl
@@ -7,18 +7,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_(constant buf0& x_10, thread float4* const tint_symbol_5) {
+float func_(constant buf0& x_10, thread float4* const tint_symbol_3) {
   bool alwaysFalse = false;
   float4 value = 0.0f;
   float2 a = 0.0f;
   int i = 0;
   bool x_121 = false;
   bool x_122_phi = false;
-  float const x_71 = (*(tint_symbol_5)).x;
+  float const x_71 = (*(tint_symbol_3)).x;
   alwaysFalse = (x_71 < -1.0f);
   bool const x_73 = alwaysFalse;
   if (x_73) {
@@ -32,7 +32,7 @@
     float4 const x_85 = value;
     value = float4(x_84.x, x_84.y, x_85.z, x_85.w);
   }
-  float4 const x_87 = *(tint_symbol_5);
+  float4 const x_87 = *(tint_symbol_3);
   float4 const x_89 = value;
   float4 const x_93 = value;
   float2 const x_95 = (((float2(x_87.x, x_87.y) * float2(x_89.x, x_89.y)) * float2(2.0f, 2.0f)) + float2(x_93.x, x_93.y));
@@ -70,7 +70,7 @@
   return 0.0f;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int count = 0;
   int i_1 = 0;
   count = 0;
@@ -82,7 +82,7 @@
     } else {
       break;
     }
-    float const x_58 = func_(x_10, tint_symbol_6);
+    float const x_58 = func_(x_10, tint_symbol_4);
     int const x_60 = count;
     count = as_type<int>((as_type<uint>(x_60) + as_type<uint>(int(x_58))));
     {
@@ -92,20 +92,26 @@
   }
   int const x_64 = count;
   if ((x_64 == 2)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl
index f65360e..1488543 100644
--- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.hlsl
@@ -94,11 +94,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_6;
+  const main_out tint_symbol_5 = {x_GLF_color};
+  return tint_symbol_5;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl
index 58c2140..ce8bb27 100644
--- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl
@@ -7,18 +7,18 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-float func_(constant buf0& x_10, thread float4* const tint_symbol_5) {
+float func_(constant buf0& x_10, thread float4* const tint_symbol_3) {
   bool alwaysFalse = false;
   float4 value = 0.0f;
   float2 a = 0.0f;
   int i = 0;
   bool x_121 = false;
   bool x_122_phi = false;
-  float const x_71 = (*(tint_symbol_5)).x;
+  float const x_71 = (*(tint_symbol_3)).x;
   alwaysFalse = (x_71 < -1.0f);
   bool const x_73 = alwaysFalse;
   if (x_73) {
@@ -32,7 +32,7 @@
     float4 const x_85 = value;
     value = float4(x_84.x, x_84.y, x_85.z, x_85.w);
   }
-  float4 const x_87 = *(tint_symbol_5);
+  float4 const x_87 = *(tint_symbol_3);
   float4 const x_89 = value;
   float4 const x_93 = value;
   float2 const x_95 = (((float2(x_87.x, x_87.y) * float2(x_89.x, x_89.y)) * float2(2.0f, 2.0f)) + float2(x_93.x, x_93.y));
@@ -70,7 +70,7 @@
   return 0.0f;
 }
 
-void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
   int count = 0;
   int i_1 = 0;
   count = 0;
@@ -82,7 +82,7 @@
     } else {
       break;
     }
-    float const x_58 = func_(x_10, tint_symbol_6);
+    float const x_58 = func_(x_10, tint_symbol_4);
     int const x_60 = count;
     count = as_type<int>((as_type<uint>(x_60) + as_type<uint>(int(x_58))));
     {
@@ -92,20 +92,26 @@
   }
   int const x_64 = count;
   if ((x_64 == 2)) {
-    *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_7) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
+main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(x_10, tint_symbol_6, tint_symbol_7);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(x_10, &(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl
index 1051003..8fef5fd 100644
--- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl
index ed94dc2..9b783f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.spvasm.expected.msl
@@ -29,21 +29,27 @@
   return 1;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int const x_9 = func_();
   if ((x_9 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl
index 1051003..8fef5fd 100644
--- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.hlsl
@@ -35,9 +35,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl
index ed94dc2..9b783f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl.expected.msl
@@ -29,21 +29,27 @@
   return 1;
 }
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   int const x_9 = func_();
   if ((x_9 == 1)) {
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   } else {
-    *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 1.0f);
   }
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl
index 257e1e6..6576af4 100644
--- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl
index 042f177..c300c39 100644
--- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.spvasm.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int j = 0;
   float x_41 = 0.0f;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_32 = x_6.injectionSwitch.x;
     j = int(x_32);
@@ -38,11 +38,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl
index 257e1e6..6576af4 100644
--- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.hlsl
@@ -36,9 +36,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl
index 042f177..c300c39 100644
--- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl.expected.msl
@@ -11,10 +11,10 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   int j = 0;
   float x_41 = 0.0f;
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   while (true) {
     float const x_32 = x_6.injectionSwitch.x;
     j = int(x_32);
@@ -38,11 +38,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl
index 1c6f19b..bea72e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int idx = 0;
   float4x3 m43 = float4x3(0.0f);
   int ll_1 = 0;
@@ -35,7 +35,7 @@
     int const x_18 = ll_1;
     int const x_19 = x_9.injected;
     if ((x_18 >= x_19)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       break;
     }
     int const x_20 = ll_1;
@@ -99,11 +99,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl
index cbdb09f..4075e24 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl
@@ -14,7 +14,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_9, thread float4* const tint_symbol_3) {
   int idx = 0;
   float4x3 m43 = float4x3(0.0f);
   int ll_1 = 0;
@@ -35,7 +35,7 @@
     int const x_18 = ll_1;
     int const x_19 = x_9.injected;
     if ((x_18 >= x_19)) {
-      *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+      *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
       break;
     }
     int const x_20 = ll_1;
@@ -99,11 +99,17 @@
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_9, thread float4* const tint_symbol_4) {
+  main_1(x_9, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_9 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_9, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_9, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl
index b703400..38a37c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl
@@ -342,11 +342,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl
index 6ef3d6f..2912538 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl
@@ -25,7 +25,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -37,7 +37,7 @@
   return;
 }
 
-void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_5) {
+void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -55,44 +55,44 @@
     }
     int const x_77 = *(data_1);
     int const x_78 = baseIndex;
-    int const x_79 = (*(tint_symbol_5)).arr[x_78].data;
+    int const x_79 = (*(tint_symbol_3)).arr[x_78].data;
     if ((x_77 <= x_79)) {
       int const x_80 = baseIndex;
-      int const x_81 = (*(tint_symbol_5)).arr[x_80].leftIndex;
+      int const x_81 = (*(tint_symbol_3)).arr[x_80].leftIndex;
       if ((x_81 == -1)) {
         int const x_82 = baseIndex;
         int const x_83 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_82].leftIndex = x_83;
+        (*(tint_symbol_3)).arr[x_82].leftIndex = x_83;
         int const x_84 = *(treeIndex);
-        BST const x_350 = (*(tint_symbol_5)).arr[x_84];
+        BST const x_350 = (*(tint_symbol_3)).arr[x_84];
         param = x_350;
         int const x_85 = *(data_1);
         param_1 = x_85;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_352 = param;
-        (*(tint_symbol_5)).arr[x_84] = x_352;
+        (*(tint_symbol_3)).arr[x_84] = x_352;
         return;
       } else {
         int const x_86 = baseIndex;
-        int const x_87 = (*(tint_symbol_5)).arr[x_86].leftIndex;
+        int const x_87 = (*(tint_symbol_3)).arr[x_86].leftIndex;
         baseIndex = x_87;
         continue;
       }
     } else {
       int const x_88 = baseIndex;
-      int const x_89 = (*(tint_symbol_5)).arr[x_88].rightIndex;
+      int const x_89 = (*(tint_symbol_3)).arr[x_88].rightIndex;
       if ((x_89 == -1)) {
         int const x_90 = baseIndex;
         int const x_91 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_90].rightIndex = x_91;
+        (*(tint_symbol_3)).arr[x_90].rightIndex = x_91;
         int const x_92 = *(treeIndex);
-        BST const x_362 = (*(tint_symbol_5)).arr[x_92];
+        BST const x_362 = (*(tint_symbol_3)).arr[x_92];
         param_2 = x_362;
         int const x_93 = *(data_1);
         param_3 = x_93;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_364 = param_2;
-        (*(tint_symbol_5)).arr[x_92] = x_364;
+        (*(tint_symbol_3)).arr[x_92] = x_364;
         return;
       } else {
         GLF_live8i = 1;
@@ -105,7 +105,7 @@
         GLF_live8A.arr[x_369] = (x_373 + x_371);
         while (true) {
           int const x_97 = baseIndex;
-          int const x_98 = (*(tint_symbol_5)).arr[x_97].rightIndex;
+          int const x_98 = (*(tint_symbol_3)).arr[x_97].rightIndex;
           baseIndex = x_98;
           {
             float const x_382 = x_27.injectionSwitch.x;
@@ -123,7 +123,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) {
+int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_387 = 0;
@@ -135,7 +135,7 @@
       break;
     }
     int const x_100 = index;
-    BST const x_395 = (*(tint_symbol_6)).arr[x_100];
+    BST const x_395 = (*(tint_symbol_4)).arr[x_100];
     currentNode = x_395;
     int const x_101 = currentNode.data;
     int const x_102 = *(target);
@@ -158,7 +158,7 @@
   return -1;
 }
 
-float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_7) {
+float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_5) {
   int param_5 = 0;
   int param_6 = 0;
   int param_7 = 0;
@@ -167,7 +167,7 @@
   float const x_420 = *(v);
   if ((x_420 < 1.5f)) {
     param_5 = 100;
-    int const x_110 = search_i1_(&(param_5), tint_symbol_7);
+    int const x_110 = search_i1_(&(param_5), tint_symbol_5);
     return float(x_110);
   }
   float const x_425 = *(v);
@@ -176,27 +176,27 @@
   }
   float const x_429 = *(v);
   param_6 = 6;
-  int const x_111 = search_i1_(&(param_6), tint_symbol_7);
+  int const x_111 = search_i1_(&(param_6), tint_symbol_5);
   if ((x_429 < float(x_111))) {
     return 1.0f;
   }
   param_7 = 30;
-  int const x_112 = search_i1_(&(param_7), tint_symbol_7);
+  int const x_112 = search_i1_(&(param_7), tint_symbol_5);
   return (10.0f + float(x_112));
 }
 
-float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_8) {
+float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_6) {
   float nodeData = 0.0f;
   int param_4 = 0;
   param_4 = 15;
-  int const x_109 = search_i1_(&(param_4), tint_symbol_8);
+  int const x_109 = search_i1_(&(param_4), tint_symbol_6);
   nodeData = float(x_109);
   float const x_409 = *(angle);
   float const x_410 = nodeData;
   return ((float3(30.0f, 30.0f, 30.0f) + (float3(1.0f, 5.0f, x_410) * x_409)) / float3(50.0f, 50.0f, 50.0f));
 }
 
-void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int treeIndex_1 = 0;
   BST param_8 = {};
   int param_9 = 0;
@@ -237,18 +237,18 @@
   float3 x_235 = 0.0f;
   float param_31 = 0.0f;
   treeIndex_1 = 0;
-  BST const x_237 = (*(tint_symbol_9)).arr[0];
+  BST const x_237 = (*(tint_symbol_7)).arr[0];
   param_8 = x_237;
   param_9 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_8), &(param_9));
   BST const x_239 = param_8;
-  (*(tint_symbol_9)).arr[0] = x_239;
+  (*(tint_symbol_7)).arr[0] = x_239;
   int const x_113 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
   int const x_115 = treeIndex_1;
   param_10 = x_115;
   param_11 = 5;
-  insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_7);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   GLF_live1_looplimiter2 = 0;
@@ -272,37 +272,37 @@
   int const x_123 = treeIndex_1;
   param_12 = x_123;
   param_13 = 12;
-  insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_7);
   int const x_124 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
   int const x_126 = treeIndex_1;
   param_14 = x_126;
   param_15 = 15;
-  insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_7);
   int const x_127 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
   int const x_129 = treeIndex_1;
   param_16 = x_129;
   param_17 = 7;
-  insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_7);
   int const x_130 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(1)));
   int const x_132 = treeIndex_1;
   param_18 = x_132;
   param_19 = 8;
-  insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_7);
   int const x_133 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(1)));
   int const x_135 = treeIndex_1;
   param_20 = x_135;
   param_21 = 2;
-  insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_7);
   int const x_136 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_136) + as_type<uint>(1)));
   int const x_138 = treeIndex_1;
   param_22 = x_138;
   param_23 = 6;
-  insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_7);
   int const x_139 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
   GLF_live4_looplimiter3 = 0;
@@ -336,7 +336,7 @@
   int const x_152 = treeIndex_1;
   param_24 = x_152;
   param_25 = 17;
-  insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_7);
   float const x_278 = x_27.injectionSwitch.x;
   float const x_280 = x_27.injectionSwitch.y;
   if ((x_278 > x_280)) {
@@ -347,16 +347,16 @@
   int const x_155 = treeIndex_1;
   param_26 = x_155;
   param_27 = 13;
-  insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_9);
-  float4 const x_285 = *(tint_symbol_10);
+  insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_7);
+  float4 const x_285 = *(tint_symbol_8);
   z = (float2(x_285.y, x_285.x) / float2(256.0f, 256.0f));
   float const x_289 = z.x;
   param_28 = x_289;
-  float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_9);
+  float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_7);
   x_1 = x_290;
   float const x_292 = z.y;
   param_29 = x_292;
-  float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_9);
+  float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_7);
   y_1 = x_293;
   sum = -100;
   target_1 = 0;
@@ -368,7 +368,7 @@
     }
     int const x_157 = target_1;
     param_30 = x_157;
-    int const x_158 = search_i1_(&(param_30), tint_symbol_9);
+    int const x_158 = search_i1_(&(param_30), tint_symbol_7);
     result = x_158;
     int const x_159 = result;
     if ((x_159 > 0)) {
@@ -405,22 +405,28 @@
   } else {
     float const x_320 = a;
     param_31 = x_320;
-    float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_9);
+    float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_7);
     x_235 = x_321;
   }
   float3 const x_322 = x_235;
-  *(tint_symbol_11) = float4(x_322.x, x_322.y, x_322.z, 1.0f);
+  *(tint_symbol_9) = float4(x_322.x, x_322.y, x_322.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread tint_array_wrapper_1 tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_27, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_27, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper_1* const tint_symbol_11, thread float4* const tint_symbol_12) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_27, tint_symbol_11, tint_symbol_10, tint_symbol_12);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread tint_array_wrapper_1 tint_symbol_14 = {};
+  thread float4 tint_symbol_15 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_27, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl
index 4e1c940..4e34538 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.hlsl
@@ -354,11 +354,16 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
-  const main_out tint_symbol_3 = {x_GLF_color};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_GLF_color};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl
index fae9d9d..843cdb2 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl
@@ -25,7 +25,7 @@
 struct main_out {
   float4 x_GLF_color_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 x_GLF_color_1 [[color(0)]];
 };
 
@@ -37,7 +37,7 @@
   return;
 }
 
-void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_5) {
+void insert_i1_i1_(constant buf0& x_27, thread int* const treeIndex, thread int* const data_1, thread tint_array_wrapper_1* const tint_symbol_3) {
   int baseIndex = 0;
   BST param = {};
   int param_1 = 0;
@@ -55,44 +55,44 @@
     }
     int const x_77 = *(data_1);
     int const x_78 = baseIndex;
-    int const x_79 = (*(tint_symbol_5)).arr[x_78].data;
+    int const x_79 = (*(tint_symbol_3)).arr[x_78].data;
     if ((x_77 <= x_79)) {
       int const x_80 = baseIndex;
-      int const x_81 = (*(tint_symbol_5)).arr[x_80].leftIndex;
+      int const x_81 = (*(tint_symbol_3)).arr[x_80].leftIndex;
       if ((x_81 == -1)) {
         int const x_82 = baseIndex;
         int const x_83 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_82].leftIndex = x_83;
+        (*(tint_symbol_3)).arr[x_82].leftIndex = x_83;
         int const x_84 = *(treeIndex);
-        BST const x_350 = (*(tint_symbol_5)).arr[x_84];
+        BST const x_350 = (*(tint_symbol_3)).arr[x_84];
         param = x_350;
         int const x_85 = *(data_1);
         param_1 = x_85;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param), &(param_1));
         BST const x_352 = param;
-        (*(tint_symbol_5)).arr[x_84] = x_352;
+        (*(tint_symbol_3)).arr[x_84] = x_352;
         return;
       } else {
         int const x_86 = baseIndex;
-        int const x_87 = (*(tint_symbol_5)).arr[x_86].leftIndex;
+        int const x_87 = (*(tint_symbol_3)).arr[x_86].leftIndex;
         baseIndex = x_87;
         continue;
       }
     } else {
       int const x_88 = baseIndex;
-      int const x_89 = (*(tint_symbol_5)).arr[x_88].rightIndex;
+      int const x_89 = (*(tint_symbol_3)).arr[x_88].rightIndex;
       if ((x_89 == -1)) {
         int const x_90 = baseIndex;
         int const x_91 = *(treeIndex);
-        (*(tint_symbol_5)).arr[x_90].rightIndex = x_91;
+        (*(tint_symbol_3)).arr[x_90].rightIndex = x_91;
         int const x_92 = *(treeIndex);
-        BST const x_362 = (*(tint_symbol_5)).arr[x_92];
+        BST const x_362 = (*(tint_symbol_3)).arr[x_92];
         param_2 = x_362;
         int const x_93 = *(data_1);
         param_3 = x_93;
         makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_2), &(param_3));
         BST const x_364 = param_2;
-        (*(tint_symbol_5)).arr[x_92] = x_364;
+        (*(tint_symbol_3)).arr[x_92] = x_364;
         return;
       } else {
         GLF_live8i = 1;
@@ -105,7 +105,7 @@
         GLF_live8A.arr[x_369] = (x_373 + x_371);
         while (true) {
           int const x_97 = baseIndex;
-          int const x_98 = (*(tint_symbol_5)).arr[x_97].rightIndex;
+          int const x_98 = (*(tint_symbol_3)).arr[x_97].rightIndex;
           baseIndex = x_98;
           {
             float const x_382 = x_27.injectionSwitch.x;
@@ -123,7 +123,7 @@
   return;
 }
 
-int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_6) {
+int search_i1_(thread int* const target, thread tint_array_wrapper_1* const tint_symbol_4) {
   int index = 0;
   BST currentNode = {};
   int x_387 = 0;
@@ -135,7 +135,7 @@
       break;
     }
     int const x_100 = index;
-    BST const x_395 = (*(tint_symbol_6)).arr[x_100];
+    BST const x_395 = (*(tint_symbol_4)).arr[x_100];
     currentNode = x_395;
     int const x_101 = currentNode.data;
     int const x_102 = *(target);
@@ -158,7 +158,7 @@
   return -1;
 }
 
-float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_7) {
+float makeFrame_f1_(thread float* const v, thread tint_array_wrapper_1* const tint_symbol_5) {
   int param_5 = 0;
   int param_6 = 0;
   int param_7 = 0;
@@ -167,7 +167,7 @@
   float const x_420 = *(v);
   if ((x_420 < 1.5f)) {
     param_5 = 100;
-    int const x_110 = search_i1_(&(param_5), tint_symbol_7);
+    int const x_110 = search_i1_(&(param_5), tint_symbol_5);
     return float(x_110);
   }
   float const x_425 = *(v);
@@ -176,27 +176,27 @@
   }
   float const x_429 = *(v);
   param_6 = 6;
-  int const x_111 = search_i1_(&(param_6), tint_symbol_7);
+  int const x_111 = search_i1_(&(param_6), tint_symbol_5);
   if ((x_429 < float(x_111))) {
     return 1.0f;
   }
   param_7 = 30;
-  int const x_112 = search_i1_(&(param_7), tint_symbol_7);
+  int const x_112 = search_i1_(&(param_7), tint_symbol_5);
   return (10.0f + float(x_112));
 }
 
-float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_8) {
+float3 hueColor_f1_(thread float* const angle, thread tint_array_wrapper_1* const tint_symbol_6) {
   float nodeData = 0.0f;
   int param_4 = 0;
   param_4 = 15;
-  int const x_109 = search_i1_(&(param_4), tint_symbol_8);
+  int const x_109 = search_i1_(&(param_4), tint_symbol_6);
   nodeData = float(x_109);
   float const x_409 = *(angle);
   float const x_410 = nodeData;
   return ((float3(30.0f, 30.0f, 30.0f) + (float3(1.0f, 5.0f, x_410) * x_409)) / float3(50.0f, 50.0f, 50.0f));
 }
 
-void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
   int treeIndex_1 = 0;
   BST param_8 = {};
   int param_9 = 0;
@@ -237,18 +237,18 @@
   float3 x_235 = 0.0f;
   float param_31 = 0.0f;
   treeIndex_1 = 0;
-  BST const x_237 = (*(tint_symbol_9)).arr[0];
+  BST const x_237 = (*(tint_symbol_7)).arr[0];
   param_8 = x_237;
   param_9 = 9;
   makeTreeNode_struct_BST_i1_i1_i11_i1_(&(param_8), &(param_9));
   BST const x_239 = param_8;
-  (*(tint_symbol_9)).arr[0] = x_239;
+  (*(tint_symbol_7)).arr[0] = x_239;
   int const x_113 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
   int const x_115 = treeIndex_1;
   param_10 = x_115;
   param_11 = 5;
-  insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_7);
   int const x_116 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
   GLF_live1_looplimiter2 = 0;
@@ -272,37 +272,37 @@
   int const x_123 = treeIndex_1;
   param_12 = x_123;
   param_13 = 12;
-  insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_7);
   int const x_124 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
   int const x_126 = treeIndex_1;
   param_14 = x_126;
   param_15 = 15;
-  insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_7);
   int const x_127 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
   int const x_129 = treeIndex_1;
   param_16 = x_129;
   param_17 = 7;
-  insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_7);
   int const x_130 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(1)));
   int const x_132 = treeIndex_1;
   param_18 = x_132;
   param_19 = 8;
-  insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_7);
   int const x_133 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(1)));
   int const x_135 = treeIndex_1;
   param_20 = x_135;
   param_21 = 2;
-  insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_7);
   int const x_136 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_136) + as_type<uint>(1)));
   int const x_138 = treeIndex_1;
   param_22 = x_138;
   param_23 = 6;
-  insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_7);
   int const x_139 = treeIndex_1;
   treeIndex_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
   GLF_live4_looplimiter3 = 0;
@@ -336,7 +336,7 @@
   int const x_152 = treeIndex_1;
   param_24 = x_152;
   param_25 = 17;
-  insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_9);
+  insert_i1_i1_(x_27, &(param_24), &(param_25), tint_symbol_7);
   float const x_278 = x_27.injectionSwitch.x;
   float const x_280 = x_27.injectionSwitch.y;
   if ((x_278 > x_280)) {
@@ -347,16 +347,16 @@
   int const x_155 = treeIndex_1;
   param_26 = x_155;
   param_27 = 13;
-  insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_9);
-  float4 const x_285 = *(tint_symbol_10);
+  insert_i1_i1_(x_27, &(param_26), &(param_27), tint_symbol_7);
+  float4 const x_285 = *(tint_symbol_8);
   z = (float2(x_285.y, x_285.x) / float2(256.0f, 256.0f));
   float const x_289 = z.x;
   param_28 = x_289;
-  float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_9);
+  float const x_290 = makeFrame_f1_(&(param_28), tint_symbol_7);
   x_1 = x_290;
   float const x_292 = z.y;
   param_29 = x_292;
-  float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_9);
+  float const x_293 = makeFrame_f1_(&(param_29), tint_symbol_7);
   y_1 = x_293;
   sum = -100;
   target_1 = 0;
@@ -368,7 +368,7 @@
     }
     int const x_157 = target_1;
     param_30 = x_157;
-    int const x_158 = search_i1_(&(param_30), tint_symbol_9);
+    int const x_158 = search_i1_(&(param_30), tint_symbol_7);
     result = x_158;
     int const x_159 = result;
     if ((x_159 > 0)) {
@@ -405,22 +405,28 @@
   } else {
     float const x_320 = a;
     param_31 = x_320;
-    float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_9);
+    float3 const x_321 = hueColor_f1_(&(param_31), tint_symbol_7);
     x_235 = x_321;
   }
   float3 const x_322 = x_235;
-  *(tint_symbol_11) = float4(x_322.x, x_322.y, x_322.z, 1.0f);
+  *(tint_symbol_9) = float4(x_322.x, x_322.y, x_322.z, 1.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) {
-  thread float4 tint_symbol_12 = 0.0f;
-  thread tint_array_wrapper_1 tint_symbol_13 = {};
-  thread float4 tint_symbol_14 = 0.0f;
-  tint_symbol_12 = gl_FragCoord_param;
-  main_1(x_27, &(tint_symbol_13), &(tint_symbol_12), &(tint_symbol_14));
-  main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_14};
-  tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
-  return tint_symbol_4;
+main_out tint_symbol_inner(constant buf0& x_27, float4 gl_FragCoord_param, thread float4* const tint_symbol_10, thread tint_array_wrapper_1* const tint_symbol_11, thread float4* const tint_symbol_12) {
+  *(tint_symbol_10) = gl_FragCoord_param;
+  main_1(x_27, tint_symbol_11, tint_symbol_10, tint_symbol_12);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_12)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_27 [[buffer(0)]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread tint_array_wrapper_1 tint_symbol_14 = {};
+  thread float4 tint_symbol_15 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(x_27, gl_FragCoord_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl
index f40061c..6010365 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl
@@ -65,9 +65,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl
index 9701645..45a90de 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4x3 m43 = float4x3(0.0f);
   int ll1 = 0;
   int rows = 0;
@@ -32,7 +32,7 @@
     } else {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     int const x_16 = ll1;
     if ((x_16 >= 5)) {
       break;
@@ -95,11 +95,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl
index 26a0704..44330e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.hlsl
@@ -77,9 +77,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl
index 4900c8c..3187e52 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl
@@ -11,7 +11,7 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
+void main_1(thread float4* const tint_symbol_3) {
   float4x3 m43 = float4x3(0.0f);
   int ll1 = 0;
   int rows = 0;
@@ -32,7 +32,7 @@
     } else {
       break;
     }
-    *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+    *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
     int const x_16 = ll1;
     if ((x_16 >= 5)) {
       break;
@@ -95,11 +95,17 @@
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl
index c608e00..f7d01ba 100644
--- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.hlsl
@@ -21,9 +21,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl
index 25fe33c..c44d2d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.spvasm.expected.msl
@@ -11,23 +11,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float height = 0.0f;
   height = 256.0f;
   float const x_40 = x_6.injectionSwitch.y;
   if ((x_40 < 0.0f)) {
     float const x_44 = height;
-    *(tint_symbol_4) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f));
+    *(tint_symbol_3) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f));
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl
index c608e00..f7d01ba 100644
--- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.hlsl
@@ -21,9 +21,15 @@
   float4 x_GLF_color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
-  const main_out tint_symbol_1 = {x_GLF_color};
-  const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
-  return tint_symbol_3;
+  const main_out tint_symbol_2 = {x_GLF_color};
+  return tint_symbol_2;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl
index 25fe33c..c44d2d7 100644
--- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl.expected.msl
@@ -11,23 +11,29 @@
   float4 x_GLF_color_1 [[color(0)]];
 };
 
-void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_3) {
   float height = 0.0f;
   height = 256.0f;
   float const x_40 = x_6.injectionSwitch.y;
   if ((x_40 < 0.0f)) {
     float const x_44 = height;
-    *(tint_symbol_4) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f));
+    *(tint_symbol_3) = mix(float4(30.180000305f, 8840.0f, 469.970001221f, 18.239999771f), float4(9.899999619f, 0.100000001f, 1169.538696289f, 55.790000916f), float4(7612.9453125f, 797.010986328f, x_44, 9.0f));
   }
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_4) {
+  main_1(x_6, tint_symbol_4);
+  main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(x_6, &(tint_symbol_5));
-  main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl
index 14fc121..c1ab9af 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.hlsl
@@ -60,10 +60,13 @@
   uint3 gl_WorkGroupID_param : SV_GroupID;
 };
 
-[numthreads(4, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param;
+void main_inner(uint3 gl_WorkGroupID_param) {
   gl_WorkGroupID = gl_WorkGroupID_param;
   main_1();
+}
+
+[numthreads(4, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_WorkGroupID_param);
   return;
 }
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl
index d0db516..393cfd1 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl
@@ -23,7 +23,7 @@
   /* 0x0000 */ tint_array_wrapper_2 data_in0;
 };
 
-void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_2) {
+void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_1) {
   uint base_index_in = 0u;
   uint base_index_out = 0u;
   int index_in0 = 0;
@@ -34,9 +34,9 @@
   int i = 0;
   int temp0 = 0;
   int temp1 = 0;
-  uint const x_58 = (*(tint_symbol_2)).x;
+  uint const x_58 = (*(tint_symbol_1)).x;
   base_index_in = (128u * x_58);
-  uint const x_61 = (*(tint_symbol_2)).x;
+  uint const x_61 = (*(tint_symbol_1)).x;
   base_index_out = (256u * x_61);
   index_in0 = 127;
   index_in1 = 383;
@@ -99,10 +99,14 @@
   return;
 }
 
+void tint_symbol_inner(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_WorkGroupID_param;
+  main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In1& x_17 [[buffer(1)]], device Out0& x_15 [[buffer(3)]], const device In0& x_19 [[buffer(0)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_WorkGroupID_param;
-  main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3));
+  tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl
index 14fc121..c1ab9af 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.hlsl
@@ -60,10 +60,13 @@
   uint3 gl_WorkGroupID_param : SV_GroupID;
 };
 
-[numthreads(4, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param;
+void main_inner(uint3 gl_WorkGroupID_param) {
   gl_WorkGroupID = gl_WorkGroupID_param;
   main_1();
+}
+
+[numthreads(4, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_WorkGroupID_param);
   return;
 }
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl
index d0db516..393cfd1 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl
@@ -23,7 +23,7 @@
   /* 0x0000 */ tint_array_wrapper_2 data_in0;
 };
 
-void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_2) {
+void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, thread uint3* const tint_symbol_1) {
   uint base_index_in = 0u;
   uint base_index_out = 0u;
   int index_in0 = 0;
@@ -34,9 +34,9 @@
   int i = 0;
   int temp0 = 0;
   int temp1 = 0;
-  uint const x_58 = (*(tint_symbol_2)).x;
+  uint const x_58 = (*(tint_symbol_1)).x;
   base_index_in = (128u * x_58);
-  uint const x_61 = (*(tint_symbol_2)).x;
+  uint const x_61 = (*(tint_symbol_1)).x;
   base_index_out = (256u * x_61);
   index_in0 = 127;
   index_in1 = 383;
@@ -99,10 +99,14 @@
   return;
 }
 
+void tint_symbol_inner(const device In2& x_13, const device In1& x_17, device Out0& x_15, const device In0& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_WorkGroupID_param;
+  main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In1& x_17 [[buffer(1)]], device Out0& x_15 [[buffer(3)]], const device In0& x_19 [[buffer(0)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_WorkGroupID_param;
-  main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3));
+  tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl
index df55b6b..9f68c5d 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.hlsl
@@ -60,10 +60,13 @@
   uint3 gl_WorkGroupID_param : SV_GroupID;
 };
 
-[numthreads(4, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param;
+void main_inner(uint3 gl_WorkGroupID_param) {
   gl_WorkGroupID = gl_WorkGroupID_param;
   main_1();
+}
+
+[numthreads(4, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_WorkGroupID_param);
   return;
 }
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl
index 5063da4..c91975f 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl
@@ -23,7 +23,7 @@
   /* 0x0000 */ tint_array_wrapper_2 data_in1;
 };
 
-void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_2) {
+void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_1) {
   uint base_index_in = 0u;
   uint base_index_out = 0u;
   int index_in0 = 0;
@@ -34,9 +34,9 @@
   int i = 0;
   int temp0 = 0;
   int temp1 = 0;
-  uint const x_56 = (*(tint_symbol_2)).x;
+  uint const x_56 = (*(tint_symbol_1)).x;
   base_index_in = (128u * x_56);
-  uint const x_59 = (*(tint_symbol_2)).x;
+  uint const x_59 = (*(tint_symbol_1)).x;
   base_index_out = (256u * x_59);
   index_in0 = 0;
   index_in1 = -128;
@@ -99,10 +99,14 @@
   return;
 }
 
+void tint_symbol_inner(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_WorkGroupID_param;
+  main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In0& x_17 [[buffer(0)]], device Out0& x_15 [[buffer(3)]], const device In1& x_19 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_WorkGroupID_param;
-  main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3));
+  tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl
index df55b6b..9f68c5d 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.hlsl
@@ -60,10 +60,13 @@
   uint3 gl_WorkGroupID_param : SV_GroupID;
 };
 
-[numthreads(4, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 gl_WorkGroupID_param = tint_symbol.gl_WorkGroupID_param;
+void main_inner(uint3 gl_WorkGroupID_param) {
   gl_WorkGroupID = gl_WorkGroupID_param;
   main_1();
+}
+
+[numthreads(4, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.gl_WorkGroupID_param);
   return;
 }
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl
index 5063da4..c91975f 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl
@@ -23,7 +23,7 @@
   /* 0x0000 */ tint_array_wrapper_2 data_in1;
 };
 
-void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_2) {
+void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, thread uint3* const tint_symbol_1) {
   uint base_index_in = 0u;
   uint base_index_out = 0u;
   int index_in0 = 0;
@@ -34,9 +34,9 @@
   int i = 0;
   int temp0 = 0;
   int temp1 = 0;
-  uint const x_56 = (*(tint_symbol_2)).x;
+  uint const x_56 = (*(tint_symbol_1)).x;
   base_index_in = (128u * x_56);
-  uint const x_59 = (*(tint_symbol_2)).x;
+  uint const x_59 = (*(tint_symbol_1)).x;
   base_index_out = (256u * x_59);
   index_in0 = 0;
   index_in1 = -128;
@@ -99,10 +99,14 @@
   return;
 }
 
+void tint_symbol_inner(const device In2& x_13, const device In0& x_17, device Out0& x_15, const device In1& x_19, uint3 gl_WorkGroupID_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = gl_WorkGroupID_param;
+  main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In0& x_17 [[buffer(0)]], device Out0& x_15 [[buffer(3)]], const device In1& x_19 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = gl_WorkGroupID_param;
-  main_1(x_13, x_17, x_15, x_19, &(tint_symbol_3));
+  tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl
index bd7ca9f..3a4d989 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.hlsl
@@ -12,9 +12,15 @@
   float4 color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl
index 8c9629d..1bd22a2 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.spvasm.expected.msl
@@ -8,16 +8,22 @@
   float4 color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl
index bd7ca9f..3a4d989 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.hlsl
@@ -12,9 +12,15 @@
   float4 color_1 : SV_Target0;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl
index 8c9629d..1bd22a2 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl.expected.msl
@@ -8,16 +8,22 @@
   float4 color_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_4) {
-  *(tint_symbol_4) = float4(1.0f, 1.0f, 1.0f, 1.0f);
+void main_1(thread float4* const tint_symbol_3) {
+  *(tint_symbol_3) = float4(1.0f, 1.0f, 1.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
+  main_1(tint_symbol_4);
+  main_out const tint_symbol_2 = {.color_1=*(tint_symbol_4)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
   thread float4 tint_symbol_5 = 0.0f;
-  main_1(&(tint_symbol_5));
-  main_out const tint_symbol_2 = {.color_1=tint_symbol_5};
-  tint_symbol_1 const tint_symbol_3 = {.color_1=tint_symbol_2.color_1};
-  return tint_symbol_3;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_1 = inner_result.color_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl
index 23e415c..b1179b4 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.hlsl
@@ -20,11 +20,16 @@
   float4 color_out_1 : SV_Target0;
 };
 
-tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
-  const float4 gl_FragCoord_param = tint_symbol_1.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_4 = {color_out};
-  const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+  return tint_symbol_4;
+}
+
+tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
+  const main_out inner_result = main_inner(tint_symbol_1.gl_FragCoord_param);
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl
index 320d767..6992835 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.spvasm.expected.msl
@@ -5,24 +5,30 @@
 struct main_out {
   float4 color_out_1;
 };
-struct tint_symbol_3 {
+struct tint_symbol_2 {
   float4 color_out_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, texture2d<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
-  float4 const x_19 = *(tint_symbol_6);
-  float4 const x_22 = tint_symbol_7.read(uint2(int2(float2(x_19.x, x_19.y))));
-  *(tint_symbol_8) = x_22;
+void main_1(thread float4* const tint_symbol_4, texture2d<float, access::read> tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_19 = *(tint_symbol_4);
+  float4 const x_22 = tint_symbol_5.read(uint2(int2(float2(x_19.x, x_19.y))));
+  *(tint_symbol_6) = x_22;
   return;
 }
 
-fragment tint_symbol_3 tint_symbol_1(texture2d<float, access::read> tint_symbol_10 [[texture(0)]], float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(&(tint_symbol_9), tint_symbol_10, &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.color_out_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+main_out tint_symbol_1_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_7, texture2d<float, access::read> tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(tint_symbol_7, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_3 = {.color_out_1=*(tint_symbol_9)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_2 tint_symbol_1(texture2d<float, access::read> tint_symbol_11 [[texture(0)]], float4 gl_FragCoord_param [[position]]) {
+  thread float4 tint_symbol_10 = 0.0f;
+  thread float4 tint_symbol_12 = 0.0f;
+  main_out const inner_result = tint_symbol_1_inner(gl_FragCoord_param, &(tint_symbol_10), tint_symbol_11, &(tint_symbol_12));
+  tint_symbol_2 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl
index 5237714..7edab18 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.hlsl
@@ -23,11 +23,16 @@
   float4 color_out_1 : SV_Target0;
 };
 
-tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
-  const float4 gl_FragCoord_param = tint_symbol_1.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_4 = {color_out};
-  const tint_symbol_3 tint_symbol_5 = {tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+  return tint_symbol_4;
+}
+
+tint_symbol_3 main(tint_symbol_2 tint_symbol_1) {
+  const main_out inner_result = main_inner(tint_symbol_1.gl_FragCoord_param);
+  tint_symbol_3 wrapper_result = (tint_symbol_3)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl
index 838f1de..a1b603f 100644
--- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl.expected.msl
@@ -8,24 +8,30 @@
 struct main_out {
   float4 color_out_1;
 };
-struct tint_symbol_3 {
+struct tint_symbol_2 {
   float4 color_out_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, texture2d<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
-  float4 const x_19 = *(tint_symbol_6);
-  float4 const x_22 = tint_symbol_7.read(uint2(int2(float2(x_19.x, x_19.y))));
-  *(tint_symbol_8) = x_22;
+void main_1(thread float4* const tint_symbol_4, texture2d<float, access::read> tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_19 = *(tint_symbol_4);
+  float4 const x_22 = tint_symbol_5.read(uint2(int2(float2(x_19.x, x_19.y))));
+  *(tint_symbol_6) = x_22;
   return;
 }
 
-fragment tint_symbol_3 tint_symbol_1(texture2d<float, access::read> tint_symbol_10 [[texture(0)]], float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_11 = 0.0f;
-  tint_symbol_9 = gl_FragCoord_param;
-  main_1(&(tint_symbol_9), tint_symbol_10, &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.color_out_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+main_out tint_symbol_1_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_7, texture2d<float, access::read> tint_symbol_8, thread float4* const tint_symbol_9) {
+  *(tint_symbol_7) = gl_FragCoord_param;
+  main_1(tint_symbol_7, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_3 = {.color_out_1=*(tint_symbol_9)};
+  return tint_symbol_3;
+}
+
+fragment tint_symbol_2 tint_symbol_1(texture2d<float, access::read> tint_symbol_11 [[texture(0)]], float4 gl_FragCoord_param [[position]]) {
+  thread float4 tint_symbol_10 = 0.0f;
+  thread float4 tint_symbol_12 = 0.0f;
+  main_out const inner_result = tint_symbol_1_inner(gl_FragCoord_param, &(tint_symbol_10), tint_symbol_11, &(tint_symbol_12));
+  tint_symbol_2 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl
index 666291e..9647507 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl
index 5a1dc97..05c7a31 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) > as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl
index 666291e..9647507 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl
index 5a1dc97..05c7a31 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) > as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl
index 95f5645..5eaf81f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl
index 459deef..0620282 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) >= as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl
index 95f5645..5eaf81f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl
index 459deef..0620282 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) >= as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl
index 03594c8..4523f9a 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl
index 169d49e..5ca55a5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) < as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl
index 03594c8..4523f9a 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl
index 169d49e..5ca55a5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) < as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl
index 65e9ee6..5a28ab5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl
index 7ae0315..6e1788b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) <= as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl
index 65e9ee6..5a28ab5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl
index 7ae0315..6e1788b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_5.field0[x_21];
   uint const x_25 = x_6.field0[x_21];
   x_7.field0[x_21] = select(0u, 1u, (as_type<int>(x_23) <= as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl
index 09ae3b9..c13ebb0 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.hlsl
@@ -17,10 +17,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl
index ef9ae4b..128a186 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.spvasm.expected.msl
@@ -5,8 +5,8 @@
   /* 0x0000 */ int field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) {
-  uint const x_26 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) {
+  uint const x_26 = (*(tint_symbol_1)).x;
   int const x_28 = x_6.field0[x_26];
   int const x_30 = x_7.field0[x_26];
   int const x_32 = x_8.field0[x_26];
@@ -14,10 +14,14 @@
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, x_9, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl
index 09ae3b9..c13ebb0 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.hlsl
@@ -17,10 +17,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl
index ef9ae4b..128a186 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl.expected.msl
@@ -5,8 +5,8 @@
   /* 0x0000 */ int field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) {
-  uint const x_26 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) {
+  uint const x_26 = (*(tint_symbol_1)).x;
   int const x_28 = x_6.field0[x_26];
   int const x_30 = x_7.field0[x_26];
   int const x_32 = x_8.field0[x_26];
@@ -14,10 +14,14 @@
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, x_9, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl
index fd7b050..86f9413 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.hlsl
@@ -13,10 +13,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl
index dd60856..e2a3991 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.msl
@@ -5,17 +5,21 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_6.field0[x_21];
   x_7.field0[x_21] = as_type<uint>(abs(as_type<int>(x_23)));
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl
index fd7b050..86f9413 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.hlsl
@@ -13,10 +13,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl
index dd60856..e2a3991 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.msl
@@ -5,17 +5,21 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_6.field0[x_21];
   x_7.field0[x_21] = as_type<uint>(abs(as_type<int>(x_23)));
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl
index 55f55f5..4a2880e 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.hlsl
@@ -17,10 +17,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl
index f8e42e1..ecdf99e 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.spvasm.expected.msl
@@ -5,8 +5,8 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) {
-  uint const x_23 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) {
+  uint const x_23 = (*(tint_symbol_1)).x;
   uint const x_25 = x_6.field0[x_23];
   uint const x_27 = x_7.field0[x_23];
   uint const x_29 = x_8.field0[x_23];
@@ -14,10 +14,14 @@
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, x_9, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl
index 55f55f5..4a2880e 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.hlsl
@@ -17,10 +17,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl
index f8e42e1..ecdf99e 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl.expected.msl
@@ -5,8 +5,8 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_2) {
-  uint const x_23 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, device S& x_9, thread uint3* const tint_symbol_1) {
+  uint const x_23 = (*(tint_symbol_1)).x;
   uint const x_25 = x_6.field0[x_23];
   uint const x_27 = x_7.field0[x_23];
   uint const x_29 = x_8.field0[x_23];
@@ -14,10 +14,14 @@
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, device S& x_9, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, x_9, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]], device S& x_9 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, x_9, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_9, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl
index 31dbd68..60e8412 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl
index d2e3922..f31bb6f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_6.field0[x_21];
   uint const x_25 = x_7.field0[x_21];
   x_8.field0[x_21] = as_type<uint>(max(as_type<int>(x_23), as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl
index 31dbd68..60e8412 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl
index d2e3922..f31bb6f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_6.field0[x_21];
   uint const x_25 = x_7.field0[x_21];
   x_8.field0[x_21] = as_type<uint>(max(as_type<int>(x_23), as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl
index 12b249c..00a6492 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl
index aa0d280..2eb6a5d 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_6.field0[x_21];
   uint const x_25 = x_7.field0[x_21];
   x_8.field0[x_21] = as_type<uint>(min(as_type<int>(x_23), as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl
index 12b249c..00a6492 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_3_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_3_param = tint_symbol.x_3_param;
+void main_inner(uint3 x_3_param) {
   x_3 = x_3_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_3_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl
index aa0d280..2eb6a5d 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_2) {
-  uint const x_21 = (*(tint_symbol_2)).x;
+void main_1(device S& x_6, device S& x_7, device S& x_8, thread uint3* const tint_symbol_1) {
+  uint const x_21 = (*(tint_symbol_1)).x;
   uint const x_23 = x_6.field0[x_21];
   uint const x_25 = x_7.field0[x_21];
   x_8.field0[x_21] = as_type<uint>(min(as_type<int>(x_23), as_type<int>(x_25)));
   return;
 }
 
+void tint_symbol_inner(device S& x_6, device S& x_7, device S& x_8, uint3 x_3_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_3_param;
+  main_1(x_6, x_7, x_8, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_3_param [[thread_position_in_grid]], device S& x_6 [[buffer(0)]], device S& x_7 [[buffer(1)]], device S& x_8 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_3_param;
-  main_1(x_6, x_7, x_8, &(tint_symbol_3));
+  tint_symbol_inner(x_6, x_7, x_8, x_3_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl
index 0533d3d..f049f3f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl
index df3eba3..9ecbc0f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.spvasm.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_20 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_20 = (*(tint_symbol_1)).x;
   uint const x_22 = x_5.field0[x_20];
   uint const x_24 = x_6.field0[x_20];
   x_7.field0[x_20] = as_type<uint>((as_type<int>(x_22) / as_type<int>(x_24)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl
index 0533d3d..f049f3f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.hlsl
@@ -15,10 +15,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl
index df3eba3..9ecbc0f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl.expected.msl
@@ -5,18 +5,22 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_2) {
-  uint const x_20 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, device S& x_7, thread uint3* const tint_symbol_1) {
+  uint const x_20 = (*(tint_symbol_1)).x;
   uint const x_22 = x_5.field0[x_20];
   uint const x_24 = x_6.field0[x_20];
   x_7.field0[x_20] = as_type<uint>((as_type<int>(x_22) / as_type<int>(x_24)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, device S& x_7, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, x_7, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]], device S& x_7 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, x_7, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_7, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl
index 35858e0..b99e573 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.hlsl
@@ -13,10 +13,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl
index d0c4825..4e6d9bd 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl
@@ -10,17 +10,21 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_2) {
-  uint const x_20 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_1) {
+  uint const x_20 = (*(tint_symbol_1)).x;
   uint const x_22 = x_5.field0[x_20];
   x_6.field0[x_20] = as_type<uint>(tint_unary_minus(as_type<int>(x_22)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl
index 35858e0..b99e573 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.hlsl
@@ -13,10 +13,13 @@
   uint3 x_2_param : SV_DispatchThreadID;
 };
 
-[numthreads(1, 1, 1)]
-void main(tint_symbol_1 tint_symbol) {
-  const uint3 x_2_param = tint_symbol.x_2_param;
+void main_inner(uint3 x_2_param) {
   x_2 = x_2_param;
   main_1();
+}
+
+[numthreads(1, 1, 1)]
+void main(tint_symbol_1 tint_symbol) {
+  main_inner(tint_symbol.x_2_param);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl
index d0c4825..4e6d9bd 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl
@@ -10,17 +10,21 @@
   /* 0x0000 */ uint field0[1];
 };
 
-void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_2) {
-  uint const x_20 = (*(tint_symbol_2)).x;
+void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_1) {
+  uint const x_20 = (*(tint_symbol_1)).x;
   uint const x_22 = x_5.field0[x_20];
   x_6.field0[x_20] = as_type<uint>(tint_unary_minus(as_type<int>(x_22)));
   return;
 }
 
+void tint_symbol_inner(device S& x_5, device S& x_6, uint3 x_2_param, thread uint3* const tint_symbol_2) {
+  *(tint_symbol_2) = x_2_param;
+  main_1(x_5, x_6, tint_symbol_2);
+}
+
 kernel void tint_symbol(uint3 x_2_param [[thread_position_in_grid]], device S& x_5 [[buffer(0)]], device S& x_6 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
-  tint_symbol_3 = x_2_param;
-  main_1(x_5, x_6, &(tint_symbol_3));
+  tint_symbol_inner(x_5, x_6, x_2_param, &(tint_symbol_3));
   return;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl
index 1e05739..000a6ee 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.hlsl
@@ -23,11 +23,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float2 x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float2 x_3_param) {
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4, gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl
index 7bcd3c2..95eaa19 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.spvasm.expected.msl
@@ -13,24 +13,30 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float2* const tint_symbol_6, thread uint* const tint_symbol_7, thread float4* const tint_symbol_8) {
-  float const x_30 = (*(tint_symbol_6)).x;
-  float const x_36 = (*(tint_symbol_6)).y;
-  *(tint_symbol_7) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u));
-  float2 const x_43 = *(tint_symbol_6);
-  *(tint_symbol_8) = float4(x_43.x, x_43.y, 0.0f, 1.0f);
+void main_1(thread float2* const tint_symbol_5, thread uint* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  float const x_30 = (*(tint_symbol_5)).x;
+  float const x_36 = (*(tint_symbol_5)).y;
+  *(tint_symbol_6) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u));
+  float2 const x_43 = *(tint_symbol_5);
+  *(tint_symbol_7) = float4(x_43.x, x_43.y, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float2 x_3_param, thread float2* const tint_symbol_8, thread uint* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_9), .gl_Position=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float2 tint_symbol_9 = 0.0f;
-  thread uint tint_symbol_10 = 0u;
-  thread float4 tint_symbol_11 = 0.0f;
-  float2 const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_10, .gl_Position=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float2 tint_symbol_11 = 0.0f;
+  thread uint tint_symbol_12 = 0u;
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl
index 1e05739..000a6ee 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.hlsl
@@ -23,11 +23,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float2 x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float2 x_3_param) {
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4, gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl
index 7bcd3c2..95eaa19 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl.expected.msl
@@ -13,24 +13,30 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float2* const tint_symbol_6, thread uint* const tint_symbol_7, thread float4* const tint_symbol_8) {
-  float const x_30 = (*(tint_symbol_6)).x;
-  float const x_36 = (*(tint_symbol_6)).y;
-  *(tint_symbol_7) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u));
-  float2 const x_43 = *(tint_symbol_6);
-  *(tint_symbol_8) = float4(x_43.x, x_43.y, 0.0f, 1.0f);
+void main_1(thread float2* const tint_symbol_5, thread uint* const tint_symbol_6, thread float4* const tint_symbol_7) {
+  float const x_30 = (*(tint_symbol_5)).x;
+  float const x_36 = (*(tint_symbol_5)).y;
+  *(tint_symbol_6) = (uint((((x_30 + 1.027777791f) * 18.0f) - 1.0f)) + (uint((((x_36 + 1.027777791f) * 18.0f) - 1.0f)) * 36u));
+  float2 const x_43 = *(tint_symbol_5);
+  *(tint_symbol_7) = float4(x_43.x, x_43.y, 0.0f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float2 x_3_param, thread float2* const tint_symbol_8, thread uint* const tint_symbol_9, thread float4* const tint_symbol_10) {
+  *(tint_symbol_8) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_9), .gl_Position=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float2 tint_symbol_9 = 0.0f;
-  thread uint tint_symbol_10 = 0u;
-  thread float4 tint_symbol_11 = 0.0f;
-  float2 const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_10, .gl_Position=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float2 tint_symbol_11 = 0.0f;
+  thread uint tint_symbol_12 = 0u;
+  thread float4 tint_symbol_13 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl
index 067c7f0..1d2fad3 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl
index f654314..632dea0 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.spvasm.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.5f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.5f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl
index 067c7f0..1d2fad3 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl
index f654314..632dea0 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.5f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.5f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl
index 25aecc7..c8a4ba6 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl
index d3a4444..228d014 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.300000012f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.300000012f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl
index 25aecc7..c8a4ba6 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl
index d3a4444..228d014 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.300000012f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.300000012f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl
index 224ce12..f0f4322 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl
index ccc433e..e57b904 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.spvasm.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl
index 224ce12..f0f4322 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl
index ccc433e..e57b904 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.600000024f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl
index 4e8b74d..22d54fa 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl
index 0189307..e4a6bc2 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.400000006f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.400000006f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl
index 4e8b74d..22d54fa 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl
index 0189307..e4a6bc2 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.400000006f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.400000006f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl
index 2f5b031..557eaf1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl
index 0f220e3..46d663f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.spvasm.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl
index 2f5b031..557eaf1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl
index 0f220e3..46d663f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.400000006f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl
index 47aefbb..5c6665b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl
index 842cf9d..242a626 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.699999988f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.699999988f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl
index 47aefbb..5c6665b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl
index 842cf9d..242a626 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.699999988f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.699999988f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl
index c0bd655..1efaec9 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl
index 771a789..08f92dc 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.spvasm.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl
index c0bd655..1efaec9 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl
index 771a789..08f92dc 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.300000012f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl
index 4343195..394204a 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl
index ed4b69c..006be2c 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.5f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.5f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl
index 4343195..394204a 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {color_out, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.color_out_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl
index ed4b69c..006be2c 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
-  *(tint_symbol_5) = 0.5f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+  *(tint_symbol_4) = 0.5f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.color_out_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.color_out_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.color_out_1=tint_symbol_2.color_out_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl
index bf017e3..7fb044e 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl
index 0c5e876..98cbda3 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.spvasm.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl
index bf017e3..7fb044e 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl
index 0c5e876..98cbda3 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.699999988f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl
index 0ae9555..6408262 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl
index 94ed6c1..ac1e543 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.spvasm.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl
index 0ae9555..6408262 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl
index 94ed6c1..ac1e543 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl.expected.msl
@@ -11,21 +11,26 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_22 = *(tint_symbol_6);
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_22 = *(tint_symbol_5);
   float2 const x_23 = float2(x_22.x, x_22.y);
-  *(tint_symbol_7) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f);
+  *(tint_symbol_6) = float4(x_23.x, x_23.y, 0.200000003f, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl
index 5cb1813..9de36ca 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl
index 620803a..8dce2e2 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.300000012f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.300000012f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl
index 5cb1813..9de36ca 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl
index 620803a..8dce2e2 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.300000012f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.300000012f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl
index 195740d..cba38b5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl
index 1f7be87..347959b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.100000001f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.100000001f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl
index 195740d..cba38b5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl
index 1f7be87..347959b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.100000001f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.100000001f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl
index d098fd2..d452ed7 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl
index ea4a1fc..0189aa6 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.600000024f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.600000024f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl
index d098fd2..d452ed7 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl
index ea4a1fc..0189aa6 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.600000024f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.600000024f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl
index 9aee57c..c913f71 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.hlsl
@@ -21,11 +21,17 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {outColor, gl_FragDepth};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.outColor_1, tint_symbol_3.gl_FragDepth_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl
index b08a200..fa4eb0b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.spvasm.expected.msl
@@ -5,26 +5,33 @@
   float4 outColor_1;
   float gl_FragDepth_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 outColor_1 [[color(0)]];
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float* const tint_symbol_7) {
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  float const x_20 = (*(tint_symbol_6)).z;
-  *(tint_symbol_7) = x_20;
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  float const x_20 = (*(tint_symbol_4)).z;
+  *(tint_symbol_5) = x_20;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_8 = 0.0f;
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float* const tint_symbol_8) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_7, tint_symbol_6, tint_symbol_8);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_7), .gl_FragDepth_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_9 = 0.0f;
-  thread float tint_symbol_10 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.outColor_1=tint_symbol_9, .gl_FragDepth_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.outColor_1=tint_symbol_3.outColor_1, .gl_FragDepth_1=tint_symbol_3.gl_FragDepth_1};
-  return tint_symbol_4;
+  thread float4 tint_symbol_10 = 0.0f;
+  thread float tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl
index 9aee57c..c913f71 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.hlsl
@@ -21,11 +21,17 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {outColor, gl_FragDepth};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.outColor_1, tint_symbol_3.gl_FragDepth_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl
index b08a200..fa4eb0b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl.expected.msl
@@ -5,26 +5,33 @@
   float4 outColor_1;
   float gl_FragDepth_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 outColor_1 [[color(0)]];
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread float* const tint_symbol_7) {
-  *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  float const x_20 = (*(tint_symbol_6)).z;
-  *(tint_symbol_7) = x_20;
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  float const x_20 = (*(tint_symbol_4)).z;
+  *(tint_symbol_5) = x_20;
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
-  thread float4 tint_symbol_8 = 0.0f;
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread float* const tint_symbol_8) {
+  *(tint_symbol_6) = gl_FragCoord_param;
+  main_1(tint_symbol_7, tint_symbol_6, tint_symbol_8);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_7), .gl_FragDepth_1=*(tint_symbol_8)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_9 = 0.0f;
-  thread float tint_symbol_10 = 0.0f;
-  tint_symbol_8 = gl_FragCoord_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_8), &(tint_symbol_10));
-  main_out const tint_symbol_3 = {.outColor_1=tint_symbol_9, .gl_FragDepth_1=tint_symbol_10};
-  tint_symbol_2 const tint_symbol_4 = {.outColor_1=tint_symbol_3.outColor_1, .gl_FragDepth_1=tint_symbol_3.gl_FragDepth_1};
-  return tint_symbol_4;
+  thread float4 tint_symbol_10 = 0.0f;
+  thread float tint_symbol_11 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl
index 2776dc2..ed109b4 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl
index a3796dc..e3b4625 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.699999988f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.699999988f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl
index 2776dc2..ed109b4 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl
index a3796dc..e3b4625 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.699999988f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.699999988f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl
index 7047d54..45f2a5a 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl
index 99a77a3..5b76309 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.spvasm.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.400000006f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.400000006f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl
index 7047d54..45f2a5a 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.hlsl
@@ -16,9 +16,16 @@
   float gl_FragDepth_1 : SV_Depth;
 };
 
-tint_symbol main() {
+main_out main_inner() {
   main_1();
   const main_out tint_symbol_1 = {outColor, gl_FragDepth};
-  const tint_symbol tint_symbol_2 = {tint_symbol_1.outColor_1, tint_symbol_1.gl_FragDepth_1};
-  return tint_symbol_2;
+  return tint_symbol_1;
+}
+
+tint_symbol main() {
+  const main_out inner_result = main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl
index 99a77a3..5b76309 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl.expected.msl
@@ -10,18 +10,25 @@
   float gl_FragDepth_1 [[depth(any)]];
 };
 
-void main_1(thread float4* const tint_symbol_4, thread float* const tint_symbol_5) {
-  *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
-  *(tint_symbol_5) = 0.400000006f;
+void main_1(thread float4* const tint_symbol_3, thread float* const tint_symbol_4) {
+  *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+  *(tint_symbol_4) = 0.400000006f;
   return;
 }
 
+main_out tint_symbol_inner(thread float4* const tint_symbol_5, thread float* const tint_symbol_6) {
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.outColor_1=*(tint_symbol_5), .gl_FragDepth_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
 fragment tint_symbol_1 tint_symbol() {
-  thread float4 tint_symbol_6 = 0.0f;
-  thread float tint_symbol_7 = 0.0f;
-  main_1(&(tint_symbol_6), &(tint_symbol_7));
-  main_out const tint_symbol_2 = {.outColor_1=tint_symbol_6, .gl_FragDepth_1=tint_symbol_7};
-  tint_symbol_1 const tint_symbol_3 = {.outColor_1=tint_symbol_2.outColor_1, .gl_FragDepth_1=tint_symbol_2.gl_FragDepth_1};
-  return tint_symbol_3;
+  thread float4 tint_symbol_7 = 0.0f;
+  thread float tint_symbol_8 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(&(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.outColor_1 = inner_result.outColor_1;
+  wrapper_result.gl_FragDepth_1 = inner_result.gl_FragDepth_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl
index b121d9e..1e0df3f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.hlsl
@@ -20,11 +20,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position, pos};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.pos_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.pos_1 = inner_result.pos_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl
index 5a99a8e..44d4a1f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.spvasm.expected.msl
@@ -13,22 +13,28 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread uint* const tint_symbol_8) {
-  float4 const x_22 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_22;
-  *(tint_symbol_8) = 0u;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread uint* const tint_symbol_7) {
+  float4 const x_22 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_22;
+  *(tint_symbol_7) = 0u;
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread uint* const tint_symbol_10) {
+  *(tint_symbol_8) = position_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .pos_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
-  thread uint tint_symbol_11 = 0u;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_9 = position_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .pos_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.pos_1=tint_symbol_4.pos_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread float4 tint_symbol_12 = 0.0f;
+  thread uint tint_symbol_13 = 0u;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.pos_1 = inner_result.pos_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl
index b121d9e..1e0df3f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.hlsl
@@ -20,11 +20,17 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 position_param = tint_symbol.position_param;
+main_out main_inner(float4 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position, pos};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.pos_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.pos_1 = inner_result.pos_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl
index 5a99a8e..44d4a1f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl.expected.msl
@@ -13,22 +13,28 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7, thread uint* const tint_symbol_8) {
-  float4 const x_22 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_22;
-  *(tint_symbol_8) = 0u;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6, thread uint* const tint_symbol_7) {
+  float4 const x_22 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_22;
+  *(tint_symbol_7) = 0u;
   return;
 }
 
+main_out tint_symbol_inner(float4 position_param, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread uint* const tint_symbol_10) {
+  *(tint_symbol_8) = position_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_9), .pos_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread float4 tint_symbol_10 = 0.0f;
-  thread uint tint_symbol_11 = 0u;
-  float4 const position_param = tint_symbol_1.position_param;
-  tint_symbol_9 = position_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_10, .pos_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.pos_1=tint_symbol_4.pos_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread float4 tint_symbol_12 = 0.0f;
+  thread uint tint_symbol_13 = 0u;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  wrapper_result.pos_1 = inner_result.pos_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl
index 4d470f2..a4751f1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.hlsl
@@ -22,13 +22,18 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float3 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float3 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4, gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl
index fcba4cc..0dfb3a1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.spvasm.expected.msl
@@ -14,25 +14,30 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, thread int* const tint_symbol_9) {
-  float3 const x_22 = *(tint_symbol_6);
-  *(tint_symbol_7) = float4(x_22, 1.0f);
-  *(tint_symbol_8) = *(tint_symbol_9);
+void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
+  float3 const x_22 = *(tint_symbol_5);
+  *(tint_symbol_6) = float4(x_22, 1.0f);
+  *(tint_symbol_7) = *(tint_symbol_8);
   return;
 }
 
+main_out tint_symbol_inner(float3 x_2_param, int x_3_param, thread float3* const tint_symbol_9, thread int* const tint_symbol_10, thread float4* const tint_symbol_11, thread int* const tint_symbol_12) {
+  *(tint_symbol_9) = x_2_param;
+  *(tint_symbol_10) = x_3_param;
+  main_1(tint_symbol_9, tint_symbol_11, tint_symbol_12, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_12), .gl_Position=*(tint_symbol_11)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float3 tint_symbol_10 = 0.0f;
-  thread int tint_symbol_11 = 0;
-  thread float4 tint_symbol_12 = 0.0f;
-  thread int tint_symbol_13 = 0;
-  float3 const x_2_param = tint_symbol_1.x_2_param;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_10 = x_2_param;
-  tint_symbol_11 = x_3_param;
-  main_1(&(tint_symbol_10), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_13, .gl_Position=tint_symbol_12};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float3 tint_symbol_13 = 0.0f;
+  thread int tint_symbol_14 = 0;
+  thread float4 tint_symbol_15 = 0.0f;
+  thread int tint_symbol_16 = 0;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl
index 4d470f2..a4751f1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.hlsl
@@ -22,13 +22,18 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float3 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float3 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4, gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1, tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl
index fcba4cc..0dfb3a1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl.expected.msl
@@ -14,25 +14,30 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, thread int* const tint_symbol_9) {
-  float3 const x_22 = *(tint_symbol_6);
-  *(tint_symbol_7) = float4(x_22, 1.0f);
-  *(tint_symbol_8) = *(tint_symbol_9);
+void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
+  float3 const x_22 = *(tint_symbol_5);
+  *(tint_symbol_6) = float4(x_22, 1.0f);
+  *(tint_symbol_7) = *(tint_symbol_8);
   return;
 }
 
+main_out tint_symbol_inner(float3 x_2_param, int x_3_param, thread float3* const tint_symbol_9, thread int* const tint_symbol_10, thread float4* const tint_symbol_11, thread int* const tint_symbol_12) {
+  *(tint_symbol_9) = x_2_param;
+  *(tint_symbol_10) = x_3_param;
+  main_1(tint_symbol_9, tint_symbol_11, tint_symbol_12, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_12), .gl_Position=*(tint_symbol_11)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float3 tint_symbol_10 = 0.0f;
-  thread int tint_symbol_11 = 0;
-  thread float4 tint_symbol_12 = 0.0f;
-  thread int tint_symbol_13 = 0;
-  float3 const x_2_param = tint_symbol_1.x_2_param;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_10 = x_2_param;
-  tint_symbol_11 = x_3_param;
-  main_1(&(tint_symbol_10), &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_13, .gl_Position=tint_symbol_12};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1, .gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float3 tint_symbol_13 = 0.0f;
+  thread int tint_symbol_14 = 0;
+  thread float4 tint_symbol_15 = 0.0f;
+  thread int tint_symbol_16 = 0;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl
index 0097cb2..05960c1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.hlsl
@@ -25,13 +25,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl
index 7f6fbb6..061fbbe 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl
@@ -11,28 +11,33 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, texture2d<int, access::write> tint_symbol_9) {
-  *(tint_symbol_6) = 1;
-  float4 const x_23 = *(tint_symbol_7);
+void main_1(thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, texture2d<int, access::write> tint_symbol_8) {
+  *(tint_symbol_5) = 1;
+  float4 const x_23 = *(tint_symbol_6);
   int const x_27 = int(x_23.x);
   int const x_28 = int(x_23.y);
-  int const x_33 = *(tint_symbol_8);
+  int const x_33 = *(tint_symbol_7);
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
   }
-  tint_symbol_9.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28)));
+  tint_symbol_8.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28)));
   return;
 }
 
-fragment tint_symbol_3 tint_symbol(texture2d<int, access::write> tint_symbol_13 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_10 = 0.0f;
-  thread int tint_symbol_11 = 0;
-  thread int tint_symbol_12 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_10 = x_2_param;
-  tint_symbol_11 = x_3_param;
-  main_1(&(tint_symbol_12), &(tint_symbol_10), &(tint_symbol_11), tint_symbol_13);
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_12};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_9, thread int* const tint_symbol_10, thread int* const tint_symbol_11, texture2d<int, access::write> tint_symbol_12) {
+  *(tint_symbol_9) = x_2_param;
+  *(tint_symbol_10) = x_3_param;
+  main_1(tint_symbol_11, tint_symbol_9, tint_symbol_10, tint_symbol_12);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_11)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_3 tint_symbol(texture2d<int, access::write> tint_symbol_16 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread int tint_symbol_14 = 0;
+  thread int tint_symbol_15 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), tint_symbol_16);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl
index 0097cb2..05960c1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.hlsl
@@ -25,13 +25,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl
index 7f6fbb6..061fbbe 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl
@@ -11,28 +11,33 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8, texture2d<int, access::write> tint_symbol_9) {
-  *(tint_symbol_6) = 1;
-  float4 const x_23 = *(tint_symbol_7);
+void main_1(thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7, texture2d<int, access::write> tint_symbol_8) {
+  *(tint_symbol_5) = 1;
+  float4 const x_23 = *(tint_symbol_6);
   int const x_27 = int(x_23.x);
   int const x_28 = int(x_23.y);
-  int const x_33 = *(tint_symbol_8);
+  int const x_33 = *(tint_symbol_7);
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
   }
-  tint_symbol_9.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28)));
+  tint_symbol_8.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28)));
   return;
 }
 
-fragment tint_symbol_3 tint_symbol(texture2d<int, access::write> tint_symbol_13 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_10 = 0.0f;
-  thread int tint_symbol_11 = 0;
-  thread int tint_symbol_12 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_10 = x_2_param;
-  tint_symbol_11 = x_3_param;
-  main_1(&(tint_symbol_12), &(tint_symbol_10), &(tint_symbol_11), tint_symbol_13);
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_12};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_9, thread int* const tint_symbol_10, thread int* const tint_symbol_11, texture2d<int, access::write> tint_symbol_12) {
+  *(tint_symbol_9) = x_2_param;
+  *(tint_symbol_10) = x_3_param;
+  main_1(tint_symbol_11, tint_symbol_9, tint_symbol_10, tint_symbol_12);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_11)};
+  return tint_symbol_4;
+}
+
+fragment tint_symbol_3 tint_symbol(texture2d<int, access::write> tint_symbol_16 [[texture(0)]], float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+  thread float4 tint_symbol_13 = 0.0f;
+  thread int tint_symbol_14 = 0;
+  thread int tint_symbol_15 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_13), &(tint_symbol_14), &(tint_symbol_15), tint_symbol_16);
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl
index a97b541..8f93c98 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.hlsl
@@ -21,13 +21,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl
index a50bd6e..5511519 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl
@@ -11,25 +11,30 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
-  float4 const x_16 = *(tint_symbol_6);
-  int const x_26 = *(tint_symbol_7);
+void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
+  float4 const x_16 = *(tint_symbol_5);
+  int const x_26 = *(tint_symbol_6);
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(x_26))) == int(x_16.z))) {
   }
-  *(tint_symbol_8) = 1;
+  *(tint_symbol_7) = 1;
   return;
 }
 
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl
index a97b541..8f93c98 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.hlsl
@@ -21,13 +21,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl
index a50bd6e..5511519 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl
@@ -11,25 +11,30 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
-  float4 const x_16 = *(tint_symbol_6);
-  int const x_26 = *(tint_symbol_7);
+void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
+  float4 const x_16 = *(tint_symbol_5);
+  int const x_26 = *(tint_symbol_6);
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(x_26))) == int(x_16.z))) {
   }
-  *(tint_symbol_8) = 1;
+  *(tint_symbol_7) = 1;
   return;
 }
 
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl
index c94c14d..be97366 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl
@@ -22,11 +22,16 @@
   int out_data_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {out_data};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.out_data_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.out_data_1 = inner_result.out_data_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl
index 9d51ced..33340cd 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl
@@ -4,30 +4,36 @@
 struct main_out {
   int out_data_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   int out_data_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) {
   bool x_is_odd = false;
   bool y_is_odd = false;
-  float const x_24 = (*(tint_symbol_5)).x;
+  float const x_24 = (*(tint_symbol_3)).x;
   x_is_odd = ((int(x_24) & 1) == 1);
-  float const x_29 = (*(tint_symbol_5)).y;
+  float const x_29 = (*(tint_symbol_3)).y;
   y_is_odd = ((int(x_29) & 1) == 1);
   bool const x_33 = x_is_odd;
   bool const x_34 = y_is_odd;
-  *(tint_symbol_6) = select(0, 1, (x_33 | x_34));
+  *(tint_symbol_4) = select(0, 1, (x_33 | x_34));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.out_data_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread int tint_symbol_8 = 0;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.out_data_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.out_data_1=tint_symbol_3.out_data_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.out_data_1 = inner_result.out_data_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl
index 1ad88d2..ee7668f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.hlsl
@@ -26,11 +26,16 @@
   int out_data_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {out_data};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.out_data_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.out_data_1 = inner_result.out_data_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl
index a2b97bf..104e462 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl.expected.msl
@@ -4,30 +4,36 @@
 struct main_out {
   int out_data_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   int out_data_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) {
   bool x_is_odd = false;
   bool y_is_odd = false;
-  float const x_24 = (*(tint_symbol_5)).x;
+  float const x_24 = (*(tint_symbol_3)).x;
   x_is_odd = ((int(x_24) & 1) == 1);
-  float const x_29 = (*(tint_symbol_5)).y;
+  float const x_29 = (*(tint_symbol_3)).y;
   y_is_odd = ((int(x_29) & 1) == 1);
   bool const x_33 = x_is_odd;
   bool const x_34 = y_is_odd;
-  *(tint_symbol_6) = select(0, 1, (x_33 || x_34));
+  *(tint_symbol_4) = select(0, 1, (x_33 || x_34));
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.out_data_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread int tint_symbol_8 = 0;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.out_data_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.out_data_1=tint_symbol_3.out_data_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.out_data_1 = inner_result.out_data_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl
index e3d1bee..c728eae 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.hlsl
@@ -22,13 +22,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl
index 5a727de..f7875f8 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl
@@ -11,25 +11,30 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
-  float4 const x_16 = *(tint_symbol_6);
-  int const x_26 = *(tint_symbol_7);
-  *(tint_symbol_8) = 1;
+void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
+  float4 const x_16 = *(tint_symbol_5);
+  int const x_26 = *(tint_symbol_6);
+  *(tint_symbol_7) = 1;
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(x_26))) == int(x_16.z))) {
   }
   return;
 }
 
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl
index e3d1bee..c728eae 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.hlsl
@@ -22,13 +22,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl
index 5a727de..f7875f8 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl
@@ -11,25 +11,30 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
-  float4 const x_16 = *(tint_symbol_6);
-  int const x_26 = *(tint_symbol_7);
-  *(tint_symbol_8) = 1;
+void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
+  float4 const x_16 = *(tint_symbol_5);
+  int const x_26 = *(tint_symbol_6);
+  *(tint_symbol_7) = 1;
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(x_26))) == int(x_16.z))) {
   }
   return;
 }
 
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl
index ad10f80..36856ff 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.hlsl
@@ -25,13 +25,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
-  const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_4};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl
index b8e78d8..8d43f0f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl
@@ -14,28 +14,33 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) {
-  *(tint_symbol_6) = 1;
-  float4 const x_23 = *(tint_symbol_7);
+void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) {
+  *(tint_symbol_5) = 1;
+  float4 const x_23 = *(tint_symbol_6);
   int const x_27 = int(x_23.x);
   int const x_28 = int(x_23.y);
-  int const x_33 = *(tint_symbol_8);
+  int const x_33 = *(tint_symbol_7);
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
   }
   x_5.field0[as_type<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(8))))))] = x_27;
   return;
 }
 
+main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl
index ad10f80..36856ff 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.hlsl
@@ -25,13 +25,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
-  const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_4};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl
index b8e78d8..8d43f0f 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl
@@ -14,28 +14,33 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) {
-  *(tint_symbol_6) = 1;
-  float4 const x_23 = *(tint_symbol_7);
+void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) {
+  *(tint_symbol_5) = 1;
+  float4 const x_23 = *(tint_symbol_6);
   int const x_27 = int(x_23.x);
   int const x_28 = int(x_23.y);
-  int const x_33 = *(tint_symbol_8);
+  int const x_33 = *(tint_symbol_7);
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
   }
   x_5.field0[as_type<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(8))))))] = x_27;
   return;
 }
 
+main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl
index bb7ac26..6740df5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.hlsl
@@ -26,13 +26,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
-  const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_4};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl
index 59d9bdb..1358df1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl
@@ -14,28 +14,33 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) {
-  *(tint_symbol_6) = 1;
-  float4 const x_23 = *(tint_symbol_7);
+void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) {
+  *(tint_symbol_5) = 1;
+  float4 const x_23 = *(tint_symbol_6);
   int const x_27 = int(x_23.x);
   int const x_28 = int(x_23.y);
-  int const x_33 = *(tint_symbol_8);
+  int const x_33 = *(tint_symbol_7);
   x_5.field0[as_type<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(8))))))] = x_27;
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
   }
   return;
 }
 
+main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl
index bb7ac26..6740df5 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.hlsl
@@ -26,13 +26,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
-  const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_4_1};
-  return tint_symbol_5;
+  const main_out tint_symbol_4 = {x_4};
+  return tint_symbol_4;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl
index 59d9bdb..1358df1 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl
@@ -14,28 +14,33 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const tint_symbol_7, thread int* const tint_symbol_8) {
-  *(tint_symbol_6) = 1;
-  float4 const x_23 = *(tint_symbol_7);
+void main_1(device S& x_5, thread int* const tint_symbol_5, thread float4* const tint_symbol_6, thread int* const tint_symbol_7) {
+  *(tint_symbol_5) = 1;
+  float4 const x_23 = *(tint_symbol_6);
   int const x_27 = int(x_23.x);
   int const x_28 = int(x_23.y);
-  int const x_33 = *(tint_symbol_8);
+  int const x_33 = *(tint_symbol_7);
   x_5.field0[as_type<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(8))))))] = x_27;
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
   }
   return;
 }
 
+main_out tint_symbol_inner(device S& x_5, float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(x_5, tint_symbol_10, tint_symbol_8, tint_symbol_9);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]], device S& x_5 [[buffer(0)]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(x_5, &(tint_symbol_11), &(tint_symbol_9), &(tint_symbol_10));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_5, x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl
index e1ac82b..184a98b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.hlsl
@@ -36,13 +36,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl
index 2715be4..89bd13c 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl
@@ -11,10 +11,10 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
+void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
   int x_33_phi = 0;
-  float4 const x_18 = *(tint_symbol_6);
-  int const x_28 = *(tint_symbol_7);
+  float4 const x_18 = *(tint_symbol_5);
+  int const x_28 = *(tint_symbol_6);
   x_33_phi = 0;
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_18.x) & 1)) + as_type<uint>((int(x_18.y) & 1))))) + as_type<uint>(x_28))) == int(x_18.z))) {
     while (true) {
@@ -30,20 +30,25 @@
       }
     }
   }
-  *(tint_symbol_8) = 1;
+  *(tint_symbol_7) = 1;
   return;
 }
 
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl
index e1ac82b..184a98b 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.hlsl
@@ -36,13 +36,17 @@
   int x_4_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 x_2_param = tint_symbol.x_2_param;
-  const int x_3_param = tint_symbol.x_3_param;
+main_out main_inner(float4 x_2_param, int x_3_param) {
   x_2 = x_2_param;
   x_3 = x_3_param;
   main_1();
   const main_out tint_symbol_3 = {x_4};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.x_4_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.x_2_param, tint_symbol.x_3_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl
index 2715be4..89bd13c 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl
@@ -11,10 +11,10 @@
   int x_4_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) {
+void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
   int x_33_phi = 0;
-  float4 const x_18 = *(tint_symbol_6);
-  int const x_28 = *(tint_symbol_7);
+  float4 const x_18 = *(tint_symbol_5);
+  int const x_28 = *(tint_symbol_6);
   x_33_phi = 0;
   if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_18.x) & 1)) + as_type<uint>((int(x_18.y) & 1))))) + as_type<uint>(x_28))) == int(x_18.z))) {
     while (true) {
@@ -30,20 +30,25 @@
       }
     }
   }
-  *(tint_symbol_8) = 1;
+  *(tint_symbol_7) = 1;
   return;
 }
 
+main_out tint_symbol_inner(float4 x_2_param, int x_3_param, thread float4* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10) {
+  *(tint_symbol_8) = x_2_param;
+  *(tint_symbol_9) = x_3_param;
+  main_1(tint_symbol_8, tint_symbol_9, tint_symbol_10);
+  main_out const tint_symbol_4 = {.x_4_1=*(tint_symbol_10)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(float4 x_2_param [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_9 = 0.0f;
-  thread int tint_symbol_10 = 0;
-  thread int tint_symbol_11 = 0;
-  int const x_3_param = tint_symbol_1.x_3_param;
-  tint_symbol_9 = x_2_param;
-  tint_symbol_10 = x_3_param;
-  main_1(&(tint_symbol_9), &(tint_symbol_10), &(tint_symbol_11));
-  main_out const tint_symbol_4 = {.x_4_1=tint_symbol_11};
-  tint_symbol_3 const tint_symbol_5 = {.x_4_1=tint_symbol_4.x_4_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_11 = 0.0f;
+  thread int tint_symbol_12 = 0;
+  thread int tint_symbol_13 = 0;
+  main_out const inner_result = tint_symbol_inner(x_2_param, tint_symbol_1.x_3_param, &(tint_symbol_11), &(tint_symbol_12), &(tint_symbol_13));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.x_4_1 = inner_result.x_4_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl
index 5d7eab8..909ad79 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.hlsl
@@ -17,11 +17,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float3 position_param = tint_symbol.position_param;
+main_out main_inner(float3 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl
index 87dbf22..7ef967c 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.spvasm.expected.msl
@@ -11,20 +11,25 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float3 const x_21 = *(tint_symbol_6);
-  *(tint_symbol_7) = float4(x_21.x, x_21.y, x_21.z, 1.0f);
+void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float3 const x_21 = *(tint_symbol_5);
+  *(tint_symbol_6) = float4(x_21.x, x_21.y, x_21.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float3 position_param, thread float3* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float3 tint_symbol_8 = 0.0f;
-  thread float4 tint_symbol_9 = 0.0f;
-  float3 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float3 tint_symbol_9 = 0.0f;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl
index 5d7eab8..909ad79 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.hlsl
@@ -17,11 +17,16 @@
   float4 gl_Position : SV_Position;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float3 position_param = tint_symbol.position_param;
+main_out main_inner(float3 position_param) {
   position = position_param;
   main_1();
   const main_out tint_symbol_3 = {gl_Position};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.gl_Position};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.position_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl
index 87dbf22..7ef967c 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl.expected.msl
@@ -11,20 +11,25 @@
   float4 gl_Position [[position]];
 };
 
-void main_1(thread float3* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float3 const x_21 = *(tint_symbol_6);
-  *(tint_symbol_7) = float4(x_21.x, x_21.y, x_21.z, 1.0f);
+void main_1(thread float3* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float3 const x_21 = *(tint_symbol_5);
+  *(tint_symbol_6) = float4(x_21.x, x_21.y, x_21.z, 1.0f);
   return;
 }
 
+main_out tint_symbol_inner(float3 position_param, thread float3* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = position_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float3 tint_symbol_8 = 0.0f;
-  thread float4 tint_symbol_9 = 0.0f;
-  float3 const position_param = tint_symbol_1.position_param;
-  tint_symbol_8 = position_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.gl_Position=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.gl_Position=tint_symbol_4.gl_Position};
-  return tint_symbol_5;
+  thread float3 tint_symbol_9 = 0.0f;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.gl_Position = inner_result.gl_Position;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl
index 72a9fa8..25f61b0 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.hlsl
@@ -28,11 +28,16 @@
   int expect_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {expect};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.expect_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.expect_1 = inner_result.expect_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl
index f604d95..49c13b0 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.spvasm.expected.msl
@@ -4,36 +4,42 @@
 struct main_out {
   int expect_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   int expect_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) {
   bool inbounds = false;
   bool x_31 = false;
   bool x_32_phi = false;
-  float const x_24 = (*(tint_symbol_5)).x;
+  float const x_24 = (*(tint_symbol_3)).x;
   bool const x_25 = (x_24 < 128.0f);
   x_32_phi = x_25;
   if (!(x_25)) {
-    float const x_30 = (*(tint_symbol_5)).y;
+    float const x_30 = (*(tint_symbol_3)).y;
     x_31 = (x_30 < 128.0f);
     x_32_phi = x_31;
   }
   bool const x_32 = x_32_phi;
   inbounds = x_32;
   bool const x_33 = inbounds;
-  *(tint_symbol_6) = select(-1, 1, x_33);
+  *(tint_symbol_4) = select(-1, 1, x_33);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.expect_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread int tint_symbol_8 = 0;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.expect_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.expect_1=tint_symbol_3.expect_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.expect_1 = inner_result.expect_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl
index 72a9fa8..25f61b0 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.hlsl
@@ -28,11 +28,16 @@
   int expect_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {expect};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.expect_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.expect_1 = inner_result.expect_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl
index f604d95..49c13b0 100644
--- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl.expected.msl
@@ -4,36 +4,42 @@
 struct main_out {
   int expect_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   int expect_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+void main_1(thread float4* const tint_symbol_3, thread int* const tint_symbol_4) {
   bool inbounds = false;
   bool x_31 = false;
   bool x_32_phi = false;
-  float const x_24 = (*(tint_symbol_5)).x;
+  float const x_24 = (*(tint_symbol_3)).x;
   bool const x_25 = (x_24 < 128.0f);
   x_32_phi = x_25;
   if (!(x_25)) {
-    float const x_30 = (*(tint_symbol_5)).y;
+    float const x_30 = (*(tint_symbol_3)).y;
     x_31 = (x_30 < 128.0f);
     x_32_phi = x_31;
   }
   bool const x_32 = x_32_phi;
   inbounds = x_32;
   bool const x_33 = inbounds;
-  *(tint_symbol_6) = select(-1, 1, x_33);
+  *(tint_symbol_4) = select(-1, 1, x_33);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread int* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.expect_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread int tint_symbol_8 = 0;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.expect_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.expect_1=tint_symbol_3.expect_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.expect_1 = inner_result.expect_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl
index c1e727e..7dac578 100644
--- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.hlsl
@@ -16,11 +16,16 @@
   float4 color_out_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 color_in_param = tint_symbol.color_in_param;
+main_out main_inner(float4 color_in_param) {
   color_in = color_in_param;
   main_1();
   const main_out tint_symbol_3 = {color_out};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.color_in_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl
index dad0955..2b0c4f2 100644
--- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.spvasm.expected.msl
@@ -11,20 +11,25 @@
   float4 color_out_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_12 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_12;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_12 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_12;
   return;
 }
 
+main_out tint_symbol_inner(float4 color_in_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = color_in_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const color_in_param = tint_symbol_1.color_in_param;
-  tint_symbol_8 = color_in_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.color_in_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl
index c1e727e..7dac578 100644
--- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.hlsl
@@ -16,11 +16,16 @@
   float4 color_out_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 color_in_param = tint_symbol.color_in_param;
+main_out main_inner(float4 color_in_param) {
   color_in = color_in_param;
   main_1();
   const main_out tint_symbol_3 = {color_out};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.color_out_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.color_in_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl
index dad0955..2b0c4f2 100644
--- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl.expected.msl
@@ -11,20 +11,25 @@
   float4 color_out_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
-  float4 const x_12 = *(tint_symbol_6);
-  *(tint_symbol_7) = x_12;
+void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  float4 const x_12 = *(tint_symbol_5);
+  *(tint_symbol_6) = x_12;
   return;
 }
 
+main_out tint_symbol_inner(float4 color_in_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
+  *(tint_symbol_7) = color_in_param;
+  main_1(tint_symbol_7, tint_symbol_8);
+  main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)};
+  return tint_symbol_4;
+}
+
 fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
-  thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
-  float4 const color_in_param = tint_symbol_1.color_in_param;
-  tint_symbol_8 = color_in_param;
-  main_1(&(tint_symbol_8), &(tint_symbol_9));
-  main_out const tint_symbol_4 = {.color_out_1=tint_symbol_9};
-  tint_symbol_3 const tint_symbol_5 = {.color_out_1=tint_symbol_4.color_out_1};
-  return tint_symbol_5;
+  thread float4 tint_symbol_10 = 0.0f;
+  main_out const inner_result = tint_symbol_inner(tint_symbol_1.color_in_param, &(tint_symbol_9), &(tint_symbol_10));
+  tint_symbol_3 wrapper_result = {};
+  wrapper_result.color_out_1 = inner_result.color_out_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl
index 6b9138b..d0664b3 100644
--- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.hlsl
@@ -18,11 +18,16 @@
   float4 result_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {result};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.result_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.result_1 = inner_result.result_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl
index 6f93315..6a977de 100644
--- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.spvasm.expected.msl
@@ -4,24 +4,30 @@
 struct main_out {
   float4 result_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 result_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_19 = (*(tint_symbol_5)).x;
-  float const x_23 = (*(tint_symbol_5)).y;
-  *(tint_symbol_6) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_19 = (*(tint_symbol_3)).x;
+  float const x_23 = (*(tint_symbol_3)).y;
+  *(tint_symbol_4) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.result_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.result_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.result_1=tint_symbol_3.result_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.result_1 = inner_result.result_1;
+  return wrapper_result;
 }
 
diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl
index 6b9138b..d0664b3 100644
--- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.hlsl
@@ -18,11 +18,16 @@
   float4 result_1 : SV_Target0;
 };
 
-tint_symbol_2 main(tint_symbol_1 tint_symbol) {
-  const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+main_out main_inner(float4 gl_FragCoord_param) {
   gl_FragCoord = gl_FragCoord_param;
   main_1();
   const main_out tint_symbol_3 = {result};
-  const tint_symbol_2 tint_symbol_4 = {tint_symbol_3.result_1};
-  return tint_symbol_4;
+  return tint_symbol_3;
+}
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+  const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
+  tint_symbol_2 wrapper_result = (tint_symbol_2)0;
+  wrapper_result.result_1 = inner_result.result_1;
+  return wrapper_result;
 }
diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl
index 6f93315..6a977de 100644
--- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl.expected.msl
@@ -4,24 +4,30 @@
 struct main_out {
   float4 result_1;
 };
-struct tint_symbol_2 {
+struct tint_symbol_1 {
   float4 result_1 [[color(0)]];
 };
 
-void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
-  float const x_19 = (*(tint_symbol_5)).x;
-  float const x_23 = (*(tint_symbol_5)).y;
-  *(tint_symbol_6) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f);
+void main_1(thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
+  float const x_19 = (*(tint_symbol_3)).x;
+  float const x_23 = (*(tint_symbol_3)).y;
+  *(tint_symbol_4) = float4((floor(x_19) / 255.0f), (floor(x_23) / 255.0f), 0.0f, 0.0f);
   return;
 }
 
-fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) {
+main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+  *(tint_symbol_5) = gl_FragCoord_param;
+  main_1(tint_symbol_5, tint_symbol_6);
+  main_out const tint_symbol_2 = {.result_1=*(tint_symbol_6)};
+  return tint_symbol_2;
+}
+
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
-  tint_symbol_7 = gl_FragCoord_param;
-  main_1(&(tint_symbol_7), &(tint_symbol_8));
-  main_out const tint_symbol_3 = {.result_1=tint_symbol_8};
-  tint_symbol_2 const tint_symbol_4 = {.result_1=tint_symbol_3.result_1};
-  return tint_symbol_4;
+  main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.result_1 = inner_result.result_1;
+  return wrapper_result;
 }