-// RUN: %target-typecheck-verify-swift
+// RUN: %target-typecheck-verify-swift -target x86_64-apple-macosx10.52
 
-// RUN: %target-swift-emit-silgen -emit-sorted-sil -o %t.fragile.sil %s
+// RUN: %target-swift-emit-silgen -target x86_64-apple-macosx10.52 -emit-sorted-sil -o %t.fragile.sil %s
 // RUN: %FileCheck %s < %t.fragile.sil
 // RUN: %FileCheck -check-prefix NEGATIVE %s < %t.fragile.sil
 
-// RUN: %target-swift-emit-silgen -emit-sorted-sil -enable-resilience -o %t.resilient.sil %s
+// RUN: %target-swift-emit-silgen -target x86_64-apple-macosx10.52 -emit-sorted-sil -enable-resilience -o %t.resilient.sil %s
 // RUN: %FileCheck %s < %t.resilient.sil
 // RUN: %FileCheck -check-prefix NEGATIVE %s < %t.resilient.sil
 


  case normal = -1000

  @available(macOS 10.8, *)
  case alwaysAvailable = -2000

  @available(macOS 500.600.700, *)
  case potentiallyUnavailable = -3000

  @available(macOS, unavailable)
  case neverAvailable = -4000

}

// CHECK-LABEL: sil {{(\[serialized\] )?}}[ossa] @$s4main1EO8rawValueACSgSi_tcfC

// CHECK: integer_literal $Builtin.IntLiteral, -3000
// CHECK: cond_br {{[^,]+}}, [[potentiallyUnavailable:bb[0-9]+]]

// CHECK: integer_literal $Builtin.IntLiteral, -5000
// CHECK: cond_br {{[^,]+}}, [[notObsoleteYet:bb[0-9]+]]

// CHECK: [[notObsoleteYet]]:
// CHECK-NOT: function_ref @$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF
// CHECK: {{enum \$E|inject_enum_addr %[0-9]+ : \$\*E}}, #E.notObsoleteYet!enumelt

// CHECK: [[potentiallyUnavailable]]:
// CHECK-NEXT: integer_literal $Builtin.Word, 10
// CHECK-NEXT: integer_literal $Builtin.Word, 55
// CHECK-NEXT: integer_literal $Builtin.Word, 0
// CHECK: function_ref @$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF
// CHECK: cond_br {{[^,]+}}, [[potentiallyUnavailable_newEnough:bb[0-9]+]],

