; LLVM IR from indjev99/Evolving-Snakes :: sources/snake.ll (ZN5snake5thinkEv)

; 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"

%"struct.std::pair" = type { i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl" }
%"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl" = type { %"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl_data" }
%"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.decision = type { i8, i8, i8, i8, i8, i32 }
%struct.snake = type { %"class.std::__cxx11::basic_string", i32, double, double, double, double, double, i32, i32, i32, i8, i8, %"class.std::vector", ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.controller = type { ptr, [3 x i32], [3 x i8], [1 x i32], [1 x i8], [1 x i32], [1 x i8], i32, i32 }
%struct.block = type { %struct.point, i32 }
%struct.point = type { i32, i32 }

@_ZN5snake13DEFENCE_BOOSTE = external dso_local global double, align 8
@_ZN5snake16MIN_SPLIT_LENGTHE = external dso_local global i32, align 4
@_ZN5snake10MIN_LENGTHE = external dso_local global i32, align 4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5snake5thinkEv(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.decision, align 4
  %12 = alloca { i64, i32 }, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZNSt6vectorI5blockSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %19 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 7
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %28

22:                                               ; preds = %2
  invoke void @_ZSt9make_pairIRiRSt6vectorI5blockSaIS2_EEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %23 unwind label %24

23:                                               ; preds = %22
  store i32 1, ptr %9, align 4
  br label %263

24:                                               ; preds = %22
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %7, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %8, align 4
  br label %264

28:                                               ; preds = %2
  %29 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %30 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 13
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  %34 = getelementptr inbounds %struct.controller, ptr %33, i32 0, i32 7
  store i32 %31, ptr %34, align 8, !tbaa !22
  %35 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 13
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = getelementptr inbounds %struct.controller, ptr %36, i32 0, i32 8
  store i32 0, ptr %37, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !25
  br label %38

38:                                               ; preds = %57, %28
  %39 = load i32, ptr %10, align 4, !tbaa !25
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %42 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  %43 = icmp ult i64 %40, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %38
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %60

45:                                               ; preds = %38
  %46 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %47 = load i32, ptr %10, align 4, !tbaa !25
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %48) #5
  %50 = getelementptr inbounds %struct.block, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !26
  %52 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 13
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  %54 = getelementptr inbounds %struct.controller, ptr %53, i32 0, i32 8
  %55 = load i32, ptr %54, align 4, !tbaa !24
  %56 = add nsw i32 %55, %51
  store i32 %56, ptr %54, align 4, !tbaa !24
  br label %57

57:                                               ; preds = %45
  %58 = load i32, ptr %10, align 4, !tbaa !25
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %10, align 4, !tbaa !25
  br label %38, !llvm.loop !29

60:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #5
  %61 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 13
  %62 = load ptr, ptr %61, align 8, !tbaa !21
  %63 = load ptr, ptr %62, align 8, !tbaa !31
  %64 = getelementptr inbounds ptr, ptr %63, i64 6
  %65 = load ptr, ptr %64, align 8
  %66 = invoke { i64, i32 } %65(ptr noundef nonnull align 8 dereferenceable(48) %62)
          to label %67 unwind label %75

67:                                               ; preds = %60
  store { i64, i32 } %66, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  %68 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 0
  %69 = load i8, ptr %68, align 4, !tbaa !33, !range !35, !noundef !36
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %79

71:                                               ; preds = %67
  %72 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 9
  %73 = load i32, ptr %72, align 8, !tbaa !37
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 8, !tbaa !37
  br label %79

75:                                               ; preds = %60
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %7, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %8, align 4
  br label %262

79:                                               ; preds = %71, %67
  %80 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 1
  %81 = load i8, ptr %80, align 1, !tbaa !38, !range !35, !noundef !36
  %82 = trunc i8 %81 to i1
  br i1 %82, label %83, label %87

83:                                               ; preds = %79
  %84 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 9
  %85 = load i32, ptr %84, align 8, !tbaa !37
  %86 = add nsw i32 %85, -1
  store i32 %86, ptr %84, align 8, !tbaa !37
  br label %87

87:                                               ; preds = %83, %79
  %88 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 9
  %89 = load i32, ptr %88, align 8, !tbaa !37
  %90 = add nsw i32 %89, 4
  store i32 %90, ptr %88, align 8, !tbaa !37
  %91 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 9
  %92 = load i32, ptr %91, align 8, !tbaa !37
  %93 = srem i32 %92, 4
  store i32 %93, ptr %91, align 8, !tbaa !37
  %94 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 2
  %95 = load i8, ptr %94, align 2, !tbaa !39, !range !35, !noundef !36
  %96 = trunc i8 %95 to i1
  %97 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 10
  %98 = zext i1 %96 to i8
  store i8 %98, ptr %97, align 4, !tbaa !40
  %99 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 11
  %100 = load i8, ptr %99, align 1, !tbaa !41, !range !35, !noundef !36
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %108

102:                                              ; preds = %87
  %103 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 11
  store i8 0, ptr %103, align 1, !tbaa !41
  %104 = load double, ptr @_ZN5snake13DEFENCE_BOOSTE, align 8, !tbaa !42
  %105 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 2
  %106 = load double, ptr %105, align 8, !tbaa !43
  %107 = fsub double %106, %104
  store double %107, ptr %105, align 8, !tbaa !43
  br label %108

108:                                              ; preds = %102, %87
  %109 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 3
  %110 = load i8, ptr %109, align 1, !tbaa !44, !range !35, !noundef !36
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %121

112:                                              ; preds = %108
  %113 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 8
  %114 = load i32, ptr %113, align 4, !tbaa !45
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %113, align 4, !tbaa !45
  %116 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 11
  store i8 1, ptr %116, align 1, !tbaa !41
  %117 = load double, ptr @_ZN5snake13DEFENCE_BOOSTE, align 8, !tbaa !42
  %118 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 2
  %119 = load double, ptr %118, align 8, !tbaa !43
  %120 = fadd double %119, %117
  store double %120, ptr %118, align 8, !tbaa !43
  br label %121

121:                                              ; preds = %112, %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %122 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 4
  %123 = load i8, ptr %122, align 4, !tbaa !46, !range !35, !noundef !36
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %129

125:                                              ; preds = %121
  %126 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 8
  %127 = load i32, ptr %126, align 4, !tbaa !45
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %126, align 4, !tbaa !45
  br label %129

129:                                              ; preds = %125, %121
  %130 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 4
  %131 = load i8, ptr %130, align 4, !tbaa !46, !range !35, !noundef !36
  %132 = trunc i8 %131 to i1
  br i1 %132, label %133, label %259

133:                                              ; preds = %129
  %134 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %135 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #5
  %136 = load i32, ptr @_ZN5snake16MIN_SPLIT_LENGTHE, align 4, !tbaa !25
  %137 = sext i32 %136 to i64
  %138 = icmp uge i64 %135, %137
  br i1 %138, label %139, label %259

139:                                              ; preds = %133
  %140 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 5
  %141 = load i32, ptr %140, align 4, !tbaa !47
  %142 = load i32, ptr @_ZN5snake10MIN_LENGTHE, align 4, !tbaa !25
  %143 = icmp sge i32 %141, %142
  br i1 %143, label %144, label %259

144:                                              ; preds = %139
  %145 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %146 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %145) #5
  %147 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 5
  %148 = load i32, ptr %147, align 4, !tbaa !47
  %149 = sext i32 %148 to i64
  %150 = sub i64 %146, %149
  %151 = load i32, ptr @_ZN5snake10MIN_LENGTHE, align 4, !tbaa !25
  %152 = sext i32 %151 to i64
  %153 = icmp uge i64 %150, %152
  br i1 %153, label %154, label %259

154:                                              ; preds = %144
  %155 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %156 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %157 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %156) #5
  %158 = sub i64 %157, 1
  %159 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %155, i64 noundef %158) #5
  %160 = getelementptr inbounds %struct.point, ptr %159, i32 0, i32 0
  %161 = load i32, ptr %160, align 4, !tbaa !48
  store i32 %161, ptr %13, align 4, !tbaa !25
  %162 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %163 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %164 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %163) #5
  %165 = sub i64 %164, 1
  %166 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %165) #5
  %167 = getelementptr inbounds %struct.point, ptr %166, i32 0, i32 1
  %168 = load i32, ptr %167, align 4, !tbaa !49
  store i32 %168, ptr %14, align 4, !tbaa !25
  %169 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %170 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %171 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #5
  %172 = sub i64 %171, 2
  %173 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %169, i64 noundef %172) #5
  %174 = getelementptr inbounds %struct.point, ptr %173, i32 0, i32 0
  %175 = load i32, ptr %174, align 4, !tbaa !48
  store i32 %175, ptr %15, align 4, !tbaa !25
  %176 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %177 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %178 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %177) #5
  %179 = sub i64 %178, 2
  %180 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %176, i64 noundef %179) #5
  %181 = getelementptr inbounds %struct.point, ptr %180, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !49
  store i32 %182, ptr %16, align 4, !tbaa !25
  %183 = load i32, ptr %13, align 4, !tbaa !25
  %184 = load i32, ptr %15, align 4, !tbaa !25
  %185 = icmp eq i32 %183, %184
  br i1 %185, label %186, label %201

186:                                              ; preds = %154
  %187 = load i32, ptr %14, align 4, !tbaa !25
  %188 = load i32, ptr %16, align 4, !tbaa !25
  %189 = sub nsw i32 %187, %188
  %190 = call i32 @llvm.abs.i32(i32 %189, i1 true)
  %191 = icmp eq i32 %190, 1
  %192 = zext i1 %191 to i32
  %193 = load i32, ptr %14, align 4, !tbaa !25
  %194 = load i32, ptr %16, align 4, !tbaa !25
  %195 = icmp sgt i32 %193, %194
  %196 = zext i1 %195 to i32
  %197 = icmp eq i32 %192, %196
  br i1 %197, label %198, label %199

198:                                              ; preds = %186
  store i32 0, ptr %6, align 4, !tbaa !25
  br label %200

199:                                              ; preds = %186
  store i32 2, ptr %6, align 4, !tbaa !25
  br label %200

200:                                              ; preds = %199, %198
  br label %216

201:                                              ; preds = %154
  %202 = load i32, ptr %13, align 4, !tbaa !25
  %203 = load i32, ptr %15, align 4, !tbaa !25
  %204 = sub nsw i32 %202, %203
  %205 = call i32 @llvm.abs.i32(i32 %204, i1 true)
  %206 = icmp eq i32 %205, 1
  %207 = zext i1 %206 to i32
  %208 = load i32, ptr %13, align 4, !tbaa !25
  %209 = load i32, ptr %15, align 4, !tbaa !25
  %210 = icmp sgt i32 %208, %209
  %211 = zext i1 %210 to i32
  %212 = icmp eq i32 %207, %211
  br i1 %212, label %213, label %214

213:                                              ; preds = %201
  store i32 1, ptr %6, align 4, !tbaa !25
  br label %215

214:                                              ; preds = %201
  store i32 3, ptr %6, align 4, !tbaa !25
  br label %215

215:                                              ; preds = %214, %213
  br label %216

216:                                              ; preds = %215, %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %217 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %218 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #5
  %219 = sub i64 %218, 1
  %220 = trunc i64 %219 to i32
  store i32 %220, ptr %17, align 4, !tbaa !25
  br label %221

221:                                              ; preds = %239, %216
  %222 = load i32, ptr %17, align 4, !tbaa !25
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %225 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %224) #5
  %226 = sub i64 %225, 1
  %227 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 5
  %228 = load i32, ptr %227, align 4, !tbaa !47
  %229 = sext i32 %228 to i64
  %230 = sub i64 %226, %229
  %231 = icmp ugt i64 %223, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %221
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %246

233:                                              ; preds = %221
  %234 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %235 = load i32, ptr %17, align 4, !tbaa !25
  %236 = sext i32 %235 to i64
  %237 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %234, i64 noundef %236) #5
  invoke void @_ZNSt6vectorI5blockSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %237)
          to label %238 unwind label %242

238:                                              ; preds = %233
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %17, align 4, !tbaa !25
  %241 = add nsw i32 %240, -1
  store i32 %241, ptr %17, align 4, !tbaa !25
  br label %221, !llvm.loop !50

242:                                              ; preds = %233
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %7, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %261

246:                                              ; preds = %232
  %247 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %248 = getelementptr inbounds %struct.snake, ptr %18, i32 0, i32 12
  %249 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %248) #5
  %250 = getelementptr inbounds %struct.decision, ptr %11, i32 0, i32 5
  %251 = load i32, ptr %250, align 4, !tbaa !47
  %252 = sext i32 %251 to i64
  %253 = sub i64 %249, %252
  invoke void @_ZNSt6vectorI5blockSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %253)
          to label %254 unwind label %255

254:                                              ; preds = %246
  br label %259

255:                                              ; preds = %259, %246
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %7, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %8, align 4
  br label %261

259:                                              ; preds = %254, %144, %139, %133, %129
  invoke void @_ZSt9make_pairIRiRSt6vectorI5blockSaIS2_EEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %260 unwind label %255

260:                                              ; preds = %259
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  br label %263

261:                                              ; preds = %255, %242
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %262

262:                                              ; preds = %261, %75
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  br label %264

263:                                              ; preds = %260, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorI5blockSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  ret void

264:                                              ; preds = %262, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorI5blockSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %265

265:                                              ; preds = %264
  %266 = load ptr, ptr %7, align 8
  %267 = load i32, ptr %8, align 4
  %268 = insertvalue { ptr, i32 } poison, ptr %266, 0
  %269 = insertvalue { ptr, i32 } %268, i32 %267, 1
  resume { ptr, i32 } %269
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRiRSt6vectorI5blockSaIS2_EEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(24)) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !14, i64 80}
!10 = !{!"_ZTS5snake", !11, i64 0, !14, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !16, i64 92, !16, i64 93, !17, i64 96, !6, i64 120}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSSt6vectorI5blockSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI5blockSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI5blockSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI5blockSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!10, !6, i64 120}
!22 = !{!23, !14, i64 40}
!23 = !{!"_ZTS10controller", !7, i64 8, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !14, i64 40, !14, i64 44}
!24 = !{!23, !14, i64 44}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !14, i64 8}
!27 = !{!"_ZTS5block", !28, i64 0, !14, i64 8}
!28 = !{!"_ZTS5point", !14, i64 0, !14, i64 4}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!32, !32, i64 0}
!32 = !{!"vtable pointer", !8, i64 0}
!33 = !{!34, !16, i64 0}
!34 = !{!"_ZTS8decision", !16, i64 0, !16, i64 1, !16, i64 2, !16, i64 3, !16, i64 4, !14, i64 8}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!10, !14, i64 88}
!38 = !{!34, !16, i64 1}
!39 = !{!34, !16, i64 2}
!40 = !{!10, !16, i64 92}
!41 = !{!10, !16, i64 93}
!42 = !{!15, !15, i64 0}
!43 = !{!10, !15, i64 40}
!44 = !{!34, !16, i64 3}
!45 = !{!10, !14, i64 84}
!46 = !{!34, !16, i64 4}
!47 = !{!34, !14, i64 8}
!48 = !{!28, !14, i64 0}
!49 = !{!28, !14, i64 4}
!50 = distinct !{!50, !30}


; 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"

%"struct.std::pair" = type { i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl" }
%"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl" = type { %"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl_data" }
%"struct.std::_Vector_base<block, std::allocator<block>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN5snake13DEFENCE_BOOSTE = external dso_local local_unnamed_addr global double, align 8
@_ZN5snake16MIN_SPLIT_LENGTHE = external dso_local local_unnamed_addr global i32, align 4
@_ZN5snake10MIN_LENGTHE = external dso_local local_unnamed_addr global i32, align 4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5snake5thinkEv(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorI5blockSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %1, i64 80
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %10, label %7

7:                                                ; preds = %2
  invoke void @_ZSt9make_pairIRiRSt6vectorI5blockSaIS2_EEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %141 unwind label %8

8:                                                ; preds = %7
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %142

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %1, i64 96
  %12 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %13 = trunc i64 %12 to i32
  %14 = getelementptr inbounds i8, ptr %1, i64 120
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  %16 = getelementptr inbounds i8, ptr %15, i64 40
  store i32 %13, ptr %16, align 8, !tbaa !21
  %17 = getelementptr inbounds i8, ptr %15, i64 44
  store i32 0, ptr %17, align 4, !tbaa !23
  %18 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %.not45 = icmp eq i64 %18, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %10
  %19 = load ptr, ptr %14, align 8, !tbaa !20
  %20 = load ptr, ptr %19, align 8, !tbaa !24
  %21 = getelementptr inbounds i8, ptr %20, i64 48
  %22 = load ptr, ptr %21, align 8
  %23 = invoke { i64, i32 } %22(ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %33 unwind label %39

.lr.ph:                                           ; preds = %10, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %10 ]
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #4
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load i32, ptr %25, align 4, !tbaa !26
  %27 = load ptr, ptr %14, align 8, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %27, i64 44
  %29 = load i32, ptr %28, align 4, !tbaa !23
  %30 = add nsw i32 %29, %26
  store i32 %30, ptr %28, align 4, !tbaa !23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %32 = icmp ugt i64 %31, %indvars.iv.next
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !29

33:                                               ; preds = %._crit_edge
  %.fca.0.extract = extractvalue { i64, i32 } %23, 0
  %.fca.1.extract = extractvalue { i64, i32 } %23, 1
  %34 = trunc i64 %.fca.0.extract to i1
  br i1 %34, label %35, label %41

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %1, i64 88
  %37 = load i32, ptr %36, align 8, !tbaa !31
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %36, align 8, !tbaa !31
  br label %41

39:                                               ; preds = %._crit_edge
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %142

41:                                               ; preds = %35, %33
  %42 = and i64 %.fca.0.extract, 256
  %.not34 = icmp eq i64 %42, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 88
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !31
  br i1 %.not34, label %._crit_edge47, label %43

43:                                               ; preds = %41
  %44 = add nsw i32 %.pre, -1
  store i32 %44, ptr %.phi.trans.insert, align 8, !tbaa !31
  br label %._crit_edge47

._crit_edge47:                                    ; preds = %41, %43
  %45 = phi i32 [ %44, %43 ], [ %.pre, %41 ]
  %46 = getelementptr inbounds i8, ptr %1, i64 88
  %47 = add nsw i32 %45, 4
  %48 = srem i32 %47, 4
  store i32 %48, ptr %46, align 8, !tbaa !31
  %49 = getelementptr inbounds i8, ptr %1, i64 92
  %50 = lshr i64 %.fca.0.extract, 16
  %51 = trunc i64 %50 to i8
  %52 = and i8 %51, 1
  store i8 %52, ptr %49, align 4, !tbaa !32
  %53 = getelementptr inbounds i8, ptr %1, i64 93
  %54 = load i8, ptr %53, align 1, !tbaa !33, !range !34, !noundef !35
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %56, label %61

56:                                               ; preds = %._crit_edge47
  store i8 0, ptr %53, align 1, !tbaa !33
  %57 = load double, ptr @_ZN5snake13DEFENCE_BOOSTE, align 8, !tbaa !36
  %58 = getelementptr inbounds i8, ptr %1, i64 40
  %59 = load double, ptr %58, align 8, !tbaa !37
  %60 = fsub double %59, %57
  store double %60, ptr %58, align 8, !tbaa !37
  br label %61

61:                                               ; preds = %56, %._crit_edge47
  %62 = and i64 %.fca.0.extract, 16777216
  %.not35 = icmp eq i64 %62, 0
  br i1 %.not35, label %71, label %63

63:                                               ; preds = %61
  %64 = getelementptr inbounds i8, ptr %1, i64 84
  %65 = load i32, ptr %64, align 4, !tbaa !38
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %64, align 4, !tbaa !38
  store i8 1, ptr %53, align 1, !tbaa !33
  %67 = load double, ptr @_ZN5snake13DEFENCE_BOOSTE, align 8, !tbaa !36
  %68 = getelementptr inbounds i8, ptr %1, i64 40
  %69 = load double, ptr %68, align 8, !tbaa !37
  %70 = fadd double %67, %69
  store double %70, ptr %68, align 8, !tbaa !37
  br label %71

71:                                               ; preds = %63, %61
  %72 = and i64 %.fca.0.extract, 4294967296
  %.not36 = icmp eq i64 %72, 0
  br i1 %.not36, label %.critedge, label %73

73:                                               ; preds = %71
  %74 = getelementptr inbounds i8, ptr %1, i64 84
  %75 = load i32, ptr %74, align 4, !tbaa !38
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %74, align 4, !tbaa !38
  %77 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %78 = load i32, ptr @_ZN5snake16MIN_SPLIT_LENGTHE, align 4, !tbaa !39
  %79 = sext i32 %78 to i64
  %.not37 = icmp ult i64 %77, %79
  %80 = load i32, ptr @_ZN5snake10MIN_LENGTHE, align 4
  %.not38 = icmp slt i32 %.fca.1.extract, %80
  %or.cond = select i1 %.not37, i1 true, i1 %.not38
  br i1 %or.cond, label %.critedge, label %81

81:                                               ; preds = %73
  %82 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %83 = sext i32 %.fca.1.extract to i64
  %84 = sub i64 %82, %83
  %85 = load i32, ptr @_ZN5snake10MIN_LENGTHE, align 4, !tbaa !39
  %86 = sext i32 %85 to i64
  %.not39 = icmp ult i64 %84, %86
  br i1 %.not39, label %.critedge, label %87

87:                                               ; preds = %81
  %88 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %89 = add i64 %88, -1
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %89) #4
  %91 = load i32, ptr %90, align 4, !tbaa !40
  %92 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %93 = add i64 %92, -1
  %94 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %93) #4
  %95 = getelementptr inbounds i8, ptr %94, i64 4
  %96 = load i32, ptr %95, align 4, !tbaa !41
  %97 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %98 = add i64 %97, -2
  %99 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %98) #4
  %100 = load i32, ptr %99, align 4, !tbaa !40
  %101 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %102 = add i64 %101, -2
  %103 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %102) #4
  %104 = icmp eq i32 %91, %100
  br i1 %104, label %105, label %115

105:                                              ; preds = %87
  %106 = getelementptr inbounds i8, ptr %103, i64 4
  %107 = load i32, ptr %106, align 4, !tbaa !41
  %108 = sub nsw i32 %96, %107
  %109 = call i32 @llvm.abs.i32(i32 %108, i1 true)
  %110 = icmp eq i32 %109, 1
  %111 = icmp sle i32 %96, %107
  %112 = xor i1 %111, %110
  br i1 %112, label %113, label %114

113:                                              ; preds = %105
  store i32 0, ptr %4, align 4, !tbaa !39
  br label %123

114:                                              ; preds = %105
  store i32 2, ptr %4, align 4, !tbaa !39
  br label %123

115:                                              ; preds = %87
  %116 = sub nsw i32 %91, %100
  %117 = call i32 @llvm.abs.i32(i32 %116, i1 true)
  %118 = icmp eq i32 %117, 1
  %119 = icmp sle i32 %91, %100
  %120 = xor i1 %119, %118
  br i1 %120, label %121, label %122

121:                                              ; preds = %115
  store i32 1, ptr %4, align 4, !tbaa !39
  br label %123

122:                                              ; preds = %115
  store i32 3, ptr %4, align 4, !tbaa !39
  br label %123

123:                                              ; preds = %121, %122, %113, %114
  %124 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %125 = trunc i64 %124 to i32
  %126 = xor i64 %83, -1
  br label %127

127:                                              ; preds = %135, %123
  %.0.in = phi i32 [ %125, %123 ], [ %.0, %135 ]
  %.0 = add i32 %.0.in, -1
  %128 = sext i32 %.0 to i64
  %129 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %130 = add i64 %129, %126
  %131 = icmp ult i64 %130, %128
  br i1 %131, label %135, label %132

132:                                              ; preds = %127
  %133 = call noundef i64 @_ZNKSt6vectorI5blockSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %134 = sub i64 %133, %83
  invoke void @_ZNSt6vectorI5blockSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %134)
          to label %.critedge unwind label %139

135:                                              ; preds = %127
  %136 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5blockSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %128) #4
  invoke void @_ZNSt6vectorI5blockSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %136)
          to label %127 unwind label %137, !llvm.loop !42

137:                                              ; preds = %135
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %142

139:                                              ; preds = %.critedge, %132
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %142

.critedge:                                        ; preds = %71, %132, %81, %73
  invoke void @_ZSt9make_pairIRiRSt6vectorI5blockSaIS2_EEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %141 unwind label %139

141:                                              ; preds = %.critedge, %7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @_ZNSt6vectorI5blockSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret void

142:                                              ; preds = %39, %139, %137, %8
  %.pn42 = phi { ptr, i32 } [ %9, %8 ], [ %40, %39 ], [ %138, %137 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @_ZNSt6vectorI5blockSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn42
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRiRSt6vectorI5blockSaIS2_EEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI5blockSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !13, i64 80}
!6 = !{!"_ZTS5snake", !7, i64 0, !13, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !13, i64 80, !13, i64 84, !13, i64 88, !15, i64 92, !15, i64 93, !16, i64 96, !9, i64 120}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!"double", !10, i64 0}
!15 = !{!"bool", !10, i64 0}
!16 = !{!"_ZTSSt6vectorI5blockSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI5blockSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI5blockSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI5blockSaIS0_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!20 = !{!6, !9, i64 120}
!21 = !{!22, !13, i64 40}
!22 = !{!"_ZTS10controller", !10, i64 8, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !13, i64 40, !13, i64 44}
!23 = !{!22, !13, i64 44}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !11, i64 0}
!26 = !{!27, !13, i64 8}
!27 = !{!"_ZTS5block", !28, i64 0, !13, i64 8}
!28 = !{!"_ZTS5point", !13, i64 0, !13, i64 4}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!6, !13, i64 88}
!32 = !{!6, !15, i64 92}
!33 = !{!6, !15, i64 93}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!14, !14, i64 0}
!37 = !{!6, !14, i64 40}
!38 = !{!6, !13, i64 84}
!39 = !{!13, !13, i64 0}
!40 = !{!28, !13, i64 0}
!41 = !{!28, !13, i64 4}
!42 = distinct !{!42, !30}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass