; LLVM IR from bondhugula/pluto :: examples/lbm/ldc/d2q9 (ldc_d2q9)

; 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.timeval = type { i64, i64 }

@omega = external dso_local global double, align 8
@.str = external hidden unnamed_addr constant [206 x i8], align 1
@grid = external dso_local global [2 x [1030 x [1028 x [9 x double]]]], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.timeval, align 8
  %9 = alloca %struct.timeval, align 8
  %10 = alloca %struct.timeval, align 8
  %11 = alloca double, align 8
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store double 5.242880e+08, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 -1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store double 0.000000e+00, ptr %11, align 8, !tbaa !5
  store double 0x3FF3D3462E78714E, ptr @omega, align 8, !tbaa !5
  %15 = load double, ptr @omega, align 8, !tbaa !5
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef 1024, i32 noundef 1024, double noundef 0x4090624DD2F1A9FC, i32 noundef 500, double noundef 1.000000e+02, double noundef 1.000000e-02, double noundef %15)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %55, %0
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = icmp slt i32 %18, 1030
  br i1 %19, label %20, label %58

20:                                               ; preds = %17
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %51, %20
  %22 = load i32, ptr %4, align 4, !tbaa !9
  %23 = icmp slt i32 %22, 1028
  br i1 %23, label %24, label %54

24:                                               ; preds = %21
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %47, %24
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 9
  br i1 %27, label %28, label %50

28:                                               ; preds = %25
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr @grid, i64 0, i64 %30
  %32 = load i32, ptr %4, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1028 x [9 x double]], ptr %31, i64 0, i64 %33
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [9 x double], ptr %34, i64 0, i64 %36
  store double 1.000000e+00, ptr %37, align 8, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr getelementptr inbounds ([2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 1), i64 0, i64 %39
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1028 x [9 x double]], ptr %40, i64 0, i64 %42
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [9 x double], ptr %43, i64 0, i64 %45
  store double 1.000000e+00, ptr %46, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %28
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %5, align 4, !tbaa !9
  br label %25, !llvm.loop !11

50:                                               ; preds = %25
  br label %51

51:                                               ; preds = %50
  %52 = load i32, ptr %4, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !9
  br label %21, !llvm.loop !13

54:                                               ; preds = %21
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !9
  br label %17, !llvm.loop !14

58:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #3
  store i16 1027, ptr %12, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #3
  store i16 1028, ptr %13, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 500, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %319, %58
  %60 = load i32, ptr %2, align 4, !tbaa !9
  %61 = load i32, ptr %14, align 4, !tbaa !9
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %63, label %322

63:                                               ; preds = %59
  store i32 2, ptr %3, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %315, %63
  %65 = load i32, ptr %3, align 4, !tbaa !9
  %66 = load i16, ptr %13, align 2, !tbaa !15
  %67 = sext i16 %66 to i32
  %68 = icmp slt i32 %65, %67
  br i1 %68, label %69, label %318

69:                                               ; preds = %64
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %311, %69
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = load i16, ptr %12, align 2, !tbaa !15
  %73 = sext i16 %72 to i32
  %74 = icmp slt i32 %71, %73
  br i1 %74, label %75, label %314

75:                                               ; preds = %70
  %76 = load i32, ptr %2, align 4, !tbaa !9
  %77 = srem i32 %76, 2
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %78
  %80 = load i32, ptr %3, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %79, i64 0, i64 %81
  %83 = load i32, ptr %4, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1028 x [9 x double]], ptr %82, i64 0, i64 %84
  %86 = getelementptr inbounds [9 x double], ptr %85, i64 0, i64 0
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = load i32, ptr %2, align 4, !tbaa !9
  %89 = srem i32 %88, 2
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %90
  %92 = load i32, ptr %3, align 4, !tbaa !9
  %93 = sub nsw i32 %92, 1
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %91, i64 0, i64 %94
  %96 = load i32, ptr %4, align 4, !tbaa !9
  %97 = add nsw i32 %96, 0
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1028 x [9 x double]], ptr %95, i64 0, i64 %98
  %100 = getelementptr inbounds [9 x double], ptr %99, i64 0, i64 2
  %101 = load double, ptr %100, align 8, !tbaa !5
  %102 = load i32, ptr %2, align 4, !tbaa !9
  %103 = srem i32 %102, 2
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %104
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %105, i64 0, i64 %108
  %110 = load i32, ptr %4, align 4, !tbaa !9
  %111 = add nsw i32 %110, 0
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [1028 x [9 x double]], ptr %109, i64 0, i64 %112
  %114 = getelementptr inbounds [9 x double], ptr %113, i64 0, i64 4
  %115 = load double, ptr %114, align 8, !tbaa !5
  %116 = load i32, ptr %2, align 4, !tbaa !9
  %117 = srem i32 %116, 2
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %118
  %120 = load i32, ptr %3, align 4, !tbaa !9
  %121 = add nsw i32 %120, 0
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %119, i64 0, i64 %122
  %124 = load i32, ptr %4, align 4, !tbaa !9
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1028 x [9 x double]], ptr %123, i64 0, i64 %126
  %128 = getelementptr inbounds [9 x double], ptr %127, i64 0, i64 1
  %129 = load double, ptr %128, align 8, !tbaa !5
  %130 = load i32, ptr %2, align 4, !tbaa !9
  %131 = srem i32 %130, 2
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %132
  %134 = load i32, ptr %3, align 4, !tbaa !9
  %135 = add nsw i32 %134, 0
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %133, i64 0, i64 %136
  %138 = load i32, ptr %4, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1028 x [9 x double]], ptr %137, i64 0, i64 %140
  %142 = getelementptr inbounds [9 x double], ptr %141, i64 0, i64 3
  %143 = load double, ptr %142, align 8, !tbaa !5
  %144 = load i32, ptr %2, align 4, !tbaa !9
  %145 = srem i32 %144, 2
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %146
  %148 = load i32, ptr %3, align 4, !tbaa !9
  %149 = sub nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %147, i64 0, i64 %150
  %152 = load i32, ptr %4, align 4, !tbaa !9
  %153 = sub nsw i32 %152, 1
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [1028 x [9 x double]], ptr %151, i64 0, i64 %154
  %156 = getelementptr inbounds [9 x double], ptr %155, i64 0, i64 5
  %157 = load double, ptr %156, align 8, !tbaa !5
  %158 = load i32, ptr %2, align 4, !tbaa !9
  %159 = srem i32 %158, 2
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %160
  %162 = load i32, ptr %3, align 4, !tbaa !9
  %163 = sub nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %161, i64 0, i64 %164
  %166 = load i32, ptr %4, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [1028 x [9 x double]], ptr %165, i64 0, i64 %168
  %170 = getelementptr inbounds [9 x double], ptr %169, i64 0, i64 6
  %171 = load double, ptr %170, align 8, !tbaa !5
  %172 = load i32, ptr %2, align 4, !tbaa !9
  %173 = srem i32 %172, 2
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %174
  %176 = load i32, ptr %3, align 4, !tbaa !9
  %177 = add nsw i32 %176, 1
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %175, i64 0, i64 %178
  %180 = load i32, ptr %4, align 4, !tbaa !9
  %181 = sub nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1028 x [9 x double]], ptr %179, i64 0, i64 %182
  %184 = getelementptr inbounds [9 x double], ptr %183, i64 0, i64 8
  %185 = load double, ptr %184, align 8, !tbaa !5
  %186 = load i32, ptr %2, align 4, !tbaa !9
  %187 = srem i32 %186, 2
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %188
  %190 = load i32, ptr %3, align 4, !tbaa !9
  %191 = add nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %189, i64 0, i64 %192
  %194 = load i32, ptr %4, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [1028 x [9 x double]], ptr %193, i64 0, i64 %196
  %198 = getelementptr inbounds [9 x double], ptr %197, i64 0, i64 7
  %199 = load double, ptr %198, align 8, !tbaa !5
  %200 = load i32, ptr %2, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  %202 = srem i32 %201, 2
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %203
  %205 = load i32, ptr %3, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %204, i64 0, i64 %206
  %208 = load i32, ptr %4, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [1028 x [9 x double]], ptr %207, i64 0, i64 %209
  %211 = getelementptr inbounds [9 x double], ptr %210, i64 0, i64 0
  %212 = load i32, ptr %2, align 4, !tbaa !9
  %213 = add nsw i32 %212, 1
  %214 = srem i32 %213, 2
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %215
  %217 = load i32, ptr %3, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %216, i64 0, i64 %218
  %220 = load i32, ptr %4, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [1028 x [9 x double]], ptr %219, i64 0, i64 %221
  %223 = getelementptr inbounds [9 x double], ptr %222, i64 0, i64 2
  %224 = load i32, ptr %2, align 4, !tbaa !9
  %225 = add nsw i32 %224, 1
  %226 = srem i32 %225, 2
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %227
  %229 = load i32, ptr %3, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %228, i64 0, i64 %230
  %232 = load i32, ptr %4, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [1028 x [9 x double]], ptr %231, i64 0, i64 %233
  %235 = getelementptr inbounds [9 x double], ptr %234, i64 0, i64 4
  %236 = load i32, ptr %2, align 4, !tbaa !9
  %237 = add nsw i32 %236, 1
  %238 = srem i32 %237, 2
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %239
  %241 = load i32, ptr %3, align 4, !tbaa !9
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %240, i64 0, i64 %242
  %244 = load i32, ptr %4, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [1028 x [9 x double]], ptr %243, i64 0, i64 %245
  %247 = getelementptr inbounds [9 x double], ptr %246, i64 0, i64 1
  %248 = load i32, ptr %2, align 4, !tbaa !9
  %249 = add nsw i32 %248, 1
  %250 = srem i32 %249, 2
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %251
  %253 = load i32, ptr %3, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %252, i64 0, i64 %254
  %256 = load i32, ptr %4, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [1028 x [9 x double]], ptr %255, i64 0, i64 %257
  %259 = getelementptr inbounds [9 x double], ptr %258, i64 0, i64 3
  %260 = load i32, ptr %2, align 4, !tbaa !9
  %261 = add nsw i32 %260, 1
  %262 = srem i32 %261, 2
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %263
  %265 = load i32, ptr %3, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %264, i64 0, i64 %266
  %268 = load i32, ptr %4, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [1028 x [9 x double]], ptr %267, i64 0, i64 %269
  %271 = getelementptr inbounds [9 x double], ptr %270, i64 0, i64 5
  %272 = load i32, ptr %2, align 4, !tbaa !9
  %273 = add nsw i32 %272, 1
  %274 = srem i32 %273, 2
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %275
  %277 = load i32, ptr %3, align 4, !tbaa !9
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %276, i64 0, i64 %278
  %280 = load i32, ptr %4, align 4, !tbaa !9
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [1028 x [9 x double]], ptr %279, i64 0, i64 %281
  %283 = getelementptr inbounds [9 x double], ptr %282, i64 0, i64 6
  %284 = load i32, ptr %2, align 4, !tbaa !9
  %285 = add nsw i32 %284, 1
  %286 = srem i32 %285, 2
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %287
  %289 = load i32, ptr %3, align 4, !tbaa !9
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %288, i64 0, i64 %290
  %292 = load i32, ptr %4, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [1028 x [9 x double]], ptr %291, i64 0, i64 %293
  %295 = getelementptr inbounds [9 x double], ptr %294, i64 0, i64 8
  %296 = load i32, ptr %2, align 4, !tbaa !9
  %297 = add nsw i32 %296, 1
  %298 = srem i32 %297, 2
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %299
  %301 = load i32, ptr %3, align 4, !tbaa !9
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr %300, i64 0, i64 %302
  %304 = load i32, ptr %4, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [1028 x [9 x double]], ptr %303, i64 0, i64 %305
  %307 = getelementptr inbounds [9 x double], ptr %306, i64 0, i64 7
  %308 = load i32, ptr %2, align 4, !tbaa !9
  %309 = load i32, ptr %3, align 4, !tbaa !9
  %310 = load i32, ptr %4, align 4, !tbaa !9
  call void @lbm_kernel(double noundef %87, double noundef %101, double noundef %115, double noundef %129, double noundef %143, double noundef %157, double noundef %171, double noundef %185, double noundef %199, ptr noundef %211, ptr noundef %223, ptr noundef %235, ptr noundef %247, ptr noundef %259, ptr noundef %271, ptr noundef %283, ptr noundef %295, ptr noundef %307, i32 noundef %308, i32 noundef %309, i32 noundef %310)
  br label %311

311:                                              ; preds = %75
  %312 = load i32, ptr %4, align 4, !tbaa !9
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %4, align 4, !tbaa !9
  br label %70, !llvm.loop !17

314:                                              ; preds = %70
  br label %315

315:                                              ; preds = %314
  %316 = load i32, ptr %3, align 4, !tbaa !9
  %317 = add nsw i32 %316, 1
  store i32 %317, ptr %3, align 4, !tbaa !9
  br label %64, !llvm.loop !18

318:                                              ; preds = %64
  br label %319

319:                                              ; preds = %318
  %320 = load i32, ptr %2, align 4, !tbaa !9
  %321 = add nsw i32 %320, 1
  store i32 %321, ptr %2, align 4, !tbaa !9
  br label %59, !llvm.loop !19

322:                                              ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  ret i32 0
}

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @lbm_kernel(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

attributes #0 = { 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 = { "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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


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

@omega = external dso_local local_unnamed_addr global double, align 8
@.str = external hidden unnamed_addr constant [206 x i8], align 1
@grid = external dso_local global [2 x [1030 x [1028 x [9 x double]]]], align 16

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  store double 0x3FF3D3462E78714E, ptr @omega, align 8, !tbaa !5
  %1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 1024, i32 noundef 1024, double noundef 0x4090624DD2F1A9FC, i32 noundef 500, double noundef 1.000000e+02, double noundef 1.000000e-02, double noundef 0x3FF3D3462E78714E)
  br label %.preheader85

.preheader85:                                     ; preds = %0, %12
  %indvars.iv94 = phi i64 [ 0, %0 ], [ %indvars.iv.next95, %12 ]
  br label %.preheader84

.preheader84:                                     ; preds = %.preheader85, %.preheader84
  %indvars.iv = phi i64 [ 0, %.preheader85 ], [ %indvars.iv.next, %.preheader84 ]
  %2 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr @grid, i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 0
  %3 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr getelementptr inbounds (i8, ptr @grid, i64 76236480), i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 0
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %2, align 8, !tbaa !5
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr @grid, i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 2
  %5 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr getelementptr inbounds (i8, ptr @grid, i64 76236480), i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 2
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %4, align 8, !tbaa !5
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr @grid, i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 4
  %7 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr getelementptr inbounds (i8, ptr @grid, i64 76236480), i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 4
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %6, align 8, !tbaa !5
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr @grid, i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 6
  %9 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr getelementptr inbounds (i8, ptr @grid, i64 76236480), i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 6
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %8, align 8, !tbaa !5
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr @grid, i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 8
  store double 1.000000e+00, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds [1030 x [1028 x [9 x double]]], ptr getelementptr inbounds (i8, ptr @grid, i64 76236480), i64 0, i64 %indvars.iv94, i64 %indvars.iv, i64 8
  store double 1.000000e+00, ptr %11, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1028
  br i1 %exitcond.not, label %12, label %.preheader84, !llvm.loop !9

12:                                               ; preds = %.preheader84
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next95, 1030
  br i1 %exitcond97.not, label %.preheader82, label %.preheader85, !llvm.loop !11

.preheader82:                                     ; preds = %12, %50
  %.091 = phi i32 [ %51, %50 ], [ 0, %12 ]
  %13 = and i32 %.091, 1
  %14 = zext nneg i32 %13 to i64
  %15 = xor i32 %13, 1
  %16 = zext nneg i32 %15 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader82, %49
  %indvars.iv102 = phi i64 [ 2, %.preheader82 ], [ %indvars.iv.next103, %49 ]
  %17 = add nsw i64 %indvars.iv102, -1
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %18 = trunc nuw nsw i64 %indvars.iv102 to i32
  br label %19

19:                                               ; preds = %.preheader, %19
  %indvars.iv98 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next99, %19 ]
  %20 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %indvars.iv102, i64 %indvars.iv98
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %17, i64 %indvars.iv98, i64 2
  %23 = load double, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %indvars.iv.next103, i64 %indvars.iv98, i64 4
  %25 = load double, ptr %24, align 8, !tbaa !5
  %26 = add nsw i64 %indvars.iv98, -1
  %27 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %indvars.iv102, i64 %26, i64 1
  %28 = load double, ptr %27, align 8, !tbaa !5
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %29 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %indvars.iv102, i64 %indvars.iv.next99, i64 3
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %17, i64 %26, i64 5
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %17, i64 %indvars.iv.next99, i64 6
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %indvars.iv.next103, i64 %26, i64 8
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %14, i64 %indvars.iv.next103, i64 %indvars.iv.next99, i64 7
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds [2 x [1030 x [1028 x [9 x double]]]], ptr @grid, i64 0, i64 %16, i64 %indvars.iv102, i64 %indvars.iv98
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = getelementptr inbounds i8, ptr %39, i64 32
  %42 = getelementptr inbounds i8, ptr %39, i64 8
  %43 = getelementptr inbounds i8, ptr %39, i64 24
  %44 = getelementptr inbounds i8, ptr %39, i64 40
  %45 = getelementptr inbounds i8, ptr %39, i64 48
  %46 = getelementptr inbounds i8, ptr %39, i64 64
  %47 = getelementptr inbounds i8, ptr %39, i64 56
  %48 = trunc nuw nsw i64 %indvars.iv98 to i32
  tail call void @lbm_kernel(double noundef %21, double noundef %23, double noundef %25, double noundef %28, double noundef %30, double noundef %32, double noundef %34, double noundef %36, double noundef %38, ptr noundef nonnull %39, ptr noundef nonnull %40, ptr noundef nonnull %41, ptr noundef nonnull %42, ptr noundef nonnull %43, ptr noundef nonnull %44, ptr noundef nonnull %45, ptr noundef nonnull %46, ptr noundef nonnull %47, i32 noundef %.091, i32 noundef %18, i32 noundef %48)
  %exitcond101.not = icmp eq i64 %indvars.iv.next99, 1027
  br i1 %exitcond101.not, label %49, label %19, !llvm.loop !12

49:                                               ; preds = %19
  %exitcond105.not = icmp eq i64 %indvars.iv.next103, 1028
  br i1 %exitcond105.not, label %50, label %.preheader, !llvm.loop !13

50:                                               ; preds = %49
  %51 = add nuw nsw i32 %.091, 1
  %exitcond106.not = icmp eq i32 %51, 500
  br i1 %exitcond106.not, label %52, label %.preheader82, !llvm.loop !14

52:                                               ; preds = %50
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @lbm_kernel(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, ptr noalias noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

attributes #0 = { 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 = { nofree 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" }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass