; LLVM IR from kazunetakahashi/atcoder :: 2019/1102_future-contest-2020-qual/A.ll (ZN5Field11other_placeEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }
%class.Field = type <{ i32, i32, %"class.std::vector.19", %"class.std::vector.24", %"class.std::vector.9", %"class.std::tuple", i8, [7 x i8] }>
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<std::vector<State>, std::allocator<std::vector<State>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<State>, std::allocator<std::vector<State>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<State>, std::allocator<std::vector<State>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<State>, std::allocator<std::vector<State>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN5Field1NE = external dso_local global i32, align 4
@_ZN5Field1VE = external dso_local global %"class.std::vector.9", align 8
@_ZN5Field1PE = external dso_local global %"class.std::vector.14", align 8
@.str.4 = external hidden unnamed_addr constant [98 x i8], align 1
@_ZL17reverse_direction = external hidden constant [4 x i32], align 16
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN5Field11other_placeEv = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Field11other_placeEv(ptr noundef nonnull align 8 dereferenceable(89) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::tuple", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::tuple", align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %152, %1
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = load i32, ptr @_ZN5Field1NE, align 4, !tbaa !9
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %155

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %148, %18
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = load i32, ptr @_ZN5Field1NE, align 4, !tbaa !9
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %151

24:                                               ; preds = %19
  %25 = getelementptr inbounds %class.Field, ptr %12, i32 0, i32 3
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %27) #4
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %30) #4
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %147

34:                                               ; preds = %24
  %35 = getelementptr inbounds %class.Field, ptr %12, i32 0, i32 2
  %36 = load i32, ptr %3, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %37) #4
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40) #4
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %44, label %147

44:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %75, %44
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 4
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 8, ptr %4, align 4
  br label %78

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %51) #4
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54) #4
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef %57) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %7, ptr noundef nonnull align 4 dereferenceable(8) %55, ptr noundef nonnull align 4 dereferenceable(8) %58)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %59 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %12, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store i32 %59, ptr %8, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp ne i32 %60, -1
  br i1 %61, label %62, label %71

62:                                               ; preds = %49
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = getelementptr inbounds %class.Field, ptr %12, i32 0, i32 2
  %65 = load i32, ptr %3, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %66) #4
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #4
  store i32 %63, ptr %70, align 4, !tbaa !9
  store i32 8, ptr %4, align 4
  br label %72

71:                                               ; preds = %49
  store i32 0, ptr %4, align 4
  br label %72

72:                                               ; preds = %71, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %73 = load i32, ptr %4, align 4
  switch i32 %73, label %78 [
    i32 0, label %74
  ]

74:                                               ; preds = %72
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %6, align 4, !tbaa !9
  br label %45, !llvm.loop !13

78:                                               ; preds = %72, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %79

79:                                               ; preds = %78
  %80 = getelementptr inbounds %class.Field, ptr %12, i32 0, i32 2
  %81 = load i32, ptr %3, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #4
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #4
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = icmp ne i32 %87, -1
  br i1 %88, label %89, label %90

89:                                               ; preds = %79
  br label %148

90:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %129, %90
  %92 = load i32, ptr %9, align 4, !tbaa !9
  %93 = icmp slt i32 %92, 4
  br i1 %93, label %95, label %94

94:                                               ; preds = %91
  store i32 11, ptr %4, align 4
  br label %132

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %96 = load i32, ptr %3, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %97) #4
  %99 = load i32, ptr %5, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %100) #4
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef %103) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %10, ptr noundef nonnull align 4 dereferenceable(8) %101, ptr noundef nonnull align 4 dereferenceable(8) %104)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %105 = call noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %12, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store i32 %105, ptr %11, align 4, !tbaa !11
  %106 = load i32, ptr %11, align 4, !tbaa !11
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %125

108:                                              ; preds = %95
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = getelementptr inbounds %class.Field, ptr %12, i32 0, i32 2
  %111 = load i32, ptr %3, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %112) #4
  %114 = load i32, ptr %5, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #4
  store i32 %109, ptr %116, align 4, !tbaa !9
  %117 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %12, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %118 = icmp eq i32 %117, -1
  br i1 %118, label %119, label %124

119:                                              ; preds = %108
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [4 x i32], ptr @_ZL17reverse_direction, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  call void @_ZN5Field13set_directionERKSt5tupleIJiiEEi(ptr noundef nonnull align 8 dereferenceable(89) %12, ptr noundef nonnull align 4 dereferenceable(8) %10, i32 noundef %123)
  br label %124

124:                                              ; preds = %119, %108
  store i32 11, ptr %4, align 4
  br label %126

125:                                              ; preds = %95
  store i32 0, ptr %4, align 4
  br label %126

126:                                              ; preds = %125, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %127 = load i32, ptr %4, align 4
  switch i32 %127, label %132 [
    i32 0, label %128
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %9, align 4, !tbaa !9
  br label %91, !llvm.loop !15

132:                                              ; preds = %126, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %133

133:                                              ; preds = %132
  %134 = getelementptr inbounds %class.Field, ptr %12, i32 0, i32 2
  %135 = load i32, ptr %3, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %136) #4
  %138 = load i32, ptr %5, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #4
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = icmp ne i32 %141, -1
  br i1 %142, label %143, label %144

143:                                              ; preds = %133
  br label %146

144:                                              ; preds = %133
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 392, ptr noundef @__PRETTY_FUNCTION__._ZN5Field11other_placeEv) #5
  unreachable

145:                                              ; No predecessors!
  br label %146

146:                                              ; preds = %145, %143
  br label %147

147:                                              ; preds = %146, %34, %24
  br label %148

148:                                              ; preds = %147, %89
  %149 = load i32, ptr %5, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %5, align 4, !tbaa !9
  br label %19, !llvm.loop !16

151:                                              ; preds = %23
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %3, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %3, align 4, !tbaa !9
  br label %13, !llvm.loop !17

155:                                              ; preds = %17
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Field13set_directionERKSt5tupleIJiiEEi(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS5State", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }

@_ZN5Field1NE = external dso_local local_unnamed_addr global i32, align 4
@_ZN5Field1VE = external dso_local global %"class.std::vector.9", align 8
@_ZN5Field1PE = external dso_local global %"class.std::vector.14", align 8
@.str.4 = external hidden unnamed_addr constant [98 x i8], align 1
@_ZL17reverse_direction = external hidden local_unnamed_addr constant [4 x i32], align 16
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN5Field11other_placeEv = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Field11other_placeEv(ptr noundef nonnull align 8 dereferenceable(89) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %"class.std::tuple", align 4
  %3 = alloca %"class.std::tuple", align 4
  %4 = load i32, ptr @_ZN5Field1NE, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader45.preheader, label %._crit_edge52

.preheader45.preheader:                           ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  br label %.preheader45

.preheader45:                                     ; preds = %.preheader45.preheader, %._crit_edge
  %8 = phi i32 [ %4, %.preheader45.preheader ], [ %10, %._crit_edge ]
  %indvars.iv60 = phi i64 [ 0, %.preheader45.preheader ], [ %indvars.iv.next61, %._crit_edge ]
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %.preheader45.._crit_edge_crit_edge

.preheader45.._crit_edge_crit_edge:               ; preds = %.preheader45
  %.pre = sext i32 %8 to i64
  br label %._crit_edge

._crit_edge52:                                    ; preds = %._crit_edge, %1
  ret void

._crit_edge:                                      ; preds = %73, %.preheader45.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader45.._crit_edge_crit_edge ], [ %75, %73 ]
  %10 = phi i32 [ %8, %.preheader45.._crit_edge_crit_edge ], [ %74, %73 ]
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %11 = icmp slt i64 %indvars.iv.next61, %.pre-phi
  br i1 %11, label %.preheader45, label %._crit_edge52, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader45, %73
  %indvars.iv = phi i64 [ %indvars.iv.next, %73 ], [ 0, %.preheader45 ]
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv60) #4
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #4
  %14 = load i32, ptr %13, align 4, !tbaa !12
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %16, label %73

16:                                               ; preds = %.lr.ph
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv60) #4
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #4
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp eq i32 %19, -1
  br i1 %20, label %.preheader43.preheader, label %73

.preheader43.preheader:                           ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %22 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv) #4
  %23 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 0) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %2, ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %23)
  %24 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %.not = icmp eq i32 %24, -1
  br i1 %.not, label %.critedge, label %25

25:                                               ; preds = %.critedge.2, %.critedge.1, %.critedge, %.preheader43.preheader
  %.03648.lcssa.wide = phi i32 [ 0, %.preheader43.preheader ], [ 1, %.critedge ], [ 2, %.critedge.1 ], [ 3, %.critedge.2 ]
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv60) #4
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %indvars.iv) #4
  store i32 %.03648.lcssa.wide, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %.loopexit44

.critedge:                                        ; preds = %.preheader43.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv) #4
  %30 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 1) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %2, ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %30)
  %31 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %.not.1 = icmp eq i32 %31, -1
  br i1 %.not.1, label %.critedge.1, label %25

.critedge.1:                                      ; preds = %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %33 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %indvars.iv) #4
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 2) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %2, ptr noundef nonnull align 4 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(8) %34)
  %35 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %.not.2 = icmp eq i32 %35, -1
  br i1 %.not.2, label %.critedge.2, label %25

.critedge.2:                                      ; preds = %.critedge.1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %37 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv) #4
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 3) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %2, ptr noundef nonnull align 4 dereferenceable(8) %37, ptr noundef nonnull align 4 dereferenceable(8) %38)
  %39 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %.not.3 = icmp eq i32 %39, -1
  br i1 %.not.3, label %.critedge.3, label %25

.critedge.3:                                      ; preds = %.critedge.2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %.loopexit44

.loopexit44:                                      ; preds = %.critedge.3, %25
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv60) #4
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %indvars.iv) #4
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %.not38 = icmp eq i32 %42, -1
  br i1 %.not38, label %.preheader.preheader, label %73

.preheader.preheader:                             ; preds = %.loopexit44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %indvars.iv) #4
  %45 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 0) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %3, ptr noundef nonnull align 4 dereferenceable(8) %44, ptr noundef nonnull align 4 dereferenceable(8) %45)
  %46 = call noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %.not39 = icmp eq i32 %46, 0
  br i1 %.not39, label %47, label %.preheader.1

47:                                               ; preds = %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %.03449.lcssa.wide = phi i64 [ 0, %.preheader.preheader ], [ 1, %.preheader.1 ], [ 2, %.preheader.2 ], [ 3, %.preheader.3 ]
  %48 = trunc nuw nsw i64 %.03449.lcssa.wide to i32
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv60) #4
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv) #4
  store i32 %48, ptr %50, align 4, !tbaa !5
  %51 = call noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %52 = icmp eq i32 %51, -1
  br i1 %52, label %53, label %56

53:                                               ; preds = %47
  %54 = getelementptr inbounds [4 x i32], ptr @_ZL17reverse_direction, i64 0, i64 %.03449.lcssa.wide
  %55 = load i32, ptr %54, align 4, !tbaa !5
  call void @_ZN5Field13set_directionERKSt5tupleIJiiEEi(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef %55)
  br label %56

56:                                               ; preds = %47, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.loopexit

.preheader.1:                                     ; preds = %.preheader.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %58 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %indvars.iv) #4
  %59 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 1) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %3, ptr noundef nonnull align 4 dereferenceable(8) %58, ptr noundef nonnull align 4 dereferenceable(8) %59)
  %60 = call noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %.not39.1 = icmp eq i32 %60, 0
  br i1 %.not39.1, label %47, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %62 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %indvars.iv) #4
  %63 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 2) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %3, ptr noundef nonnull align 4 dereferenceable(8) %62, ptr noundef nonnull align 4 dereferenceable(8) %63)
  %64 = call noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %.not39.2 = icmp eq i32 %64, 0
  br i1 %.not39.2, label %47, label %.preheader.3

.preheader.3:                                     ; preds = %.preheader.2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1PE, i64 noundef %indvars.iv60) #4
  %66 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %indvars.iv) #4
  %67 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5Field1VE, i64 noundef 3) #4
  call void @_ZplRKSt5tupleIJiiEES2_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %3, ptr noundef nonnull align 4 dereferenceable(8) %66, ptr noundef nonnull align 4 dereferenceable(8) %67)
  %68 = call noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %.not39.3 = icmp eq i32 %68, 0
  br i1 %.not39.3, label %47, label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %.preheader.3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %56
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv60) #4
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %indvars.iv) #4
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %.not40 = icmp eq i32 %71, -1
  br i1 %.not40, label %72, label %73

72:                                               ; preds = %.loopexit
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 392, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5Field11other_placeEv) #5
  unreachable

73:                                               ; preds = %.lr.ph, %16, %.loopexit, %.loopexit44
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %74 = load i32, ptr @_ZN5Field1NE, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next, %75
  br i1 %76, label %.lr.ph, label %._crit_edge, !llvm.loop !14
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5Field9get_stateERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Field13set_directionERKSt5tupleIJiiEEi(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5Field13get_directionERKSt5tupleIJiiEE(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS5State", !7, i64 0}
!14 = distinct !{!14, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass