; LLVM IR from NaokiHori/VerySimpleNSSolver :: src/integrate (solve_poisson)

; 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.domain_t = type { double, double, i64, i64, double, double }
%struct.flow_solver_t = type { ptr, ptr, ptr, %struct.poisson_solver_t }
%struct.poisson_solver_t = type { ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, ptr }
%struct.flow_field_t = type { ptr, ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @solve_poisson(ptr noundef %0, ptr noundef %1, ptr noundef %2, double noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca double, align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store double %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.domain_t, ptr %36, i32 0, i32 2
  %38 = load i64, ptr %37, align 8, !tbaa !11
  store i64 %38, ptr %10, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.domain_t, ptr %39, i32 0, i32 3
  %41 = load i64, ptr %40, align 8, !tbaa !15
  store i64 %41, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.domain_t, ptr %42, i32 0, i32 4
  %44 = load double, ptr %43, align 8, !tbaa !16
  store double %44, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.domain_t, ptr %45, i32 0, i32 5
  %47 = load double, ptr %46, align 8, !tbaa !17
  store double %47, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.flow_solver_t, ptr %48, i32 0, i32 3
  store ptr %49, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.flow_solver_t, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  store ptr %52, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.poisson_solver_t, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  store ptr %55, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.poisson_solver_t, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !22
  store ptr %58, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.flow_field_t, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !23
  store ptr %61, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.flow_field_t, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !25
  store ptr %64, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %65 = load double, ptr %9, align 8, !tbaa !9
  %66 = fdiv double 1.000000e+00, %65
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.poisson_solver_t, ptr %67, i32 0, i32 4
  %69 = load double, ptr %68, align 8, !tbaa !26
  %70 = fdiv double %66, %69
  store double %70, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 1, ptr %21, align 8, !tbaa !14
  br label %71

71:                                               ; preds = %141, %4
  %72 = load i64, ptr %21, align 8, !tbaa !14
  %73 = load i64, ptr %11, align 8, !tbaa !14
  %74 = icmp ule i64 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 2, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %144

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 1, ptr %23, align 8, !tbaa !14
  br label %77

77:                                               ; preds = %137, %76
  %78 = load i64, ptr %23, align 8, !tbaa !14
  %79 = load i64, ptr %10, align 8, !tbaa !14
  %80 = icmp ule i64 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 5, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %140

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = load i64, ptr %21, align 8, !tbaa !14
  %85 = getelementptr inbounds ptr, ptr %83, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i64, ptr %23, align 8, !tbaa !14
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !9
  %90 = fneg double %89
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = load i64, ptr %21, align 8, !tbaa !14
  %93 = getelementptr inbounds ptr, ptr %91, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = load i64, ptr %23, align 8, !tbaa !14
  %96 = add i64 %95, 1
  %97 = getelementptr inbounds double, ptr %94, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !9
  %99 = fadd double %90, %98
  store double %99, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  %101 = load i64, ptr %21, align 8, !tbaa !14
  %102 = getelementptr inbounds ptr, ptr %100, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = load i64, ptr %23, align 8, !tbaa !14
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !9
  %107 = fneg double %106
  %108 = load ptr, ptr %19, align 8, !tbaa !5
  %109 = load i64, ptr %21, align 8, !tbaa !14
  %110 = add i64 %109, 1
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load i64, ptr %23, align 8, !tbaa !14
  %114 = getelementptr inbounds double, ptr %112, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = fadd double %107, %115
  store double %116, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %117 = load double, ptr %12, align 8, !tbaa !9
  %118 = fdiv double 1.000000e+00, %117
  %119 = load double, ptr %24, align 8, !tbaa !9
  %120 = load double, ptr %13, align 8, !tbaa !9
  %121 = fdiv double 1.000000e+00, %120
  %122 = load double, ptr %25, align 8, !tbaa !9
  %123 = fmul double %121, %122
  %124 = call double @llvm.fmuladd.f64(double %118, double %119, double %123)
  store double %124, ptr %26, align 8, !tbaa !9
  %125 = load double, ptr %20, align 8, !tbaa !9
  %126 = load double, ptr %26, align 8, !tbaa !9
  %127 = fmul double %125, %126
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = load i64, ptr %21, align 8, !tbaa !14
  %130 = sub i64 %129, 1
  %131 = load i64, ptr %10, align 8, !tbaa !14
  %132 = mul i64 %130, %131
  %133 = load i64, ptr %23, align 8, !tbaa !14
  %134 = sub i64 %133, 1
  %135 = add i64 %132, %134
  %136 = getelementptr inbounds double, ptr %128, i64 %135
  store double %127, ptr %136, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %137

137:                                              ; preds = %82
  %138 = load i64, ptr %23, align 8, !tbaa !14
  %139 = add i64 %138, 1
  store i64 %139, ptr %23, align 8, !tbaa !14
  br label %77, !llvm.loop !27

140:                                              ; preds = %81
  br label %141

141:                                              ; preds = %140
  %142 = load i64, ptr %21, align 8, !tbaa !14
  %143 = add i64 %142, 1
  store i64 %143, ptr %21, align 8, !tbaa !14
  br label %71, !llvm.loop !29

144:                                              ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.poisson_solver_t, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !30
  store ptr %147, ptr %27, align 8, !tbaa !5
  %148 = load ptr, ptr %27, align 8, !tbaa !5
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = call i32 @rdft_exec_f(ptr noundef %148, ptr noundef %149)
  %151 = icmp ne i32 0, %150
  br i1 %151, label %152, label %158

152:                                              ; preds = %144
  br label %153

153:                                              ; preds = %152
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 47, ptr noundef @.str.2) #5
  br label %156

156:                                              ; preds = %153
  br label %157

157:                                              ; preds = %156
  store i32 10, ptr %22, align 4
  br label %159

158:                                              ; preds = %144
  store i32 0, ptr %22, align 4
  br label %159

159:                                              ; preds = %158, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  %160 = load i32, ptr %22, align 4
  switch i32 %160, label %286 [
    i32 0, label %161
    i32 10, label %285
  ]

161:                                              ; preds = %159
  %162 = load i64, ptr %10, align 8, !tbaa !14
  %163 = load i64, ptr %11, align 8, !tbaa !14
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  %165 = load ptr, ptr %17, align 8, !tbaa !5
  %166 = call i32 @transpose(i64 noundef %162, i64 noundef %163, ptr noundef %164, ptr noundef %165)
  %167 = icmp ne i32 0, %166
  br i1 %167, label %168, label %174

168:                                              ; preds = %161
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 59, ptr noundef @.str.3) #5
  br label %172

172:                                              ; preds = %169
  br label %173

173:                                              ; preds = %172
  br label %285

174:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.poisson_solver_t, ptr %175, i32 0, i32 6
  %177 = load ptr, ptr %176, align 8, !tbaa !31
  store ptr %177, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %178 = load ptr, ptr %14, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.poisson_solver_t, ptr %178, i32 0, i32 7
  %180 = load ptr, ptr %179, align 8, !tbaa !32
  store ptr %180, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.poisson_solver_t, ptr %181, i32 0, i32 8
  %183 = load ptr, ptr %182, align 8, !tbaa !33
  store ptr %183, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %184 = load ptr, ptr %14, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.poisson_solver_t, ptr %184, i32 0, i32 9
  %186 = load ptr, ptr %185, align 8, !tbaa !34
  store ptr %186, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %187 = load ptr, ptr %14, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.poisson_solver_t, ptr %187, i32 0, i32 5
  %189 = load ptr, ptr %188, align 8, !tbaa !35
  store ptr %189, ptr %32, align 8, !tbaa !5
  %190 = load ptr, ptr %28, align 8, !tbaa !5
  %191 = load ptr, ptr %29, align 8, !tbaa !5
  %192 = load ptr, ptr %30, align 8, !tbaa !5
  %193 = load ptr, ptr %31, align 8, !tbaa !5
  %194 = load ptr, ptr %32, align 8, !tbaa !5
  %195 = load ptr, ptr %17, align 8, !tbaa !5
  %196 = call i32 @tridiagonal_solver_exec(ptr noundef %190, ptr noundef %191, ptr noundef %192, ptr noundef %193, ptr noundef %194, ptr noundef %195)
  %197 = icmp ne i32 0, %196
  br i1 %197, label %198, label %204

198:                                              ; preds = %174
  br label %199

199:                                              ; preds = %198
  %200 = load ptr, ptr @stderr, align 8, !tbaa !5
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 70, ptr noundef @.str.4) #5
  br label %202

202:                                              ; preds = %199
  br label %203

203:                                              ; preds = %202
  store i32 10, ptr %22, align 4
  br label %205

204:                                              ; preds = %174
  store i32 0, ptr %22, align 4
  br label %205

205:                                              ; preds = %204, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  %206 = load i32, ptr %22, align 4
  switch i32 %206, label %286 [
    i32 0, label %207
    i32 10, label %285
  ]

207:                                              ; preds = %205
  %208 = load i64, ptr %11, align 8, !tbaa !14
  %209 = load i64, ptr %10, align 8, !tbaa !14
  %210 = load ptr, ptr %17, align 8, !tbaa !5
  %211 = load ptr, ptr %16, align 8, !tbaa !5
  %212 = call i32 @transpose(i64 noundef %208, i64 noundef %209, ptr noundef %210, ptr noundef %211)
  %213 = icmp ne i32 0, %212
  br i1 %213, label %214, label %220

214:                                              ; preds = %207
  br label %215

215:                                              ; preds = %214
  %216 = load ptr, ptr @stderr, align 8, !tbaa !5
  %217 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %216, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 76, ptr noundef @.str.5) #5
  br label %218

218:                                              ; preds = %215
  br label %219

219:                                              ; preds = %218
  br label %285

220:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %221 = load ptr, ptr %14, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.poisson_solver_t, ptr %221, i32 0, i32 2
  %223 = load ptr, ptr %222, align 8, !tbaa !30
  store ptr %223, ptr %33, align 8, !tbaa !5
  %224 = load ptr, ptr %33, align 8, !tbaa !5
  %225 = load ptr, ptr %16, align 8, !tbaa !5
  %226 = call i32 @rdft_exec_b(ptr noundef %224, ptr noundef %225)
  %227 = icmp ne i32 0, %226
  br i1 %227, label %228, label %234

228:                                              ; preds = %220
  br label %229

229:                                              ; preds = %228
  %230 = load ptr, ptr @stderr, align 8, !tbaa !5
  %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %230, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 83, ptr noundef @.str.6) #5
  br label %232

232:                                              ; preds = %229
  br label %233

233:                                              ; preds = %232
  store i32 10, ptr %22, align 4
  br label %235

234:                                              ; preds = %220
  store i32 0, ptr %22, align 4
  br label %235

235:                                              ; preds = %234, %233
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  %236 = load i32, ptr %22, align 4
  switch i32 %236, label %286 [
    i32 0, label %237
    i32 10, label %285
  ]

237:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  store i64 1, ptr %34, align 8, !tbaa !14
  br label %238

238:                                              ; preds = %270, %237
  %239 = load i64, ptr %34, align 8, !tbaa !14
  %240 = load i64, ptr %11, align 8, !tbaa !14
  %241 = icmp ule i64 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %238
  store i32 19, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  br label %273

243:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  store i64 1, ptr %35, align 8, !tbaa !14
  br label %244

244:                                              ; preds = %266, %243
  %245 = load i64, ptr %35, align 8, !tbaa !14
  %246 = load i64, ptr %10, align 8, !tbaa !14
  %247 = icmp ule i64 %245, %246
  br i1 %247, label %249, label %248

248:                                              ; preds = %244
  store i32 22, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %269

249:                                              ; preds = %244
  %250 = load ptr, ptr %16, align 8, !tbaa !5
  %251 = load i64, ptr %34, align 8, !tbaa !14
  %252 = sub i64 %251, 1
  %253 = load i64, ptr %10, align 8, !tbaa !14
  %254 = mul i64 %252, %253
  %255 = load i64, ptr %35, align 8, !tbaa !14
  %256 = sub i64 %255, 1
  %257 = add i64 %254, %256
  %258 = getelementptr inbounds double, ptr %250, i64 %257
  %259 = load double, ptr %258, align 8, !tbaa !9
  %260 = load ptr, ptr %15, align 8, !tbaa !5
  %261 = load i64, ptr %34, align 8, !tbaa !14
  %262 = getelementptr inbounds ptr, ptr %260, i64 %261
  %263 = load ptr, ptr %262, align 8, !tbaa !5
  %264 = load i64, ptr %35, align 8, !tbaa !14
  %265 = getelementptr inbounds double, ptr %263, i64 %264
  store double %259, ptr %265, align 8, !tbaa !9
  br label %266

266:                                              ; preds = %249
  %267 = load i64, ptr %35, align 8, !tbaa !14
  %268 = add i64 %267, 1
  store i64 %268, ptr %35, align 8, !tbaa !14
  br label %244, !llvm.loop !36

269:                                              ; preds = %248
  br label %270

270:                                              ; preds = %269
  %271 = load i64, ptr %34, align 8, !tbaa !14
  %272 = add i64 %271, 1
  store i64 %272, ptr %34, align 8, !tbaa !14
  br label %238, !llvm.loop !37

273:                                              ; preds = %242
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = load ptr, ptr %15, align 8, !tbaa !5
  %276 = call i32 @exchange_halo_x(ptr noundef %274, ptr noundef %275)
  %277 = icmp ne i32 0, %276
  br i1 %277, label %278, label %284

278:                                              ; preds = %273
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr @stderr, align 8, !tbaa !5
  %281 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %280, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 104, ptr noundef @.str.7) #5
  br label %282

282:                                              ; preds = %279
  br label %283

283:                                              ; preds = %282
  br label %285

284:                                              ; preds = %273
  store i32 0, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %286

285:                                              ; preds = %283, %235, %219, %205, %173, %159
  store i32 1, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %286

286:                                              ; preds = %285, %284, %235, %205, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %287 = load i32, ptr %5, align 4
  ret i32 %287
}

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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

declare i32 @rdft_exec_f(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare i32 @transpose(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare i32 @tridiagonal_solver_exec(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @rdft_exec_b(ptr noundef, ptr noundef) #3

declare i32 @exchange_halo_x(ptr noundef, ptr noundef) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { "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 "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 #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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"", !10, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !10, i64 40}
!13 = !{!"long", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 24}
!16 = !{!12, !10, i64 32}
!17 = !{!12, !10, i64 40}
!18 = !{!19, !6, i64 0}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !20, i64 24}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !6, i64 8}
!23 = !{!24, !6, i64 0}
!24 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!24, !6, i64 8}
!26 = !{!20, !10, i64 32}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = !{!20, !6, i64 16}
!31 = !{!20, !6, i64 48}
!32 = !{!20, !6, i64 56}
!33 = !{!20, !6, i64 64}
!34 = !{!20, !6, i64 72}
!35 = !{!20, !6, i64 40}
!36 = distinct !{!36, !28}
!37 = distinct !{!37, !28}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @solve_poisson(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, double noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load i64, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %2, i64 24
  %10 = load ptr, ptr %2, align 8, !tbaa !12
  %11 = load ptr, ptr %9, align 8, !tbaa !16
  %12 = ptrtoint ptr %11 to i64
  %13 = getelementptr inbounds i8, ptr %2, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = load ptr, ptr %1, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !20
  %18 = fdiv double 1.000000e+00, %3
  %19 = getelementptr inbounds i8, ptr %2, i64 56
  %20 = load double, ptr %19, align 8, !tbaa !21
  %21 = fdiv double %18, %20
  %invariant.gep114 = getelementptr i8, ptr %11, i64 -8
  %.not116 = icmp eq i64 %8, 0
  br i1 %.not116, label %._crit_edge118, label %.preheader111.lr.ph

.preheader111.lr.ph:                              ; preds = %4
  %22 = getelementptr inbounds i8, ptr %0, i64 40
  %23 = load double, ptr %22, align 8, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  %25 = load double, ptr %24, align 8, !tbaa !23
  %.not99112 = icmp eq i64 %6, 0
  %26 = fdiv double 1.000000e+00, %25
  %27 = fdiv double 1.000000e+00, %23
  br i1 %.not99112, label %._crit_edge118, label %.preheader111.preheader

.preheader111.preheader:                          ; preds = %.preheader111.lr.ph
  %28 = add i64 %6, 1
  %umax = tail call i64 @llvm.umax.i64(i64 %28, i64 2)
  %29 = add i64 %8, 1
  %umax130 = tail call i64 @llvm.umax.i64(i64 %29, i64 2)
  %30 = add i64 %umax130, 2305843009213693950
  %31 = mul i64 %6, %30
  %32 = shl i64 %umax, 3
  %33 = add i64 %31, %umax
  %34 = shl i64 %33, 3
  %35 = getelementptr i8, ptr %11, i64 %34
  %scevgep = getelementptr i8, ptr %35, i64 -8
  %36 = add i64 %umax, -1
  %min.iters.check = icmp ult i64 %28, 7
  %.mask = and i64 %6, 1152921504606846976
  %stride.check146 = icmp ne i64 %.mask, 0
  %n.vec = and i64 %36, -4
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <2 x double> poison, double %27, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert159 = insertelement <2 x double> poison, double %26, i64 0
  %broadcast.splat160 = shufflevector <2 x double> %broadcast.splatinsert159, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert161 = insertelement <2 x double> poison, double %21, i64 0
  %broadcast.splat162 = shufflevector <2 x double> %broadcast.splatinsert161, <2 x double> poison, <2 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %36, %n.vec
  %37 = and i64 %umax, 1
  %lcmp.mod.not.not = icmp eq i64 %37, 0
  br label %.preheader111

.preheader111:                                    ; preds = %.preheader111.preheader, %._crit_edge
  %.085117 = phi i64 [ %88, %._crit_edge ], [ 1, %.preheader111.preheader ]
  %38 = getelementptr inbounds ptr, ptr %15, i64 %.085117
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %40 = getelementptr inbounds ptr, ptr %17, i64 %.085117
  %41 = load ptr, ptr %40, align 8, !tbaa !24
  %42 = getelementptr i8, ptr %40, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !24
  %44 = add i64 %.085117, -1
  %45 = mul i64 %44, %6
  %gep115 = getelementptr double, ptr %invariant.gep114, i64 %45
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader111
  %.087113.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %.preheader111 ], [ %ind.end, %middle.block ]
  %.neg = add i64 %.087113.ph, 1
  br i1 %lcmp.mod.not.not, label %scalar.ph.prol, label %scalar.ph.prol.loopexit

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %46 = getelementptr inbounds double, ptr %39, i64 %.087113.ph
  %47 = load double, ptr %46, align 8, !tbaa !25
  %48 = add nuw i64 %.087113.ph, 1
  %49 = getelementptr inbounds double, ptr %39, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !25
  %51 = fsub double %50, %47
  %52 = getelementptr inbounds double, ptr %41, i64 %.087113.ph
  %53 = load double, ptr %52, align 8, !tbaa !25
  %54 = getelementptr inbounds double, ptr %43, i64 %.087113.ph
  %55 = load double, ptr %54, align 8, !tbaa !25
  %56 = fsub double %55, %53
  %57 = fmul double %27, %56
  %58 = tail call double @llvm.fmuladd.f64(double %26, double %51, double %57)
  %59 = fmul double %21, %58
  %gep.prol = getelementptr double, ptr %gep115, i64 %.087113.ph
  store double %59, ptr %gep.prol, align 8, !tbaa !25
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.087113.unr = phi i64 [ %.087113.ph, %scalar.ph.preheader ], [ %48, %scalar.ph.prol ]
  %60 = icmp eq i64 %umax, %.neg
  br i1 %60, label %._crit_edge, label %scalar.ph

vector.memcheck:                                  ; preds = %.preheader111
  %scevgep137 = getelementptr i8, ptr %39, i64 8
  %61 = getelementptr i8, ptr %39, i64 %32
  %scevgep138 = getelementptr i8, ptr %61, i64 8
  %scevgep139 = getelementptr i8, ptr %41, i64 8
  %scevgep140 = getelementptr i8, ptr %41, i64 %32
  %scevgep141 = getelementptr i8, ptr %43, i64 8
  %scevgep142 = getelementptr i8, ptr %43, i64 %32
  %bound0 = icmp ult ptr %11, %scevgep138
  %bound1 = icmp ult ptr %scevgep137, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound0143 = icmp ult ptr %11, %scevgep140
  %bound1144 = icmp ult ptr %scevgep139, %scevgep
  %found.conflict145 = and i1 %bound0143, %bound1144
  %62 = or i1 %found.conflict145, %stride.check146
  %conflict.rdx = or i1 %found.conflict, %62
  %bound0147 = icmp ult ptr %11, %scevgep142
  %bound1148 = icmp ult ptr %scevgep141, %scevgep
  %found.conflict149 = and i1 %bound0147, %bound1148
  %conflict.rdx151 = or i1 %found.conflict149, %conflict.rdx
  br i1 %conflict.rdx151, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %offset.idx = or disjoint i64 %index, 1
  %63 = getelementptr inbounds double, ptr %39, i64 %offset.idx
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %wide.load = load <2 x double>, ptr %63, align 8, !tbaa !25, !alias.scope !26
  %wide.load152 = load <2 x double>, ptr %64, align 8, !tbaa !25, !alias.scope !26
  %65 = or disjoint i64 %index, 2
  %66 = getelementptr inbounds double, ptr %39, i64 %65
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %wide.load153 = load <2 x double>, ptr %66, align 8, !tbaa !25, !alias.scope !26
  %wide.load154 = load <2 x double>, ptr %67, align 8, !tbaa !25, !alias.scope !26
  %68 = fsub <2 x double> %wide.load153, %wide.load
  %69 = fsub <2 x double> %wide.load154, %wide.load152
  %70 = getelementptr inbounds double, ptr %41, i64 %offset.idx
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %wide.load155 = load <2 x double>, ptr %70, align 8, !tbaa !25, !alias.scope !29
  %wide.load156 = load <2 x double>, ptr %71, align 8, !tbaa !25, !alias.scope !29
  %72 = getelementptr inbounds double, ptr %43, i64 %offset.idx
  %73 = getelementptr inbounds i8, ptr %72, i64 16
  %wide.load157 = load <2 x double>, ptr %72, align 8, !tbaa !25, !alias.scope !31
  %wide.load158 = load <2 x double>, ptr %73, align 8, !tbaa !25, !alias.scope !31
  %74 = fsub <2 x double> %wide.load157, %wide.load155
  %75 = fsub <2 x double> %wide.load158, %wide.load156
  %76 = fmul <2 x double> %broadcast.splat, %74
  %77 = fmul <2 x double> %broadcast.splat, %75
  %78 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat160, <2 x double> %68, <2 x double> %76)
  %79 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat160, <2 x double> %69, <2 x double> %77)
  %80 = fmul <2 x double> %broadcast.splat162, %78
  %81 = fmul <2 x double> %broadcast.splat162, %79
  %82 = getelementptr double, ptr %gep115, i64 %offset.idx
  %83 = getelementptr i8, ptr %82, i64 16
  store <2 x double> %80, ptr %82, align 8, !tbaa !25, !alias.scope !33, !noalias !35
  store <2 x double> %81, ptr %83, align 8, !tbaa !25, !alias.scope !33, !noalias !35
  %index.next = add nuw i64 %index, 4
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !36

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge118:                                   ; preds = %._crit_edge, %.preheader111.lr.ph, %4
  %85 = getelementptr inbounds i8, ptr %2, i64 40
  %86 = load ptr, ptr %85, align 8, !tbaa !40
  %87 = tail call i32 @rdft_exec_f(ptr noundef %86, ptr noundef %11) #5
  %.not91 = icmp eq i32 %87, 0
  br i1 %.not91, label %120, label %117

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %88 = add nuw i64 %.085117, 1
  %exitcond131 = icmp eq i64 %88, %umax130
  br i1 %exitcond131, label %._crit_edge118, label %.preheader111, !llvm.loop !41

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.087113 = phi i64 [ %105, %scalar.ph ], [ %.087113.unr, %scalar.ph.prol.loopexit ]
  %89 = getelementptr inbounds double, ptr %39, i64 %.087113
  %90 = load double, ptr %89, align 8, !tbaa !25
  %91 = add nuw i64 %.087113, 1
  %92 = getelementptr inbounds double, ptr %39, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !25
  %94 = fsub double %93, %90
  %95 = getelementptr inbounds double, ptr %41, i64 %.087113
  %96 = load double, ptr %95, align 8, !tbaa !25
  %97 = getelementptr inbounds double, ptr %43, i64 %.087113
  %98 = load double, ptr %97, align 8, !tbaa !25
  %99 = fsub double %98, %96
  %100 = fmul double %27, %99
  %101 = tail call double @llvm.fmuladd.f64(double %26, double %94, double %100)
  %102 = fmul double %21, %101
  %gep = getelementptr double, ptr %gep115, i64 %.087113
  store double %102, ptr %gep, align 8, !tbaa !25
  %103 = getelementptr inbounds double, ptr %39, i64 %91
  %104 = load double, ptr %103, align 8, !tbaa !25
  %105 = add nuw i64 %.087113, 2
  %106 = getelementptr inbounds double, ptr %39, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !25
  %108 = fsub double %107, %104
  %109 = getelementptr inbounds double, ptr %41, i64 %91
  %110 = load double, ptr %109, align 8, !tbaa !25
  %111 = getelementptr inbounds double, ptr %43, i64 %91
  %112 = load double, ptr %111, align 8, !tbaa !25
  %113 = fsub double %112, %110
  %114 = fmul double %27, %113
  %115 = tail call double @llvm.fmuladd.f64(double %26, double %108, double %114)
  %116 = fmul double %21, %115
  %gep.1 = getelementptr double, ptr %gep115, i64 %91
  store double %116, ptr %gep.1, align 8, !tbaa !25
  %exitcond.1 = icmp eq i64 %28, %105
  br i1 %exitcond.1, label %._crit_edge, label %scalar.ph, !llvm.loop !42

117:                                              ; preds = %._crit_edge118
  %118 = load ptr, ptr @stderr, align 8, !tbaa !24
  %119 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 47, ptr noundef nonnull @.str.2) #6
  br label %190

120:                                              ; preds = %._crit_edge118
  %121 = tail call i32 @transpose(i64 noundef %6, i64 noundef %8, ptr noundef %11, ptr noundef %14) #5
  %.not92 = icmp eq i32 %121, 0
  br i1 %.not92, label %125, label %122

122:                                              ; preds = %120
  %123 = load ptr, ptr @stderr, align 8, !tbaa !24
  %124 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 59, ptr noundef nonnull @.str.3) #6
  br label %190

125:                                              ; preds = %120
  %126 = getelementptr inbounds i8, ptr %2, i64 72
  %127 = load ptr, ptr %126, align 8, !tbaa !43
  %128 = getelementptr inbounds i8, ptr %2, i64 80
  %129 = load ptr, ptr %128, align 8, !tbaa !44
  %130 = getelementptr inbounds i8, ptr %2, i64 88
  %131 = load ptr, ptr %130, align 8, !tbaa !45
  %132 = getelementptr inbounds i8, ptr %2, i64 96
  %133 = load ptr, ptr %132, align 8, !tbaa !46
  %134 = getelementptr inbounds i8, ptr %2, i64 64
  %135 = load ptr, ptr %134, align 8, !tbaa !47
  %136 = tail call i32 @tridiagonal_solver_exec(ptr noundef %127, ptr noundef %129, ptr noundef %131, ptr noundef %133, ptr noundef %135, ptr noundef %14) #5
  %.not93 = icmp eq i32 %136, 0
  br i1 %.not93, label %140, label %137

137:                                              ; preds = %125
  %138 = load ptr, ptr @stderr, align 8, !tbaa !24
  %139 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 70, ptr noundef nonnull @.str.4) #6
  br label %190

140:                                              ; preds = %125
  %141 = tail call i32 @transpose(i64 noundef %8, i64 noundef %6, ptr noundef %14, ptr noundef %11) #5
  %.not94 = icmp eq i32 %141, 0
  br i1 %.not94, label %145, label %142

142:                                              ; preds = %140
  %143 = load ptr, ptr @stderr, align 8, !tbaa !24
  %144 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 76, ptr noundef nonnull @.str.5) #6
  br label %190

145:                                              ; preds = %140
  %146 = load ptr, ptr %85, align 8, !tbaa !40
  %147 = tail call i32 @rdft_exec_b(ptr noundef %146, ptr noundef %11) #5
  %.not95 = icmp eq i32 %147, 0
  br i1 %.not95, label %.preheader110, label %.thread107

.preheader110:                                    ; preds = %145
  %.not98119 = icmp eq i64 %6, 0
  %or.cond = select i1 %.not116, i1 true, i1 %.not98119
  br i1 %or.cond, label %._crit_edge127, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader110
  %148 = add i64 %6, 1
  %umax133 = tail call i64 @llvm.umax.i64(i64 %148, i64 2)
  %149 = add i64 %8, 1
  %umax135 = tail call i64 @llvm.umax.i64(i64 %149, i64 2)
  %150 = mul i64 %6, -8
  %151 = add i64 %umax133, -1
  %min.iters.check166 = icmp ult i64 %148, 5
  %n.vec169 = and i64 %151, -4
  %ind.end170 = or disjoint i64 %n.vec169, 1
  %cmp.n178 = icmp eq i64 %151, %n.vec169
  br label %.preheader

.thread107:                                       ; preds = %145
  %152 = load ptr, ptr @stderr, align 8, !tbaa !24
  %153 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 83, ptr noundef nonnull @.str.6) #6
  br label %190

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge121
  %indvar = phi i64 [ 0, %.preheader.preheader ], [ %indvar.next, %._crit_edge121 ]
  %.083126 = phi i64 [ 1, %.preheader.preheader ], [ %174, %._crit_edge121 ]
  %154 = add i64 %.083126, -1
  %155 = mul i64 %154, %6
  %gep124 = getelementptr double, ptr %invariant.gep114, i64 %155
  %156 = getelementptr inbounds ptr, ptr %10, i64 %.083126
  %157 = load ptr, ptr %156, align 8, !tbaa !24
  br i1 %min.iters.check166, label %scalar.ph165.preheader, label %vector.memcheck163

scalar.ph165.preheader:                           ; preds = %middle.block164, %vector.memcheck163, %.preheader
  %.0120.ph = phi i64 [ 1, %vector.memcheck163 ], [ 1, %.preheader ], [ %ind.end170, %middle.block164 ]
  %158 = sub i64 %umax133, %.0120.ph
  %xtraiter179 = and i64 %158, 3
  %lcmp.mod180.not = icmp eq i64 %xtraiter179, 0
  br i1 %lcmp.mod180.not, label %scalar.ph165.prol.loopexit, label %scalar.ph165.prol

scalar.ph165.prol:                                ; preds = %scalar.ph165.preheader, %scalar.ph165.prol
  %.0120.prol = phi i64 [ %161, %scalar.ph165.prol ], [ %.0120.ph, %scalar.ph165.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph165.prol ], [ 0, %scalar.ph165.preheader ]
  %gep122.prol = getelementptr double, ptr %gep124, i64 %.0120.prol
  %159 = load double, ptr %gep122.prol, align 8, !tbaa !25
  %160 = getelementptr inbounds double, ptr %157, i64 %.0120.prol
  store double %159, ptr %160, align 8, !tbaa !25
  %161 = add nuw i64 %.0120.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter179
  br i1 %prol.iter.cmp.not, label %scalar.ph165.prol.loopexit, label %scalar.ph165.prol, !llvm.loop !48

scalar.ph165.prol.loopexit:                       ; preds = %scalar.ph165.prol, %scalar.ph165.preheader
  %.0120.unr = phi i64 [ %.0120.ph, %scalar.ph165.preheader ], [ %161, %scalar.ph165.prol ]
  %162 = sub i64 %.0120.ph, %umax133
  %163 = icmp ugt i64 %162, -4
  br i1 %163, label %._crit_edge121, label %scalar.ph165

vector.memcheck163:                               ; preds = %.preheader
  %164 = ptrtoint ptr %157 to i64
  %165 = mul i64 %150, %indvar
  %reass.sub = sub i64 %165, %12
  %166 = add i64 %reass.sub, 8
  %167 = add i64 %166, %164
  %diff.check = icmp ult i64 %167, 32
  br i1 %diff.check, label %scalar.ph165.preheader, label %vector.body172

vector.body172:                                   ; preds = %vector.memcheck163, %vector.body172
  %index173 = phi i64 [ %index.next177, %vector.body172 ], [ 0, %vector.memcheck163 ]
  %offset.idx174 = or disjoint i64 %index173, 1
  %168 = getelementptr double, ptr %gep124, i64 %offset.idx174
  %169 = getelementptr i8, ptr %168, i64 16
  %wide.load175 = load <2 x double>, ptr %168, align 8, !tbaa !25
  %wide.load176 = load <2 x double>, ptr %169, align 8, !tbaa !25
  %170 = getelementptr inbounds double, ptr %157, i64 %offset.idx174
  %171 = getelementptr inbounds i8, ptr %170, i64 16
  store <2 x double> %wide.load175, ptr %170, align 8, !tbaa !25
  store <2 x double> %wide.load176, ptr %171, align 8, !tbaa !25
  %index.next177 = add nuw i64 %index173, 4
  %172 = icmp eq i64 %index.next177, %n.vec169
  br i1 %172, label %middle.block164, label %vector.body172, !llvm.loop !50

middle.block164:                                  ; preds = %vector.body172
  br i1 %cmp.n178, label %._crit_edge121, label %scalar.ph165.preheader

._crit_edge127:                                   ; preds = %._crit_edge121, %.preheader110
  %173 = tail call i32 @exchange_halo_x(ptr noundef %0, ptr noundef %10) #5
  %.not97 = icmp eq i32 %173, 0
  br i1 %.not97, label %190, label %187

._crit_edge121:                                   ; preds = %scalar.ph165.prol.loopexit, %scalar.ph165, %middle.block164
  %174 = add nuw i64 %.083126, 1
  %exitcond136 = icmp eq i64 %174, %umax135
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond136, label %._crit_edge127, label %.preheader, !llvm.loop !51

scalar.ph165:                                     ; preds = %scalar.ph165.prol.loopexit, %scalar.ph165
  %.0120 = phi i64 [ %186, %scalar.ph165 ], [ %.0120.unr, %scalar.ph165.prol.loopexit ]
  %gep122 = getelementptr double, ptr %gep124, i64 %.0120
  %175 = load double, ptr %gep122, align 8, !tbaa !25
  %176 = getelementptr inbounds double, ptr %157, i64 %.0120
  store double %175, ptr %176, align 8, !tbaa !25
  %177 = add nuw i64 %.0120, 1
  %gep122.1 = getelementptr double, ptr %gep124, i64 %177
  %178 = load double, ptr %gep122.1, align 8, !tbaa !25
  %179 = getelementptr inbounds double, ptr %157, i64 %177
  store double %178, ptr %179, align 8, !tbaa !25
  %180 = add nuw i64 %.0120, 2
  %gep122.2 = getelementptr double, ptr %gep124, i64 %180
  %181 = load double, ptr %gep122.2, align 8, !tbaa !25
  %182 = getelementptr inbounds double, ptr %157, i64 %180
  store double %181, ptr %182, align 8, !tbaa !25
  %183 = add nuw i64 %.0120, 3
  %gep122.3 = getelementptr double, ptr %gep124, i64 %183
  %184 = load double, ptr %gep122.3, align 8, !tbaa !25
  %185 = getelementptr inbounds double, ptr %157, i64 %183
  store double %184, ptr %185, align 8, !tbaa !25
  %186 = add nuw i64 %.0120, 4
  %exitcond134.3 = icmp eq i64 %148, %186
  br i1 %exitcond134.3, label %._crit_edge121, label %scalar.ph165, !llvm.loop !52

187:                                              ; preds = %._crit_edge127
  %188 = load ptr, ptr @stderr, align 8, !tbaa !24
  %189 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 104, ptr noundef nonnull @.str.7) #6
  br label %190

190:                                              ; preds = %.thread107, %137, %117, %122, %142, %187, %._crit_edge127
  %.084 = phi i32 [ 0, %._crit_edge127 ], [ 1, %187 ], [ 1, %142 ], [ 1, %137 ], [ 1, %122 ], [ 1, %117 ], [ 1, %.thread107 ]
  ret i32 %.084
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

declare i32 @rdft_exec_f(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @transpose(i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @tridiagonal_solver_exec(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @rdft_exec_b(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @exchange_halo_x(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { cold 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, !10, i64 16}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 40}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !10, i64 24}
!12 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !15, i64 24}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !7, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72}
!16 = !{!15, !14, i64 0}
!17 = !{!15, !14, i64 8}
!18 = !{!19, !14, i64 0}
!19 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!20 = !{!19, !14, i64 8}
!21 = !{!15, !7, i64 32}
!22 = !{!6, !7, i64 40}
!23 = !{!6, !7, i64 32}
!24 = !{!14, !14, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!27}
!27 = distinct !{!27, !28}
!28 = distinct !{!28, !"LVerDomain"}
!29 = !{!30}
!30 = distinct !{!30, !28}
!31 = !{!32}
!32 = distinct !{!32, !28}
!33 = !{!34}
!34 = distinct !{!34, !28}
!35 = !{!27, !30, !32}
!36 = distinct !{!36, !37, !38, !39}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!"llvm.loop.isvectorized", i32 1}
!39 = !{!"llvm.loop.unroll.runtime.disable"}
!40 = !{!15, !14, i64 16}
!41 = distinct !{!41, !37}
!42 = distinct !{!42, !37, !38}
!43 = !{!15, !14, i64 48}
!44 = !{!15, !14, i64 56}
!45 = !{!15, !14, i64 64}
!46 = !{!15, !14, i64 72}
!47 = !{!15, !14, i64 40}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.unroll.disable"}
!50 = distinct !{!50, !37, !38, !39}
!51 = distinct !{!51, !37}
!52 = distinct !{!52, !37, !38}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass