; LLVM IR from siconos/siconos :: externals/lbl/metis4/mcoarsen.ll_ (MCCoarsen2Way)

; 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.controldef = type { i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i32, i32, ptr, ptr, i32, ptr, ptr }
%struct.graphdef = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @__MCCoarsen2Way(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.controldef, ptr %8, i32 0, i32 1
  %10 = load i32, ptr %9, align 4, !tbaa !9
  %11 = and i32 %10, 1
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %19

13:                                               ; preds = %2
  %14 = call double @__seconds()
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.controldef, ptr %15, i32 0, i32 16
  %17 = load double, ptr %16, align 8, !tbaa !15
  %18 = fsub double %17, %14
  store double %18, ptr %16, align 8, !tbaa !15
  br label %19

19:                                               ; preds = %13, %2
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %20, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %21

21:                                               ; preds = %228, %19
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = and i32 %24, 4
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %76

27:                                               ; preds = %21
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.graphdef, ptr %28, i32 0, i32 2
  %30 = load i32, ptr %29, align 8, !tbaa !17
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.graphdef, ptr %31, i32 0, i32 3
  %33 = load i32, ptr %32, align 4, !tbaa !19
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.graphdef, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.graphdef, ptr %37, i32 0, i32 9
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = call i32 @__idxsum(i32 noundef %36, ptr noundef %39)
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.controldef, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !21
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.controldef, ptr %44, i32 0, i32 6
  %46 = load float, ptr %45, align 8, !tbaa !22
  %47 = fpext float %46 to double
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %30, i32 noundef %33, i32 noundef %40, i32 noundef %43, double noundef %47)
  store i32 0, ptr %5, align 4, !tbaa !16
  br label %49

49:                                               ; preds = %71, %27
  %50 = load i32, ptr %5, align 4, !tbaa !16
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.graphdef, ptr %51, i32 0, i32 24
  %53 = load i32, ptr %52, align 8, !tbaa !23
  %54 = icmp slt i32 %50, %53
  br i1 %54, label %55, label %74

55:                                               ; preds = %49
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.graphdef, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !17
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graphdef, ptr %59, i32 0, i32 25
  %61 = load ptr, ptr %60, align 8, !tbaa !24
  %62 = load i32, ptr %5, align 4, !tbaa !16
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds float, ptr %61, i64 %63
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.graphdef, ptr %65, i32 0, i32 24
  %67 = load i32, ptr %66, align 8, !tbaa !23
  %68 = call float @__ssum_strd(i32 noundef %58, ptr noundef %64, i32 noundef %67)
  %69 = fpext float %68 to double
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %69)
  br label %71

71:                                               ; preds = %55
  %72 = load i32, ptr %5, align 4, !tbaa !16
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %5, align 4, !tbaa !16
  br label %49, !llvm.loop !25

74:                                               ; preds = %49
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %76

76:                                               ; preds = %74, %21
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.controldef, ptr %77, i32 0, i32 2
  %79 = load i32, ptr %78, align 8, !tbaa !27
  switch i32 %79, label %188 [
    i32 1, label %80
    i32 2, label %83
    i32 3, label %98
    i32 4, label %113
    i32 5, label %128
    i32 6, label %143
    i32 7, label %158
    i32 8, label %173
  ]

80:                                               ; preds = %76
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %81, ptr noundef %82)
  br label %192

83:                                               ; preds = %76
  %84 = load i32, ptr %6, align 4, !tbaa !16
  %85 = icmp slt i32 %84, 1
  br i1 %85, label %91, label %86

86:                                               ; preds = %83
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.graphdef, ptr %87, i32 0, i32 3
  %89 = load i32, ptr %88, align 4, !tbaa !19
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %86, %83
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %92, ptr noundef %93)
  br label %97

94:                                               ; preds = %86
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_HEM(ptr noundef %95, ptr noundef %96)
  br label %97

97:                                               ; preds = %94, %91
  br label %192

98:                                               ; preds = %76
  %99 = load i32, ptr %6, align 4, !tbaa !16
  %100 = icmp slt i32 %99, 1
  br i1 %100, label %106, label %101

101:                                              ; preds = %98
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.graphdef, ptr %102, i32 0, i32 3
  %104 = load i32, ptr %103, align 4, !tbaa !19
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %109

106:                                              ; preds = %101, %98
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %107, ptr noundef %108)
  br label %112

109:                                              ; preds = %101
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_SHEM(ptr noundef %110, ptr noundef %111)
  br label %112

112:                                              ; preds = %109, %106
  br label %192

113:                                              ; preds = %76
  %114 = load i32, ptr %6, align 4, !tbaa !16
  %115 = icmp slt i32 %114, 1
  br i1 %115, label %121, label %116

116:                                              ; preds = %113
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.graphdef, ptr %117, i32 0, i32 3
  %119 = load i32, ptr %118, align 4, !tbaa !19
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %116, %113
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %122, ptr noundef %123)
  br label %127

124:                                              ; preds = %116
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_SHEM(ptr noundef %125, ptr noundef %126)
  br label %127

127:                                              ; preds = %124, %121
  br label %192

128:                                              ; preds = %76
  %129 = load i32, ptr %6, align 4, !tbaa !16
  %130 = icmp slt i32 %129, 1
  br i1 %130, label %136, label %131

131:                                              ; preds = %128
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.graphdef, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !19
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %131, %128
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %137, ptr noundef %138)
  br label %142

139:                                              ; preds = %131
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_SHEBM(ptr noundef %140, ptr noundef %141, i32 noundef 1)
  br label %142

142:                                              ; preds = %139, %136
  br label %192

143:                                              ; preds = %76
  %144 = load i32, ptr %6, align 4, !tbaa !16
  %145 = icmp slt i32 %144, 1
  br i1 %145, label %151, label %146

146:                                              ; preds = %143
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.graphdef, ptr %147, i32 0, i32 3
  %149 = load i32, ptr %148, align 4, !tbaa !19
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %154

151:                                              ; preds = %146, %143
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %152, ptr noundef %153)
  br label %157

154:                                              ; preds = %146
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_SHEBM(ptr noundef %155, ptr noundef %156, i32 noundef -1)
  br label %157

157:                                              ; preds = %154, %151
  br label %192

158:                                              ; preds = %76
  %159 = load i32, ptr %6, align 4, !tbaa !16
  %160 = icmp slt i32 %159, 1
  br i1 %160, label %166, label %161

161:                                              ; preds = %158
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.graphdef, ptr %162, i32 0, i32 3
  %164 = load i32, ptr %163, align 4, !tbaa !19
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %169

166:                                              ; preds = %161, %158
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %167, ptr noundef %168)
  br label %172

169:                                              ; preds = %161
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_SBHEM(ptr noundef %170, ptr noundef %171, i32 noundef 1)
  br label %172

172:                                              ; preds = %169, %166
  br label %192

173:                                              ; preds = %76
  %174 = load i32, ptr %6, align 4, !tbaa !16
  %175 = icmp slt i32 %174, 1
  br i1 %175, label %181, label %176

176:                                              ; preds = %173
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.graphdef, ptr %177, i32 0, i32 3
  %179 = load i32, ptr %178, align 4, !tbaa !19
  %180 = icmp eq i32 %179, 0
  br i1 %180, label %181, label %184

181:                                              ; preds = %176, %173
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_RM(ptr noundef %182, ptr noundef %183)
  br label %187

184:                                              ; preds = %176
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  call void @__MCMatch_SBHEM(ptr noundef %185, ptr noundef %186, i32 noundef -1)
  br label %187

187:                                              ; preds = %184, %181
  br label %192

188:                                              ; preds = %76
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.controldef, ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 8, !tbaa !27
  call void (ptr, ...) @__errexit(ptr noundef @.str.3, i32 noundef %191)
  br label %192

192:                                              ; preds = %188, %187, %172, %157, %142, %127, %112, %97, %80
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.graphdef, ptr %193, i32 0, i32 27
  %195 = load ptr, ptr %194, align 8, !tbaa !28
  store ptr %195, ptr %7, align 8, !tbaa !5
  %196 = load i32, ptr %6, align 4, !tbaa !16
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %6, align 4, !tbaa !16
  br label %198

198:                                              ; preds = %192
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.graphdef, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 8, !tbaa !17
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.controldef, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 8, !tbaa !21
  %205 = icmp sgt i32 %201, %204
  br i1 %205, label %206, label %228

206:                                              ; preds = %198
  %207 = load ptr, ptr %7, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.graphdef, ptr %207, i32 0, i32 2
  %209 = load i32, ptr %208, align 8, !tbaa !17
  %210 = sitofp i32 %209 to double
  %211 = load ptr, ptr %7, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.graphdef, ptr %211, i32 0, i32 28
  %213 = load ptr, ptr %212, align 8, !tbaa !29
  %214 = getelementptr inbounds %struct.graphdef, ptr %213, i32 0, i32 2
  %215 = load i32, ptr %214, align 8, !tbaa !17
  %216 = sitofp i32 %215 to double
  %217 = fmul double 9.000000e-01, %216
  %218 = fcmp olt double %210, %217
  br i1 %218, label %219, label %228

219:                                              ; preds = %206
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.graphdef, ptr %220, i32 0, i32 3
  %222 = load i32, ptr %221, align 4, !tbaa !19
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.graphdef, ptr %223, i32 0, i32 2
  %225 = load i32, ptr %224, align 8, !tbaa !17
  %226 = sdiv i32 %225, 2
  %227 = icmp sgt i32 %222, %226
  br label %228

228:                                              ; preds = %219, %206, %198
  %229 = phi i1 [ false, %206 ], [ false, %198 ], [ %227, %219 ]
  br i1 %229, label %21, label %230, !llvm.loop !30

230:                                              ; preds = %228
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.controldef, ptr %231, i32 0, i32 1
  %233 = load i32, ptr %232, align 4, !tbaa !9
  %234 = and i32 %233, 4
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %236, label %285

236:                                              ; preds = %230
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.graphdef, ptr %237, i32 0, i32 2
  %239 = load i32, ptr %238, align 8, !tbaa !17
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.graphdef, ptr %240, i32 0, i32 3
  %242 = load i32, ptr %241, align 4, !tbaa !19
  %243 = load ptr, ptr %7, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.graphdef, ptr %243, i32 0, i32 2
  %245 = load i32, ptr %244, align 8, !tbaa !17
  %246 = load ptr, ptr %7, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.graphdef, ptr %246, i32 0, i32 9
  %248 = load ptr, ptr %247, align 8, !tbaa !20
  %249 = call i32 @__idxsum(i32 noundef %245, ptr noundef %248)
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.controldef, ptr %250, i32 0, i32 0
  %252 = load i32, ptr %251, align 8, !tbaa !21
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.controldef, ptr %253, i32 0, i32 6
  %255 = load float, ptr %254, align 8, !tbaa !22
  %256 = fpext float %255 to double
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %239, i32 noundef %242, i32 noundef %249, i32 noundef %252, double noundef %256)
  store i32 0, ptr %5, align 4, !tbaa !16
  br label %258

258:                                              ; preds = %280, %236
  %259 = load i32, ptr %5, align 4, !tbaa !16
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.graphdef, ptr %260, i32 0, i32 24
  %262 = load i32, ptr %261, align 8, !tbaa !23
  %263 = icmp slt i32 %259, %262
  br i1 %263, label %264, label %283

264:                                              ; preds = %258
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.graphdef, ptr %265, i32 0, i32 2
  %267 = load i32, ptr %266, align 8, !tbaa !17
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.graphdef, ptr %268, i32 0, i32 25
  %270 = load ptr, ptr %269, align 8, !tbaa !24
  %271 = load i32, ptr %5, align 4, !tbaa !16
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds float, ptr %270, i64 %272
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.graphdef, ptr %274, i32 0, i32 24
  %276 = load i32, ptr %275, align 8, !tbaa !23
  %277 = call float @__ssum_strd(i32 noundef %267, ptr noundef %273, i32 noundef %276)
  %278 = fpext float %277 to double
  %279 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %278)
  br label %280

280:                                              ; preds = %264
  %281 = load i32, ptr %5, align 4, !tbaa !16
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %5, align 4, !tbaa !16
  br label %258, !llvm.loop !31

283:                                              ; preds = %258
  %284 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %285

285:                                              ; preds = %283, %230
  %286 = load ptr, ptr %3, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.controldef, ptr %286, i32 0, i32 1
  %288 = load i32, ptr %287, align 4, !tbaa !9
  %289 = and i32 %288, 1
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %291, label %297

291:                                              ; preds = %285
  %292 = call double @__seconds()
  %293 = load ptr, ptr %3, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.controldef, ptr %293, i32 0, i32 16
  %295 = load double, ptr %294, align 8, !tbaa !15
  %296 = fadd double %295, %292
  store double %296, ptr %294, align 8, !tbaa !15
  br label %297

297:                                              ; preds = %291, %285
  %298 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret ptr %298
}

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

declare double @__seconds() #2

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

declare i32 @__idxsum(i32 noundef, ptr noundef) #2

declare float @__ssum_strd(i32 noundef, ptr noundef, i32 noundef) #2

declare void @__MCMatch_RM(ptr noundef, ptr noundef) #2

declare void @__MCMatch_HEM(ptr noundef, ptr noundef) #2

declare void @__MCMatch_SHEM(ptr noundef, ptr noundef) #2

declare void @__MCMatch_SHEBM(ptr noundef, ptr noundef, i32 noundef) #2

declare void @__MCMatch_SBHEM(ptr noundef, ptr noundef, i32 noundef) #2

declare void @__errexit(ptr noundef, ...) #2

; 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"controldef", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !13, i64 48, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"workspacedef", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !6, i64 48}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !14, i64 136}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !11, i64 16}
!18 = !{!"graphdef", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !6, i64 96, !6, i64 104, !11, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !11, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!19 = !{!18, !11, i64 20}
!20 = !{!18, !6, i64 64}
!21 = !{!10, !11, i64 0}
!22 = !{!10, !12, i64 24}
!23 = !{!18, !11, i64 176}
!24 = !{!18, !6, i64 184}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !11, i64 8}
!28 = !{!18, !6, i64 200}
!29 = !{!18, !6, i64 208}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}


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

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @__MCCoarsen2Way(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = and i32 %4, 1
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %2
  %7 = tail call double @__seconds() #3
  %8 = getelementptr inbounds i8, ptr %0, i64 136
  %9 = load double, ptr %8, align 8, !tbaa !14
  %10 = fsub double %9, %7
  store double %10, ptr %8, align 8, !tbaa !14
  br label %11

11:                                               ; preds = %6, %2
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %1, i64 176
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  br label %15

15:                                               ; preds = %123, %11
  %.087 = phi i32 [ 0, %11 ], [ %109, %123 ]
  %.0 = phi ptr [ %1, %11 ], [ %108, %123 ]
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = and i32 %16, 4
  %.not90 = icmp eq i32 %17, 0
  br i1 %.not90, label %46, label %18

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %.0, i64 16
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %.0, i64 20
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %.0, i64 64
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = tail call i32 @__idxsum(i32 noundef %20, ptr noundef %24) #3
  %26 = load i32, ptr %0, align 8, !tbaa !19
  %27 = load float, ptr %12, align 8, !tbaa !20
  %28 = fpext float %27 to double
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20, i32 noundef %22, i32 noundef %25, i32 noundef %26, double noundef %28)
  %30 = load i32, ptr %13, align 8, !tbaa !21
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %18
  %32 = getelementptr inbounds i8, ptr %.0, i64 184
  %33 = getelementptr inbounds i8, ptr %.0, i64 176
  br label %34

34:                                               ; preds = %.lr.ph, %34
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %34 ]
  %35 = load i32, ptr %19, align 8, !tbaa !15
  %36 = load ptr, ptr %32, align 8, !tbaa !22
  %37 = getelementptr inbounds float, ptr %36, i64 %indvars.iv
  %38 = load i32, ptr %33, align 8, !tbaa !21
  %39 = tail call float @__ssum_strd(i32 noundef %35, ptr noundef %37, i32 noundef %38) #3
  %40 = fpext float %39 to double
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %40)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load i32, ptr %13, align 8, !tbaa !21
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next, %43
  br i1 %44, label %34, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %34, %18
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %46

46:                                               ; preds = %._crit_edge, %15
  %47 = load i32, ptr %14, align 8, !tbaa !25
  switch i32 %47, label %105 [
    i32 1, label %48
    i32 2, label %49
    i32 3, label %57
    i32 4, label %65
    i32 5, label %73
    i32 6, label %81
    i32 7, label %89
    i32 8, label %97
  ]

48:                                               ; preds = %46
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

49:                                               ; preds = %46
  %50 = icmp eq i32 %.087, 0
  br i1 %50, label %55, label %51

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %.0, i64 20
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %51, %49
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

56:                                               ; preds = %51
  tail call void @__MCMatch_HEM(ptr noundef nonnull %0, ptr noundef nonnull %.0) #3
  br label %106

57:                                               ; preds = %46
  %58 = icmp eq i32 %.087, 0
  br i1 %58, label %63, label %59

59:                                               ; preds = %57
  %60 = getelementptr inbounds i8, ptr %.0, i64 20
  %61 = load i32, ptr %60, align 4, !tbaa !17
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %59, %57
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

64:                                               ; preds = %59
  tail call void @__MCMatch_SHEM(ptr noundef nonnull %0, ptr noundef nonnull %.0) #3
  br label %106

65:                                               ; preds = %46
  %66 = icmp eq i32 %.087, 0
  br i1 %66, label %71, label %67

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %.0, i64 20
  %69 = load i32, ptr %68, align 4, !tbaa !17
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %67, %65
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

72:                                               ; preds = %67
  tail call void @__MCMatch_SHEM(ptr noundef nonnull %0, ptr noundef nonnull %.0) #3
  br label %106

73:                                               ; preds = %46
  %74 = icmp eq i32 %.087, 0
  br i1 %74, label %79, label %75

75:                                               ; preds = %73
  %76 = getelementptr inbounds i8, ptr %.0, i64 20
  %77 = load i32, ptr %76, align 4, !tbaa !17
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %75, %73
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

80:                                               ; preds = %75
  tail call void @__MCMatch_SHEBM(ptr noundef nonnull %0, ptr noundef nonnull %.0, i32 noundef 1) #3
  br label %106

81:                                               ; preds = %46
  %82 = icmp eq i32 %.087, 0
  br i1 %82, label %87, label %83

83:                                               ; preds = %81
  %84 = getelementptr inbounds i8, ptr %.0, i64 20
  %85 = load i32, ptr %84, align 4, !tbaa !17
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %83, %81
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

88:                                               ; preds = %83
  tail call void @__MCMatch_SHEBM(ptr noundef nonnull %0, ptr noundef nonnull %.0, i32 noundef -1) #3
  br label %106

89:                                               ; preds = %46
  %90 = icmp eq i32 %.087, 0
  br i1 %90, label %95, label %91

91:                                               ; preds = %89
  %92 = getelementptr inbounds i8, ptr %.0, i64 20
  %93 = load i32, ptr %92, align 4, !tbaa !17
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %91, %89
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

96:                                               ; preds = %91
  tail call void @__MCMatch_SBHEM(ptr noundef nonnull %0, ptr noundef nonnull %.0, i32 noundef 1) #3
  br label %106

97:                                               ; preds = %46
  %98 = icmp eq i32 %.087, 0
  br i1 %98, label %103, label %99

99:                                               ; preds = %97
  %100 = getelementptr inbounds i8, ptr %.0, i64 20
  %101 = load i32, ptr %100, align 4, !tbaa !17
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %99, %97
  tail call void @__MCMatch_RM(ptr noundef nonnull %0, ptr noundef %.0) #3
  br label %106

104:                                              ; preds = %99
  tail call void @__MCMatch_SBHEM(ptr noundef nonnull %0, ptr noundef nonnull %.0, i32 noundef -1) #3
  br label %106

105:                                              ; preds = %46
  tail call void (ptr, ...) @__errexit(ptr noundef nonnull @.str.3, i32 noundef %47) #3
  br label %106

106:                                              ; preds = %103, %104, %95, %96, %87, %88, %79, %80, %71, %72, %63, %64, %55, %56, %105, %48
  %107 = getelementptr inbounds i8, ptr %.0, i64 200
  %108 = load ptr, ptr %107, align 8, !tbaa !26
  %109 = add nuw nsw i32 %.087, 1
  %110 = getelementptr inbounds i8, ptr %108, i64 16
  %111 = load i32, ptr %110, align 8, !tbaa !15
  %112 = load i32, ptr %0, align 8, !tbaa !19
  %113 = icmp sgt i32 %111, %112
  br i1 %113, label %114, label %.critedge

114:                                              ; preds = %106
  %115 = sitofp i32 %111 to double
  %116 = getelementptr inbounds i8, ptr %108, i64 208
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  %118 = getelementptr inbounds i8, ptr %117, i64 16
  %119 = load i32, ptr %118, align 8, !tbaa !15
  %120 = sitofp i32 %119 to double
  %121 = fmul double %120, 9.000000e-01
  %122 = fcmp ogt double %121, %115
  br i1 %122, label %123, label %.critedge

123:                                              ; preds = %114
  %124 = getelementptr inbounds i8, ptr %108, i64 20
  %125 = load i32, ptr %124, align 4, !tbaa !17
  %126 = sdiv i32 %111, 2
  %127 = icmp sgt i32 %125, %126
  br i1 %127, label %15, label %.critedge, !llvm.loop !28

.critedge:                                        ; preds = %114, %106, %123
  %128 = getelementptr inbounds i8, ptr %108, i64 16
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = and i32 %129, 4
  %.not91 = icmp eq i32 %130, 0
  br i1 %.not91, label %157, label %131

131:                                              ; preds = %.critedge
  %132 = getelementptr inbounds i8, ptr %108, i64 20
  %133 = load i32, ptr %132, align 4, !tbaa !17
  %134 = getelementptr inbounds i8, ptr %108, i64 64
  %135 = load ptr, ptr %134, align 8, !tbaa !18
  %136 = tail call i32 @__idxsum(i32 noundef %111, ptr noundef %135) #3
  %137 = load i32, ptr %0, align 8, !tbaa !19
  %138 = load float, ptr %12, align 8, !tbaa !20
  %139 = fpext float %138 to double
  %140 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %111, i32 noundef %133, i32 noundef %136, i32 noundef %137, double noundef %139)
  %141 = load i32, ptr %13, align 8, !tbaa !21
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %131
  %143 = getelementptr inbounds i8, ptr %108, i64 184
  %144 = getelementptr inbounds i8, ptr %108, i64 176
  br label %145

145:                                              ; preds = %.lr.ph99, %145
  %indvars.iv103 = phi i64 [ 0, %.lr.ph99 ], [ %indvars.iv.next104, %145 ]
  %146 = load i32, ptr %128, align 8, !tbaa !15
  %147 = load ptr, ptr %143, align 8, !tbaa !22
  %148 = getelementptr inbounds float, ptr %147, i64 %indvars.iv103
  %149 = load i32, ptr %144, align 8, !tbaa !21
  %150 = tail call float @__ssum_strd(i32 noundef %146, ptr noundef %148, i32 noundef %149) #3
  %151 = fpext float %150 to double
  %152 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %151)
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %153 = load i32, ptr %13, align 8, !tbaa !21
  %154 = sext i32 %153 to i64
  %155 = icmp slt i64 %indvars.iv.next104, %154
  br i1 %155, label %145, label %._crit_edge100, !llvm.loop !29

._crit_edge100:                                   ; preds = %145, %131
  %156 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %._crit_edge100, %.critedge
  %158 = phi i32 [ %.pre, %._crit_edge100 ], [ %129, %.critedge ]
  %159 = and i32 %158, 1
  %.not92 = icmp eq i32 %159, 0
  br i1 %.not92, label %165, label %160

160:                                              ; preds = %157
  %161 = tail call double @__seconds() #3
  %162 = getelementptr inbounds i8, ptr %0, i64 136
  %163 = load double, ptr %162, align 8, !tbaa !14
  %164 = fadd double %161, %163
  store double %164, ptr %162, align 8, !tbaa !14
  br label %165

165:                                              ; preds = %160, %157
  ret ptr %108
}

declare double @__seconds() local_unnamed_addr #1

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

declare i32 @__idxsum(i32 noundef, ptr noundef) local_unnamed_addr #1

declare float @__ssum_strd(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @__MCMatch_RM(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @__MCMatch_HEM(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @__MCMatch_SHEM(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @__MCMatch_SHEBM(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @__MCMatch_SBHEM(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @__errexit(ptr noundef, ...) local_unnamed_addr #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 = { "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 = { 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 #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, !7, i64 4}
!6 = !{!"controldef", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !11, i64 48, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"workspacedef", !12, i64 0, !7, i64 8, !7, i64 12, !12, i64 16, !12, i64 24, !7, i64 32, !12, i64 40, !12, i64 48}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!6, !13, i64 136}
!15 = !{!16, !7, i64 16}
!16 = !{!"graphdef", !12, i64 0, !12, i64 8, !7, i64 16, !7, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !7, i64 88, !7, i64 92, !12, i64 96, !12, i64 104, !7, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !7, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208}
!17 = !{!16, !7, i64 20}
!18 = !{!16, !12, i64 64}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !10, i64 24}
!21 = !{!16, !7, i64 176}
!22 = !{!16, !12, i64 184}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !7, i64 8}
!26 = !{!16, !12, i64 200}
!27 = !{!16, !12, i64 208}
!28 = distinct !{!28, !24}
!29 = distinct !{!29, !24}


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