def METHOD_NAME(input_spvasm, output_path, is_xfailed, requires_asserts, requires_asan, requires_ubsan):
  with open(input_spvasm, 'r') as input_file:
    spvasm = input_file.read()
    with open(output_path, 'w') as shadertest:
      xfail_line = '; XFAIL: *' if is_xfailed else ';'
      requires_line = ''
      if requires_asserts or requires_asan or requires_ubsan:
        requirements = []
        for constraint, name in [(requires_asserts, 'assertions'),
                                 (requires_asan, 'asan'),
                                 (requires_ubsan, 'ubsan')]:
          if constraint:
            requirements.append(name)
        requires_line = '\n; REQUIRES: ' + ' && '.join(requirements)
      constraints_line = xfail_line + requires_line
      shadertest.write(shadertest_prefix.format(lit_constraints=constraints_line))
      shadertest.write(spvasm)