; LLVM IR from libxsmm/libxsmm :: src (libxsmm_math)

; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%struct.libxsmm_matdiff_info = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32 }

@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local double @libxsmm_matdiff_epsilon(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca [4096 x i8], align 16
  %8 = alloca %struct.stat, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = icmp ne ptr null, %17
  br i1 %18, label %19, label %257

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %20 = call ptr @getenv(ptr noundef @.str.11) #5
  store ptr %20, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %21, i32 0, i32 9
  %23 = load double, ptr %22, align 8, !tbaa !9
  %24 = fcmp olt double 0.000000e+00, %23
  br i1 %24, label %25, label %47

25:                                               ; preds = %19
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %26, i32 0, i32 4
  %28 = load double, ptr %27, align 8, !tbaa !13
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %29, i32 0, i32 5
  %31 = load double, ptr %30, align 8, !tbaa !14
  %32 = fcmp olt double %28, %31
  br i1 %32, label %33, label %37

33:                                               ; preds = %25
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %34, i32 0, i32 4
  %36 = load double, ptr %35, align 8, !tbaa !13
  br label %41

37:                                               ; preds = %25
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %38, i32 0, i32 5
  %40 = load double, ptr %39, align 8, !tbaa !14
  br label %41

41:                                               ; preds = %37, %33
  %42 = phi double [ %36, %33 ], [ %40, %37 ]
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %43, i32 0, i32 9
  %45 = load double, ptr %44, align 8, !tbaa !9
  %46 = fdiv double %42, %45
  store double %46, ptr %3, align 8, !tbaa !15
  br label %91

47:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %48, i32 0, i32 0
  %50 = load double, ptr %49, align 8, !tbaa !16
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %51, i32 0, i32 2
  %53 = load double, ptr %52, align 8, !tbaa !17
  %54 = fcmp olt double %50, %53
  br i1 %54, label %55, label %59

55:                                               ; preds = %47
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %56, i32 0, i32 0
  %58 = load double, ptr %57, align 8, !tbaa !16
  br label %63

59:                                               ; preds = %47
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %60, i32 0, i32 2
  %62 = load double, ptr %61, align 8, !tbaa !17
  br label %63

63:                                               ; preds = %59, %55
  %64 = phi double [ %58, %55 ], [ %62, %59 ]
  store double %64, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %65, i32 0, i32 5
  %67 = load double, ptr %66, align 8, !tbaa !14
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %68, i32 0, i32 7
  %70 = load double, ptr %69, align 8, !tbaa !18
  %71 = fcmp olt double %67, %70
  br i1 %71, label %72, label %76

72:                                               ; preds = %63
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %73, i32 0, i32 7
  %75 = load double, ptr %74, align 8, !tbaa !18
  br label %80

76:                                               ; preds = %63
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %77, i32 0, i32 5
  %79 = load double, ptr %78, align 8, !tbaa !14
  br label %80

80:                                               ; preds = %76, %72
  %81 = phi double [ %75, %72 ], [ %79, %76 ]
  store double %81, ptr %6, align 8, !tbaa !15
  %82 = load double, ptr %5, align 8, !tbaa !15
  %83 = load double, ptr %6, align 8, !tbaa !15
  %84 = fcmp olt double %82, %83
  br i1 %84, label %85, label %87

85:                                               ; preds = %80
  %86 = load double, ptr %6, align 8, !tbaa !15
  br label %89

87:                                               ; preds = %80
  %88 = load double, ptr %5, align 8, !tbaa !15
  br label %89

89:                                               ; preds = %87, %85
  %90 = phi double [ %86, %85 ], [ %88, %87 ]
  store double %90, ptr %3, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %91

91:                                               ; preds = %89, %41
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = icmp ne ptr null, %92
  br i1 %93, label %94, label %256

94:                                               ; preds = %91
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = load i8, ptr %95, align 1, !tbaa !19
  %97 = sext i8 %96 to i32
  %98 = icmp ne i32 0, %97
  br i1 %98, label %99, label %256

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4096, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 144, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = call i64 @strlen(ptr noundef %100) #6
  %102 = add i64 %101, 1
  store i64 %102, ptr %9, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %103 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = call ptr @strncpy(ptr noundef %103, ptr noundef %104, i64 noundef 4095) #5
  store ptr %105, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = call ptr @strtok(ptr noundef %106, ptr noundef @.str.12) #5
  store ptr %107, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = call i32 @stat(ptr noundef %108, ptr noundef %8) #5
  %110 = icmp eq i32 0, %109
  br i1 %110, label %111, label %143

111:                                              ; preds = %99
  %112 = getelementptr inbounds %struct.stat, ptr %8, i32 0, i32 3
  %113 = load i32, ptr %112, align 8, !tbaa !22
  %114 = and i32 %113, 16384
  %115 = icmp ne i32 0, %114
  br i1 %115, label %116, label %143

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %117 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %118 = load i64, ptr %9, align 8, !tbaa !20
  %119 = getelementptr inbounds i8, ptr %117, i64 %118
  %120 = load i64, ptr %9, align 8, !tbaa !20
  %121 = sub i64 4096, %120
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %119, i64 noundef %121, ptr noundef @.str.13, ptr noundef %122) #5
  store i32 %123, ptr %13, align 4, !tbaa !25
  %124 = load i32, ptr %13, align 4, !tbaa !25
  %125 = icmp slt i32 0, %124
  br i1 %125, label %126, label %142

126:                                              ; preds = %116
  %127 = load i64, ptr %9, align 8, !tbaa !20
  %128 = load i32, ptr %13, align 4, !tbaa !25
  %129 = sext i32 %128 to i64
  %130 = add i64 %127, %129
  %131 = add i64 %130, 1
  %132 = icmp ult i64 %131, 4096
  br i1 %132, label %133, label %142

133:                                              ; preds = %126
  %134 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %135 = load i64, ptr %9, align 8, !tbaa !20
  %136 = getelementptr inbounds i8, ptr %134, i64 %135
  store ptr %136, ptr %12, align 8, !tbaa !5
  %137 = load i32, ptr %13, align 4, !tbaa !25
  %138 = add nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = load i64, ptr %9, align 8, !tbaa !20
  %141 = add i64 %140, %139
  store i64 %141, ptr %9, align 8, !tbaa !20
  br label %142

142:                                              ; preds = %133, %126, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %145

143:                                              ; preds = %111, %99
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %144, ptr %12, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %143, %142
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = icmp ne ptr null, %146
  br i1 %147, label %148, label %255

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %149 = load i64, ptr %9, align 8, !tbaa !20
  store i64 %149, ptr %14, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %150 = load i64, ptr %9, align 8, !tbaa !20
  %151 = mul i64 2, %150
  %152 = icmp ult i64 %151, 4096
  br i1 %152, label %153, label %161

153:                                              ; preds = %148
  %154 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %155 = load i64, ptr %9, align 8, !tbaa !20
  %156 = getelementptr inbounds i8, ptr %154, i64 %155
  %157 = load i64, ptr %9, align 8, !tbaa !20
  %158 = sub i64 4096, %157
  %159 = load double, ptr %3, align 8, !tbaa !15
  %160 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %156, i64 noundef %158, ptr noundef @.str.14, double noundef %159) #5
  br label %162

161:                                              ; preds = %148
  br label %162

162:                                              ; preds = %161, %153
  %163 = phi i32 [ %160, %153 ], [ 0, %161 ]
  store i32 %163, ptr %15, align 4, !tbaa !25
  %164 = load i32, ptr %15, align 4, !tbaa !25
  %165 = icmp slt i32 0, %164
  br i1 %165, label %166, label %254

166:                                              ; preds = %162
  %167 = load i64, ptr %9, align 8, !tbaa !20
  %168 = load i32, ptr %15, align 4, !tbaa !25
  %169 = sext i32 %168 to i64
  %170 = add i64 %167, %169
  %171 = mul i64 2, %170
  %172 = icmp ult i64 %171, 4096
  br i1 %172, label %173, label %254

173:                                              ; preds = %166
  %174 = load i32, ptr %15, align 4, !tbaa !25
  %175 = sext i32 %174 to i64
  %176 = load i64, ptr %9, align 8, !tbaa !20
  %177 = add i64 %176, %175
  store i64 %177, ptr %9, align 8, !tbaa !20
  %178 = call ptr @strtok(ptr noundef null, ptr noundef @.str.12) #5
  store ptr %178, ptr %11, align 8, !tbaa !5
  br label %179

179:                                              ; preds = %205, %173
  %180 = load ptr, ptr %11, align 8, !tbaa !5
  %181 = icmp ne ptr null, %180
  br i1 %181, label %182, label %207

182:                                              ; preds = %179
  %183 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %184 = load i64, ptr %9, align 8, !tbaa !20
  %185 = getelementptr inbounds i8, ptr %183, i64 %184
  %186 = load i64, ptr %9, align 8, !tbaa !20
  %187 = sub i64 4096, %186
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %185, i64 noundef %187, ptr noundef @.str.15, ptr noundef %188) #5
  store i32 %189, ptr %15, align 4, !tbaa !25
  %190 = load i32, ptr %15, align 4, !tbaa !25
  %191 = icmp slt i32 0, %190
  br i1 %191, label %192, label %204

192:                                              ; preds = %182
  %193 = load i64, ptr %9, align 8, !tbaa !20
  %194 = load i32, ptr %15, align 4, !tbaa !25
  %195 = sext i32 %194 to i64
  %196 = add i64 %193, %195
  %197 = mul i64 2, %196
  %198 = icmp ult i64 %197, 4096
  br i1 %198, label %199, label %204

199:                                              ; preds = %192
  %200 = load i32, ptr %15, align 4, !tbaa !25
  %201 = sext i32 %200 to i64
  %202 = load i64, ptr %9, align 8, !tbaa !20
  %203 = add i64 %202, %201
  store i64 %203, ptr %9, align 8, !tbaa !20
  br label %205

204:                                              ; preds = %192, %182
  br label %207

205:                                              ; preds = %199
  %206 = call ptr @strtok(ptr noundef null, ptr noundef @.str.12) #5
  store ptr %206, ptr %11, align 8, !tbaa !5
  br label %179, !llvm.loop !26

207:                                              ; preds = %204, %179
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  %209 = icmp eq ptr null, %208
  br i1 %209, label %210, label %253

210:                                              ; preds = %207
  %211 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %212 = load i64, ptr %9, align 8, !tbaa !20
  %213 = getelementptr inbounds i8, ptr %211, i64 %212
  %214 = load i64, ptr %9, align 8, !tbaa !20
  %215 = sub i64 4096, %214
  %216 = call i32 @libxsmm_print_cmdline(ptr noundef %213, i64 noundef %215, ptr noundef @.str.16, ptr noundef @.str.17)
  store i32 %216, ptr %15, align 4, !tbaa !25
  %217 = load i32, ptr %15, align 4, !tbaa !25
  %218 = icmp slt i32 0, %217
  br i1 %218, label %219, label %252

219:                                              ; preds = %210
  %220 = load i64, ptr %9, align 8, !tbaa !20
  %221 = load i32, ptr %15, align 4, !tbaa !25
  %222 = sext i32 %221 to i64
  %223 = add i64 %220, %222
  %224 = mul i64 2, %223
  %225 = icmp ult i64 %224, 4096
  br i1 %225, label %226, label %252

226:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %227 = load ptr, ptr %12, align 8, !tbaa !5
  %228 = call noalias ptr @fopen(ptr noundef %227, ptr noundef @.str.18)
  store ptr %228, ptr %16, align 8, !tbaa !5
  %229 = load ptr, ptr %16, align 8, !tbaa !5
  %230 = icmp ne ptr null, %229
  br i1 %230, label %231, label %251

231:                                              ; preds = %226
  %232 = load i64, ptr %9, align 8, !tbaa !20
  %233 = load i32, ptr %15, align 4, !tbaa !25
  %234 = sext i32 %233 to i64
  %235 = add i64 %232, %234
  %236 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 %235
  store i8 10, ptr %236, align 1, !tbaa !19
  %237 = getelementptr inbounds [4096 x i8], ptr %7, i64 0, i64 0
  %238 = load i64, ptr %14, align 8, !tbaa !20
  %239 = getelementptr inbounds i8, ptr %237, i64 %238
  %240 = load i64, ptr %9, align 8, !tbaa !20
  %241 = load i32, ptr %15, align 4, !tbaa !25
  %242 = sext i32 %241 to i64
  %243 = add i64 %240, %242
  %244 = load i64, ptr %14, align 8, !tbaa !20
  %245 = sub i64 %243, %244
  %246 = add i64 %245, 1
  %247 = load ptr, ptr %16, align 8, !tbaa !5
  %248 = call i64 @fwrite(ptr noundef %239, i64 noundef 1, i64 noundef %246, ptr noundef %247)
  %249 = load ptr, ptr %16, align 8, !tbaa !5
  %250 = call i32 @fclose(ptr noundef %249)
  call void @sync() #5
  br label %251

251:                                              ; preds = %231, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %252

252:                                              ; preds = %251, %219, %210
  br label %253

253:                                              ; preds = %252, %207
  br label %254

254:                                              ; preds = %253, %166, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %255

255:                                              ; preds = %254, %145
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %7) #5
  br label %256

256:                                              ; preds = %255, %94, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %258

257:                                              ; preds = %1
  store double 0.000000e+00, ptr %3, align 8, !tbaa !15
  br label %258

258:                                              ; preds = %257, %256
  %259 = load double, ptr %3, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret double %259
}

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind
declare ptr @strtok(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @stat(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #1

declare i32 @libxsmm_print_cmdline(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #4

declare noalias ptr @fopen(ptr noundef, ptr noundef) #4

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

declare i32 @fclose(ptr noundef) #4

; Function Attrs: nounwind
declare void @sync() #1

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

!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 72}
!10 = !{!"libxsmm_matdiff_info", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !11, i64 32}
!14 = !{!10, !11, i64 40}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 0}
!17 = !{!10, !11, i64 16}
!18 = !{!10, !11, i64 56}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !12, i64 24}
!23 = !{!"stat", !21, i64 0, !21, i64 8, !21, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !21, i64 40, !21, i64 48, !21, i64 56, !21, i64 64, !24, i64 72, !24, i64 88, !24, i64 104, !7, i64 120}
!24 = !{!"timespec", !21, i64 0, !21, i64 8}
!25 = !{!12, !12, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local double @libxsmm_matdiff_epsilon(ptr noundef readonly %0) local_unnamed_addr #2 {
  %2 = alloca [4096 x i8], align 16
  %3 = alloca %struct.stat, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %99, label %4

4:                                                ; preds = %1
  %5 = tail call ptr @getenv(ptr noundef nonnull @.str.11) #9
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  %7 = load double, ptr %6, align 8, !tbaa !5
  %8 = fcmp ogt double %7, 0.000000e+00
  br i1 %8, label %9, label %16

9:                                                ; preds = %4
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load double, ptr %10, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = load double, ptr %12, align 8, !tbaa !12
  %14 = fcmp olt double %11, %13
  %. = select i1 %14, double %11, double %13
  %15 = fdiv double %., %7
  br label %29

16:                                               ; preds = %4
  %17 = load double, ptr %0, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load double, ptr %18, align 8, !tbaa !14
  %20 = fcmp olt double %17, %19
  %.95 = select i1 %20, double %17, double %19
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  %22 = load double, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %0, i64 56
  %24 = load double, ptr %23, align 8, !tbaa !15
  %25 = fcmp olt double %22, %24
  %26 = select i1 %25, double %24, double %22
  %27 = fcmp olt double %.95, %26
  %28 = select i1 %27, double %26, double %.95
  br label %29

29:                                               ; preds = %16, %9
  %.0 = phi double [ %15, %9 ], [ %28, %16 ]
  %.not89 = icmp eq ptr %5, null
  br i1 %.not89, label %99, label %30

30:                                               ; preds = %29
  %31 = load i8, ptr %5, align 1, !tbaa !16
  %.not90 = icmp eq i8 %31, 0
  br i1 %.not90, label %99, label %32

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #9
  %33 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %5) #10
  %34 = add i64 %33, 1
  %35 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %5, i64 noundef 4095) #9
  %36 = call ptr @strtok(ptr noundef nonnull %2, ptr noundef nonnull @.str.12) #9
  %37 = call i32 @stat(ptr noundef %36, ptr noundef nonnull %3) #9
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %56

39:                                               ; preds = %32
  %40 = getelementptr inbounds i8, ptr %3, i64 24
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %42 = and i32 %41, 16384
  %.not91 = icmp eq i32 %42, 0
  br i1 %.not91, label %56, label %43

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %2, i64 %34
  %45 = sub i64 4095, %33
  %46 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %44, i64 noundef %45, ptr noundef nonnull @.str.13, ptr noundef %36) #9
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %48, label %.thread

48:                                               ; preds = %43
  %49 = zext nneg i32 %46 to i64
  %50 = add i64 %33, 2
  %51 = add i64 %50, %49
  %52 = icmp ult i64 %51, 4096
  br i1 %52, label %.thread99, label %.thread

.thread99:                                        ; preds = %48
  %53 = add nuw nsw i32 %46, 1
  %54 = zext nneg i32 %53 to i64
  %55 = add i64 %34, %54
  br label %57

56:                                               ; preds = %32, %39
  %.not92 = icmp eq ptr %36, null
  br i1 %.not92, label %.thread, label %57

57:                                               ; preds = %.thread99, %56
  %.172104 = phi i64 [ %55, %.thread99 ], [ %34, %56 ]
  %.175103 = phi ptr [ %44, %.thread99 ], [ %36, %56 ]
  %58 = and i64 %.172104, 9223372036854773760
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %.thread

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %2, i64 %.172104
  %62 = sub i64 4096, %.172104
  %63 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %61, i64 noundef %62, ptr noundef nonnull @.str.14, double noundef %.0) #9
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %65, label %.thread

65:                                               ; preds = %60
  %66 = zext nneg i32 %63 to i64
  %67 = add nuw nsw i64 %.172104, %66
  %68 = and i64 %67, 4294965248
  %69 = icmp eq i64 %68, 0
  br i1 %69, label %70, label %.thread

70:                                               ; preds = %65
  %71 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.12) #9
  %cond107 = icmp eq ptr %71, null
  br i1 %cond107, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %70, %81
  %.2109 = phi i64 [ %78, %81 ], [ %67, %70 ]
  %.073108 = phi ptr [ %82, %81 ], [ %71, %70 ]
  %72 = getelementptr inbounds i8, ptr %2, i64 %.2109
  %73 = sub i64 4096, %.2109
  %74 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %72, i64 noundef %73, ptr noundef nonnull @.str.15, ptr noundef nonnull %.073108) #9
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %76, label %.thread

76:                                               ; preds = %.lr.ph
  %77 = zext nneg i32 %74 to i64
  %78 = add i64 %.2109, %77
  %79 = and i64 %78, 9223372036854773760
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %.thread

81:                                               ; preds = %76
  %82 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.12) #9
  %cond = icmp eq ptr %82, null
  br i1 %cond, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %81, %70
  %.2.lcssa = phi i64 [ %67, %70 ], [ %78, %81 ]
  %83 = getelementptr inbounds i8, ptr %2, i64 %.2.lcssa
  %84 = sub i64 4096, %.2.lcssa
  %85 = call i32 @libxsmm_print_cmdline(ptr noundef nonnull %83, i64 noundef %84, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17) #9
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %87, label %.thread

87:                                               ; preds = %._crit_edge
  %88 = zext nneg i32 %85 to i64
  %89 = add nuw nsw i64 %.2.lcssa, %88
  %90 = and i64 %89, 9223372036854773760
  %91 = icmp eq i64 %90, 0
  br i1 %91, label %92, label %.thread

92:                                               ; preds = %87
  %93 = call noalias ptr @fopen(ptr noundef nonnull %.175103, ptr noundef nonnull @.str.18)
  %.not94 = icmp eq ptr %93, null
  br i1 %.not94, label %.thread, label %94

94:                                               ; preds = %92
  %95 = getelementptr inbounds [4096 x i8], ptr %2, i64 0, i64 %89
  store i8 10, ptr %95, align 1, !tbaa !16
  %reass.sub = sub i64 %89, %.172104
  %96 = add i64 %reass.sub, 1
  %97 = call i64 @fwrite(ptr noundef nonnull %61, i64 noundef 1, i64 noundef %96, ptr noundef nonnull %93)
  %98 = call i32 @fclose(ptr noundef nonnull %93)
  call void @sync() #9
  br label %.thread

.thread:                                          ; preds = %76, %.lr.ph, %57, %43, %48, %60, %65, %._crit_edge, %87, %94, %92, %56
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %2) #9
  br label %99

99:                                               ; preds = %1, %29, %30, %.thread
  %.1 = phi double [ %.0, %.thread ], [ %.0, %30 ], [ %.0, %29 ], [ 0.000000e+00, %1 ]
  ret double %.1
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @stat(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #6

declare i32 @libxsmm_print_cmdline(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare void @sync() local_unnamed_addr #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind memory(read) "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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { mustprogress nofree nounwind willreturn "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 #6 = { 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 #7 = { "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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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 72}
!6 = !{!"libxsmm_matdiff_info", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!6, !7, i64 40}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 16}
!15 = !{!6, !7, i64 56}
!16 = !{!8, !8, i64 0}
!17 = !{!18, !10, i64 24}
!18 = !{!"stat", !19, i64 0, !19, i64 8, !19, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !20, i64 72, !20, i64 88, !20, i64 104, !8, i64 120}
!19 = !{!"long", !8, i64 0}
!20 = !{!"timespec", !19, i64 0, !19, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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