; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Grid.ll (ZN6R3Grid14ReadDelphiFileEPKc)

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

%class.R3Point = type { [3 x double] }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3Grid = type { %class.R3Affine, %class.R3Affine, double, double, ptr, [3 x i32], i32, i32, i32 }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@stderr = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [49 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6R3Grid28SetWorldToGridTransformationERK5R3Box(ptr noundef nonnull align 8 dereferenceable(592), ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

declare void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #2

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

; Function Attrs: nounwind
declare void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6R3Grid14ReadDelphiFileEPKc(ptr noundef nonnull align 8 dereferenceable(592) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [32 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca [32 x i8], align 16
  %12 = alloca [64 x i8], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca [128 x i8], align 16
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca [3 x float], align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i8, align 1
  %27 = alloca %class.R3Point, align 8
  %28 = alloca %class.R3Point, align 8
  %29 = alloca %class.R3Box, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noalias ptr @fopen(ptr noundef %33, ptr noundef @.str.45)
  store ptr %34, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %39, label %37

37:                                               ; preds = %2
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.80, ptr noundef %38)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %415

39:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = call i64 @fread(ptr noundef %8, i64 noundef 4, i64 noundef 1, ptr noundef %40)
  %42 = icmp ne i64 %41, 1
  br i1 %42, label %43, label %45

43:                                               ; preds = %39
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.81, ptr noundef %44)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %414

45:                                               ; preds = %39
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 20
  br i1 %47, label %48, label %51

48:                                               ; preds = %45
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.82, i32 noundef %49, ptr noundef %50)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %414

51:                                               ; preds = %45
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  %53 = getelementptr inbounds [32 x i8], ptr %9, i64 0, i64 0
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = call i64 @fread(ptr noundef %53, i64 noundef 1, i64 noundef 20, ptr noundef %54)
  %56 = icmp ne i64 %55, 20
  br i1 %56, label %57, label %59

57:                                               ; preds = %52
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.83, ptr noundef %58)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %413

59:                                               ; preds = %52
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = call i64 @fread(ptr noundef %8, i64 noundef 4, i64 noundef 1, ptr noundef %60)
  %62 = icmp ne i64 %61, 1
  br i1 %62, label %63, label %65

63:                                               ; preds = %59
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.81, ptr noundef %64)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %413

65:                                               ; preds = %59
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 20
  br i1 %67, label %68, label %71

68:                                               ; preds = %65
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.82, i32 noundef %69, ptr noundef %70)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %413

71:                                               ; preds = %65
  br label %72

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = call i64 @fread(ptr noundef %10, i64 noundef 4, i64 noundef 1, ptr noundef %73)
  %75 = icmp ne i64 %74, 1
  br i1 %75, label %76, label %78

76:                                               ; preds = %72
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.84, ptr noundef %77)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %412

78:                                               ; preds = %72
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = icmp ne i32 %79, 70
  br i1 %80, label %81, label %84

81:                                               ; preds = %78
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.85, i32 noundef %82, ptr noundef %83)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %412

84:                                               ; preds = %78
  br label %85

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %86 = getelementptr inbounds [32 x i8], ptr %11, i64 0, i64 0
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = call i64 @fread(ptr noundef %86, i64 noundef 1, i64 noundef 10, ptr noundef %87)
  %89 = icmp ne i64 %88, 10
  br i1 %89, label %90, label %92

90:                                               ; preds = %85
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.86, ptr noundef %91)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %411

92:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #7
  %93 = getelementptr inbounds [64 x i8], ptr %12, i64 0, i64 0
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = call i64 @fread(ptr noundef %93, i64 noundef 1, i64 noundef 60, ptr noundef %94)
  %96 = icmp ne i64 %95, 60
  br i1 %96, label %97, label %99

97:                                               ; preds = %92
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.87, ptr noundef %98)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %410

99:                                               ; preds = %92
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = call i64 @fread(ptr noundef %10, i64 noundef 4, i64 noundef 1, ptr noundef %100)
  %102 = icmp ne i64 %101, 1
  br i1 %102, label %103, label %105

103:                                              ; preds = %99
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.84, ptr noundef %104)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %410

105:                                              ; preds = %99
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = icmp ne i32 %106, 70
  br i1 %107, label %108, label %111

108:                                              ; preds = %105
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.85, i32 noundef %109, ptr noundef %110)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %410

111:                                              ; preds = %105
  br label %112

112:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 65, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = call i64 @fread(ptr noundef %14, i64 noundef 4, i64 noundef 1, ptr noundef %113)
  %115 = icmp ne i64 %114, 1
  br i1 %115, label %116, label %118

116:                                              ; preds = %112
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.88, ptr noundef %117)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %409

118:                                              ; preds = %112
  %119 = load i32, ptr %14, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = mul nsw i32 %121, %122
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = mul nsw i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = mul i64 %126, 4
  %128 = icmp ne i64 %120, %127
  br i1 %128, label %129, label %132

129:                                              ; preds = %118
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.89, i32 noundef %130, ptr noundef %131)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %409

132:                                              ; preds = %118
  br label %133

133:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = mul nsw i32 %134, %135
  %137 = load i32, ptr %13, align 4, !tbaa !9
  %138 = mul nsw i32 %136, %137
  store i32 %138, ptr %15, align 4, !tbaa !9
  %139 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %147

142:                                              ; preds = %133
  %143 = load i32, ptr %15, align 4, !tbaa !9
  %144 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  %145 = load i32, ptr %144, align 4, !tbaa !19
  %146 = icmp sgt i32 %143, %145
  br i1 %146, label %147, label %171

147:                                              ; preds = %142, %133
  %148 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !11
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %157

151:                                              ; preds = %147
  %152 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !11
  %154 = icmp eq ptr %153, null
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  call void @_ZdaPv(ptr noundef %153) #8
  br label %156

156:                                              ; preds = %155, %151
  br label %157

157:                                              ; preds = %156, %147
  %158 = load i32, ptr %15, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %159, i64 8)
  %161 = extractvalue { i64, i1 } %160, 1
  %162 = extractvalue { i64, i1 } %160, 0
  %163 = select i1 %161, i64 -1, i64 %162
  %164 = call noalias noundef nonnull ptr @_Znam(i64 noundef %163) #9
  %165 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 4
  store ptr %164, ptr %165, align 8, !tbaa !11
  %166 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = icmp ne ptr %167, null
  br i1 %168, label %170, label %169

169:                                              ; preds = %157
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.10, i32 noundef 3662, ptr noundef @.str.2)
  br label %170

170:                                              ; preds = %169, %157
  br label %171

171:                                              ; preds = %170, %142
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 5
  %174 = getelementptr inbounds [3 x i32], ptr %173, i64 0, i64 0
  store i32 %172, ptr %174, align 8, !tbaa !9
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 5
  %177 = getelementptr inbounds [3 x i32], ptr %176, i64 0, i64 1
  store i32 %175, ptr %177, align 4, !tbaa !9
  %178 = load i32, ptr %13, align 4, !tbaa !9
  %179 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 5
  %180 = getelementptr inbounds [3 x i32], ptr %179, i64 0, i64 2
  store i32 %178, ptr %180, align 8, !tbaa !9
  %181 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 5
  %182 = getelementptr inbounds [3 x i32], ptr %181, i64 0, i64 0
  %183 = load i32, ptr %182, align 8, !tbaa !9
  %184 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 6
  store i32 %183, ptr %184, align 4, !tbaa !20
  %185 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 6
  %186 = load i32, ptr %185, align 4, !tbaa !20
  %187 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 5
  %188 = getelementptr inbounds [3 x i32], ptr %187, i64 0, i64 1
  %189 = load i32, ptr %188, align 4, !tbaa !9
  %190 = mul nsw i32 %186, %189
  %191 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 7
  store i32 %190, ptr %191, align 8, !tbaa !21
  %192 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 7
  %193 = load i32, ptr %192, align 8, !tbaa !21
  %194 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 5
  %195 = getelementptr inbounds [3 x i32], ptr %194, i64 0, i64 2
  %196 = load i32, ptr %195, align 8, !tbaa !9
  %197 = mul nsw i32 %193, %196
  %198 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  store i32 %197, ptr %198, align 4, !tbaa !19
  %199 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  %200 = load i32, ptr %199, align 4, !tbaa !19
  %201 = icmp sle i32 %200, 0
  br i1 %201, label %202, label %205

202:                                              ; preds = %171
  %203 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  %204 = load i32, ptr %203, align 4, !tbaa !19
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.49, i32 noundef %204)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %408

205:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %206 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 4
  %207 = load ptr, ptr %206, align 8, !tbaa !11
  store ptr %207, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %208

208:                                              ; preds = %231, %205
  %209 = load i32, ptr %17, align 4, !tbaa !9
  %210 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  %211 = load i32, ptr %210, align 4, !tbaa !19
  %212 = icmp slt i32 %209, %211
  br i1 %212, label %214, label %213

213:                                              ; preds = %208
  store i32 2, ptr %7, align 4
  br label %234

214:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = call i64 @fread(ptr noundef %18, i64 noundef 4, i64 noundef 1, ptr noundef %215)
  %217 = icmp ne i64 %216, 1
  br i1 %217, label %218, label %222

218:                                              ; preds = %214
  %219 = load i32, ptr %17, align 4, !tbaa !9
  %220 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  %221 = load i32, ptr %220, align 4, !tbaa !19
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.51, i32 noundef %219, i32 noundef %221)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %228

222:                                              ; preds = %214
  %223 = load float, ptr %18, align 4, !tbaa !22
  %224 = fpext float %223 to double
  %225 = load ptr, ptr %16, align 8, !tbaa !5
  %226 = getelementptr inbounds double, ptr %225, i32 1
  store ptr %226, ptr %16, align 8, !tbaa !5
  store double %224, ptr %225, align 8, !tbaa !24
  br label %227

227:                                              ; preds = %222
  store i32 0, ptr %7, align 4
  br label %228

228:                                              ; preds = %227, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %229 = load i32, ptr %7, align 4
  switch i32 %229, label %234 [
    i32 0, label %230
  ]

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %17, align 4, !tbaa !9
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %17, align 4, !tbaa !9
  br label %208, !llvm.loop !25

234:                                              ; preds = %228, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %235 = load i32, ptr %7, align 4
  switch i32 %235, label %407 [
    i32 2, label %236
  ]

236:                                              ; preds = %234
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = call i64 @fread(ptr noundef %14, i64 noundef 4, i64 noundef 1, ptr noundef %237)
  %239 = icmp ne i64 %238, 1
  br i1 %239, label %240, label %242

240:                                              ; preds = %236
  %241 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.88, ptr noundef %241)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %407

242:                                              ; preds = %236
  %243 = load i32, ptr %14, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = load i32, ptr %13, align 4, !tbaa !9
  %246 = load i32, ptr %13, align 4, !tbaa !9
  %247 = mul nsw i32 %245, %246
  %248 = load i32, ptr %13, align 4, !tbaa !9
  %249 = mul nsw i32 %247, %248
  %250 = sext i32 %249 to i64
  %251 = mul i64 %250, 4
  %252 = icmp ne i64 %244, %251
  br i1 %252, label %253, label %256

253:                                              ; preds = %242
  %254 = load i32, ptr %14, align 4, !tbaa !9
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.89, i32 noundef %254, ptr noundef %255)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %407

256:                                              ; preds = %242
  br label %257

257:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %258 = load ptr, ptr %6, align 8, !tbaa !5
  %259 = call i64 @fread(ptr noundef %19, i64 noundef 4, i64 noundef 1, ptr noundef %258)
  %260 = icmp ne i64 %259, 1
  br i1 %260, label %261, label %263

261:                                              ; preds = %257
  %262 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.90, ptr noundef %262)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %406

263:                                              ; preds = %257
  %264 = load i32, ptr %19, align 4, !tbaa !9
  %265 = icmp ne i32 %264, 16
  br i1 %265, label %266, label %269

266:                                              ; preds = %263
  %267 = load i32, ptr %19, align 4, !tbaa !9
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.91, i32 noundef %267, ptr noundef %268)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %406

269:                                              ; preds = %263
  br label %270

270:                                              ; preds = %269
  call void @llvm.lifetime.start.p0(i64 128, ptr %20) #7
  %271 = getelementptr inbounds [128 x i8], ptr %20, i64 0, i64 0
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = call i64 @fread(ptr noundef %271, i64 noundef 1, i64 noundef 16, ptr noundef %272)
  %274 = icmp ne i64 %273, 16
  br i1 %274, label %275, label %277

275:                                              ; preds = %270
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.92, ptr noundef %276)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %405

277:                                              ; preds = %270
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = call i64 @fread(ptr noundef %19, i64 noundef 4, i64 noundef 1, ptr noundef %278)
  %280 = icmp ne i64 %279, 1
  br i1 %280, label %281, label %283

281:                                              ; preds = %277
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.90, ptr noundef %282)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %405

283:                                              ; preds = %277
  %284 = load i32, ptr %19, align 4, !tbaa !9
  %285 = icmp ne i32 %284, 16
  br i1 %285, label %286, label %289

286:                                              ; preds = %283
  %287 = load i32, ptr %19, align 4, !tbaa !9
  %288 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.91, i32 noundef %287, ptr noundef %288)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %405

289:                                              ; preds = %283
  br label %290

290:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %291 = load ptr, ptr %6, align 8, !tbaa !5
  %292 = call i64 @fread(ptr noundef %21, i64 noundef 4, i64 noundef 1, ptr noundef %291)
  %293 = icmp ne i64 %292, 1
  br i1 %293, label %294, label %296

294:                                              ; preds = %290
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.93, ptr noundef %295)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %404

296:                                              ; preds = %290
  %297 = load i32, ptr %21, align 4, !tbaa !9
  %298 = icmp ne i32 %297, 20
  br i1 %298, label %299, label %302

299:                                              ; preds = %296
  %300 = load i32, ptr %21, align 4, !tbaa !9
  %301 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.94, i32 noundef %300, ptr noundef %301)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %404

302:                                              ; preds = %296
  br label %303

303:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = call i64 @fread(ptr noundef %22, i64 noundef 4, i64 noundef 1, ptr noundef %304)
  %306 = icmp ne i64 %305, 1
  br i1 %306, label %307, label %308

307:                                              ; preds = %303
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.95)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %403

308:                                              ; preds = %303
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #7
  %309 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 0
  %310 = load ptr, ptr %6, align 8, !tbaa !5
  %311 = call i64 @fread(ptr noundef %309, i64 noundef 4, i64 noundef 3, ptr noundef %310)
  %312 = icmp ne i64 %311, 3
  br i1 %312, label %313, label %314

313:                                              ; preds = %308
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.96)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %402

314:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %315 = load ptr, ptr %6, align 8, !tbaa !5
  %316 = call i64 @fread(ptr noundef %24, i64 noundef 4, i64 noundef 1, ptr noundef %315)
  %317 = icmp ne i64 %316, 1
  br i1 %317, label %318, label %319

318:                                              ; preds = %314
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.97)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %401

319:                                              ; preds = %314
  %320 = load i32, ptr %24, align 4, !tbaa !9
  %321 = icmp ne i32 %320, 65
  br i1 %321, label %322, label %324

322:                                              ; preds = %319
  %323 = load i32, ptr %24, align 4, !tbaa !9
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.98, i32 noundef %323)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %401

324:                                              ; preds = %319
  %325 = load ptr, ptr %6, align 8, !tbaa !5
  %326 = call i64 @fread(ptr noundef %21, i64 noundef 4, i64 noundef 1, ptr noundef %325)
  %327 = icmp ne i64 %326, 1
  br i1 %327, label %328, label %330

328:                                              ; preds = %324
  %329 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.93, ptr noundef %329)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %401

330:                                              ; preds = %324
  %331 = load i32, ptr %21, align 4, !tbaa !9
  %332 = icmp ne i32 %331, 20
  br i1 %332, label %333, label %336

333:                                              ; preds = %330
  %334 = load i32, ptr %21, align 4, !tbaa !9
  %335 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.94, i32 noundef %334, ptr noundef %335)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %401

336:                                              ; preds = %330
  br label %337

337:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #7
  br label %338

338:                                              ; preds = %342, %337
  %339 = load ptr, ptr %6, align 8, !tbaa !5
  %340 = call i64 @fread(ptr noundef %26, i64 noundef 1, i64 noundef 1, ptr noundef %339)
  %341 = icmp eq i64 %340, 1
  br i1 %341, label %342, label %345

342:                                              ; preds = %338
  %343 = load i32, ptr %25, align 4, !tbaa !9
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr %25, align 4, !tbaa !9
  br label %338, !llvm.loop !27

345:                                              ; preds = %338
  %346 = load i32, ptr %25, align 4, !tbaa !9
  %347 = icmp ne i32 %346, 0
  br i1 %347, label %348, label %353

348:                                              ; preds = %345
  %349 = load ptr, ptr @stderr, align 8, !tbaa !5
  %350 = load i32, ptr %25, align 4, !tbaa !9
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %349, ptr noundef @.str.99, i32 noundef %350, ptr noundef %351) #7
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %400

353:                                              ; preds = %345
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #7
  %354 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 0
  %355 = load float, ptr %354, align 4, !tbaa !22
  %356 = load float, ptr %22, align 4, !tbaa !22
  %357 = fdiv float 3.200000e+01, %356
  %358 = fsub float %355, %357
  %359 = fpext float %358 to double
  %360 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 1
  %361 = load float, ptr %360, align 4, !tbaa !22
  %362 = load float, ptr %22, align 4, !tbaa !22
  %363 = fdiv float 3.200000e+01, %362
  %364 = fsub float %361, %363
  %365 = fpext float %364 to double
  %366 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 2
  %367 = load float, ptr %366, align 4, !tbaa !22
  %368 = load float, ptr %22, align 4, !tbaa !22
  %369 = fdiv float 3.200000e+01, %368
  %370 = fsub float %367, %369
  %371 = fpext float %370 to double
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %27, double noundef %359, double noundef %365, double noundef %371)
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #7
  %372 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 0
  %373 = load float, ptr %372, align 4, !tbaa !22
  %374 = load float, ptr %22, align 4, !tbaa !22
  %375 = fdiv float 3.200000e+01, %374
  %376 = fadd float %373, %375
  %377 = fpext float %376 to double
  %378 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 1
  %379 = load float, ptr %378, align 4, !tbaa !22
  %380 = load float, ptr %22, align 4, !tbaa !22
  %381 = fdiv float 3.200000e+01, %380
  %382 = fadd float %379, %381
  %383 = fpext float %382 to double
  %384 = getelementptr inbounds [3 x float], ptr %23, i64 0, i64 2
  %385 = load float, ptr %384, align 4, !tbaa !22
  %386 = load float, ptr %22, align 4, !tbaa !22
  %387 = fdiv float 3.200000e+01, %386
  %388 = fadd float %385, %387
  %389 = fpext float %388 to double
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %28, double noundef %377, double noundef %383, double noundef %389)
  call void @llvm.lifetime.start.p0(i64 56, ptr %29) #7
  call void @_ZN5R3BoxC1ERK7R3PointS2_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %28)
  invoke void @_ZN6R3Grid28SetWorldToGridTransformationERK5R3Box(ptr noundef nonnull align 8 dereferenceable(592) %32, ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %390 unwind label %396

390:                                              ; preds = %353
  %391 = load ptr, ptr %6, align 8, !tbaa !5
  %392 = invoke i32 @fclose(ptr noundef %391)
          to label %393 unwind label %396

393:                                              ; preds = %390
  %394 = getelementptr inbounds %class.R3Grid, ptr %32, i32 0, i32 8
  %395 = load i32, ptr %394, align 4, !tbaa !19
  store i32 %395, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  br label %400

396:                                              ; preds = %390, %353
  %397 = landingpad { ptr, i32 }
          cleanup
  %398 = extractvalue { ptr, i32 } %397, 0
  store ptr %398, ptr %30, align 8
  %399 = extractvalue { ptr, i32 } %397, 1
  store i32 %399, ptr %31, align 4
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %417

400:                                              ; preds = %393, %348
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %401

401:                                              ; preds = %400, %333, %328, %322, %318
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %402

402:                                              ; preds = %401, %313
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #7
  br label %403

403:                                              ; preds = %402, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %404

404:                                              ; preds = %403, %299, %294
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %405

405:                                              ; preds = %404, %286, %281, %275
  call void @llvm.lifetime.end.p0(i64 128, ptr %20) #7
  br label %406

406:                                              ; preds = %405, %266, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %407

407:                                              ; preds = %406, %253, %240, %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %408

408:                                              ; preds = %407, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %409

409:                                              ; preds = %408, %129, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %410

410:                                              ; preds = %409, %108, %103, %97
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #7
  br label %411

411:                                              ; preds = %410, %90
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %412

412:                                              ; preds = %411, %81, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %413

413:                                              ; preds = %412, %68, %63, %57
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %414

414:                                              ; preds = %413, %48, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %415

415:                                              ; preds = %414, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %416 = load i32, ptr %3, align 4
  ret i32 %416

417:                                              ; preds = %396
  %418 = load ptr, ptr %30, align 8
  %419 = load i32, ptr %31, align 4
  %420 = insertvalue { ptr, i32 } poison, ptr %418, 0
  %421 = insertvalue { ptr, i32 } %420, i32 %419, 1
  resume { ptr, i32 } %421
}

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

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

declare i32 @fclose(ptr noundef) #2

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare void @_ZN5R3BoxC1ERK7R3PointS2_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 560}
!12 = !{!"_ZTS6R3Grid", !13, i64 0, !13, i64 272, !18, i64 544, !18, i64 552, !6, i64 560, !7, i64 568, !10, i64 580, !10, i64 584, !10, i64 588}
!13 = !{!"_ZTS8R3Affine", !14, i64 0, !15, i64 8, !15, i64 136, !16, i64 264}
!14 = !{!"_ZTS16R3Transformation"}
!15 = !{!"_ZTS8R4Matrix", !7, i64 0}
!16 = !{!"_ZTS7RNFlags", !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!12, !10, i64 588}
!20 = !{!12, !10, i64 580}
!21 = !{!12, !10, i64 584}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!18, !18, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !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"

%class.R3Point = type { [3 x double] }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.45 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [49 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6R3Grid28SetWorldToGridTransformationERK5R3Box(ptr noundef nonnull align 8 dereferenceable(592), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #3

declare void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6R3Grid14ReadDelphiFileEPKc(ptr noundef nonnull align 8 dereferenceable(592) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca [32 x i8], align 16
  %5 = alloca i32, align 4
  %6 = alloca [32 x i8], align 16
  %7 = alloca [64 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca [128 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca [3 x float], align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca %class.R3Point, align 8
  %18 = alloca %class.R3Point, align 8
  %19 = alloca %class.R3Box, align 8
  %20 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.45)
  %.not = icmp eq ptr %20, null
  br i1 %.not, label %21, label %22

21:                                               ; preds = %2
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.80, ptr noundef %1)
  br label %174

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %23 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %20)
  %.not93 = icmp eq i64 %23, 1
  br i1 %.not93, label %25, label %24

24:                                               ; preds = %22
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.81, ptr noundef %1)
  br label %173

25:                                               ; preds = %22
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %.not94 = icmp eq i32 %26, 20
  br i1 %.not94, label %28, label %27

27:                                               ; preds = %25
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.82, i32 noundef %26, ptr noundef %1)
  br label %173

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  %29 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 1, i64 noundef 20, ptr noundef nonnull %20)
  %.not95 = icmp eq i64 %29, 20
  br i1 %.not95, label %31, label %30

30:                                               ; preds = %28
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.83, ptr noundef %1)
  br label %172

31:                                               ; preds = %28
  %32 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %20)
  %.not96 = icmp eq i64 %32, 1
  br i1 %.not96, label %34, label %33

33:                                               ; preds = %31
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.81, ptr noundef %1)
  br label %172

34:                                               ; preds = %31
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %.not97 = icmp eq i32 %35, 20
  br i1 %.not97, label %37, label %36

36:                                               ; preds = %34
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.82, i32 noundef %35, ptr noundef %1)
  br label %172

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %38 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %20)
  %.not98 = icmp eq i64 %38, 1
  br i1 %.not98, label %40, label %39

39:                                               ; preds = %37
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.84, ptr noundef %1)
  br label %171

40:                                               ; preds = %37
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %.not99 = icmp eq i32 %41, 70
  br i1 %.not99, label %43, label %42

42:                                               ; preds = %40
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.85, i32 noundef %41, ptr noundef %1)
  br label %171

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %44 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 1, i64 noundef 10, ptr noundef nonnull %20)
  %.not100 = icmp eq i64 %44, 10
  br i1 %.not100, label %46, label %45

45:                                               ; preds = %43
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.86, ptr noundef %1)
  br label %170

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %47 = call i64 @fread(ptr noundef nonnull %7, i64 noundef 1, i64 noundef 60, ptr noundef nonnull %20)
  %.not101 = icmp eq i64 %47, 60
  br i1 %.not101, label %49, label %48

48:                                               ; preds = %46
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.87, ptr noundef %1)
  br label %169

49:                                               ; preds = %46
  %50 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %20)
  %.not102 = icmp eq i64 %50, 1
  br i1 %.not102, label %52, label %51

51:                                               ; preds = %49
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.84, ptr noundef %1)
  br label %169

52:                                               ; preds = %49
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %.not103 = icmp eq i32 %53, 70
  br i1 %.not103, label %55, label %54

54:                                               ; preds = %52
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.85, i32 noundef %53, ptr noundef %1)
  br label %169

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %56 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %20)
  %.not104 = icmp eq i64 %56, 1
  br i1 %.not104, label %58, label %57

57:                                               ; preds = %55
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.88, ptr noundef %1)
  br label %168

58:                                               ; preds = %55
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %.not105 = icmp eq i32 %59, 1098500
  br i1 %.not105, label %61, label %60

60:                                               ; preds = %58
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.89, i32 noundef %59, ptr noundef %1)
  br label %168

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %0, i64 560
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %.not106 = icmp eq ptr %63, null
  %64 = getelementptr inbounds i8, ptr %0, i64 588
  %65 = load i32, ptr %64, align 4
  %66 = icmp slt i32 %65, 274625
  %or.cond = select i1 %.not106, i1 true, i1 %66
  br i1 %or.cond, label %67, label %.lr.ph.preheader

67:                                               ; preds = %61
  br i1 %.not106, label %69, label %68

68:                                               ; preds = %67
  tail call void @_ZdaPv(ptr noundef nonnull %63) #8
  br label %69

69:                                               ; preds = %68, %67
  %70 = tail call noalias noundef nonnull dereferenceable(2197000) ptr @_Znam(i64 noundef 2197000) #9
  store ptr %70, ptr %62, align 8, !tbaa !9
  br label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %69, %61
  %71 = phi ptr [ %63, %61 ], [ %70, %69 ]
  %72 = getelementptr inbounds i8, ptr %0, i64 568
  store <4 x i32> <i32 65, i32 65, i32 65, i32 65>, ptr %72, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %0, i64 584
  store i32 4225, ptr %73, align 8, !tbaa !18
  store i32 274625, ptr %64, align 4, !tbaa !19
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %75
  %.078133 = phi i32 [ %79, %75 ], [ 0, %.lr.ph.preheader ]
  %.079132 = phi ptr [ %78, %75 ], [ %71, %.lr.ph.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %74 = call i64 @fread(ptr noundef nonnull %9, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not108 = icmp eq i64 %74, 1
  br i1 %.not108, label %75, label %81

75:                                               ; preds = %.lr.ph
  %76 = load float, ptr %9, align 4, !tbaa !20
  %77 = fpext float %76 to double
  %78 = getelementptr inbounds i8, ptr %.079132, i64 8
  store double %77, ptr %.079132, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %79 = add nuw nsw i32 %.078133, 1
  %80 = load i32, ptr %64, align 4, !tbaa !19
  %.not109 = icmp slt i32 %79, %80
  br i1 %.not109, label %.lr.ph, label %.critedge, !llvm.loop !23

81:                                               ; preds = %.lr.ph
  %82 = load i32, ptr %64, align 4, !tbaa !19
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.51, i32 noundef %.078133, i32 noundef %82)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %168

.critedge:                                        ; preds = %75
  %83 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not110 = icmp eq i64 %83, 1
  br i1 %.not110, label %85, label %84

84:                                               ; preds = %.critedge
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.88, ptr noundef %1)
  br label %168

85:                                               ; preds = %.critedge
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %.not111 = icmp eq i32 %86, 1098500
  br i1 %.not111, label %88, label %87

87:                                               ; preds = %85
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.89, i32 noundef %86, ptr noundef %1)
  br label %168

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %89 = call i64 @fread(ptr noundef nonnull %10, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not112 = icmp eq i64 %89, 1
  br i1 %.not112, label %91, label %90

90:                                               ; preds = %88
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.90, ptr noundef %1)
  br label %167

91:                                               ; preds = %88
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %.not113 = icmp eq i32 %92, 16
  br i1 %.not113, label %94, label %93

93:                                               ; preds = %91
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.91, i32 noundef %92, ptr noundef %1)
  br label %167

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %11) #7
  %95 = call i64 @fread(ptr noundef nonnull %11, i64 noundef 1, i64 noundef 16, ptr noundef %20)
  %.not114 = icmp eq i64 %95, 16
  br i1 %.not114, label %97, label %96

96:                                               ; preds = %94
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.92, ptr noundef %1)
  br label %166

97:                                               ; preds = %94
  %98 = call i64 @fread(ptr noundef nonnull %10, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not115 = icmp eq i64 %98, 1
  br i1 %.not115, label %100, label %99

99:                                               ; preds = %97
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.90, ptr noundef %1)
  br label %166

100:                                              ; preds = %97
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %.not116 = icmp eq i32 %101, 16
  br i1 %.not116, label %103, label %102

102:                                              ; preds = %100
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.91, i32 noundef %101, ptr noundef %1)
  br label %166

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %104 = call i64 @fread(ptr noundef nonnull %12, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not117 = icmp eq i64 %104, 1
  br i1 %.not117, label %106, label %105

105:                                              ; preds = %103
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.93, ptr noundef %1)
  br label %165

106:                                              ; preds = %103
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %.not118 = icmp eq i32 %107, 20
  br i1 %.not118, label %109, label %108

108:                                              ; preds = %106
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.94, i32 noundef %107, ptr noundef %1)
  br label %165

109:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %110 = call i64 @fread(ptr noundef nonnull %13, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not119 = icmp eq i64 %110, 1
  br i1 %.not119, label %112, label %111

111:                                              ; preds = %109
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.95)
  br label %164

112:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #7
  %113 = call i64 @fread(ptr noundef nonnull %14, i64 noundef 4, i64 noundef 3, ptr noundef %20)
  %.not120 = icmp eq i64 %113, 3
  br i1 %.not120, label %115, label %114

114:                                              ; preds = %112
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.96)
  br label %163

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %116 = call i64 @fread(ptr noundef nonnull %15, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not121 = icmp eq i64 %116, 1
  br i1 %.not121, label %118, label %117

117:                                              ; preds = %115
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.97)
  br label %162

118:                                              ; preds = %115
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %.not122 = icmp eq i32 %119, 65
  br i1 %.not122, label %121, label %120

120:                                              ; preds = %118
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.98, i32 noundef %119)
  br label %162

121:                                              ; preds = %118
  %122 = call i64 @fread(ptr noundef nonnull %12, i64 noundef 4, i64 noundef 1, ptr noundef %20)
  %.not123 = icmp eq i64 %122, 1
  br i1 %.not123, label %124, label %123

123:                                              ; preds = %121
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.93, ptr noundef %1)
  br label %162

124:                                              ; preds = %121
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %.not124 = icmp eq i32 %125, 20
  br i1 %.not124, label %127, label %126

126:                                              ; preds = %124
  tail call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.94, i32 noundef %125, ptr noundef %1)
  br label %162

127:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  br label %128

128:                                              ; preds = %128, %127
  %.077 = phi i32 [ 0, %127 ], [ %131, %128 ]
  %129 = call i64 @fread(ptr noundef nonnull %16, i64 noundef 1, i64 noundef 1, ptr noundef %20)
  %130 = icmp eq i64 %129, 1
  %131 = add nuw nsw i32 %.077, 1
  br i1 %130, label %128, label %132, !llvm.loop !25

132:                                              ; preds = %128
  %.not125 = icmp eq i32 %.077, 0
  br i1 %.not125, label %136, label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr @stderr, align 8, !tbaa !26
  %135 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef nonnull @.str.99, i32 noundef %.077, ptr noundef %1) #10
  br label %161

136:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #7
  %137 = load float, ptr %14, align 4, !tbaa !20
  %138 = load float, ptr %13, align 4, !tbaa !20
  %139 = fdiv float 3.200000e+01, %138
  %140 = fsub float %137, %139
  %141 = fpext float %140 to double
  %142 = getelementptr inbounds i8, ptr %14, i64 4
  %143 = load float, ptr %142, align 4, !tbaa !20
  %144 = fsub float %143, %139
  %145 = fpext float %144 to double
  %146 = getelementptr inbounds i8, ptr %14, i64 8
  %147 = load float, ptr %146, align 4, !tbaa !20
  %148 = fsub float %147, %139
  %149 = fpext float %148 to double
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef %141, double noundef %145, double noundef %149)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #7
  %150 = fadd float %137, %139
  %151 = fpext float %150 to double
  %152 = fadd float %143, %139
  %153 = fpext float %152 to double
  %154 = fadd float %139, %147
  %155 = fpext float %154 to double
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %18, double noundef %151, double noundef %153, double noundef %155)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %19) #7
  call void @_ZN5R3BoxC1ERK7R3PointS2_(ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %18)
  invoke void @_ZN6R3Grid28SetWorldToGridTransformationERK5R3Box(ptr noundef nonnull align 8 dereferenceable(592) %0, ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %156 unwind label %159

156:                                              ; preds = %136
  %157 = call i32 @fclose(ptr noundef %20)
  %158 = load i32, ptr %64, align 4, !tbaa !19
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #7
  br label %161

159:                                              ; preds = %136
  %160 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  resume { ptr, i32 } %160

161:                                              ; preds = %156, %133
  %.3 = phi i32 [ 0, %133 ], [ %158, %156 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  br label %162

162:                                              ; preds = %161, %126, %123, %120, %117
  %.4 = phi i32 [ 0, %117 ], [ 0, %120 ], [ 0, %123 ], [ 0, %126 ], [ %.3, %161 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %163

163:                                              ; preds = %162, %114
  %.5 = phi i32 [ 0, %114 ], [ %.4, %162 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  br label %164

164:                                              ; preds = %163, %111
  %.6 = phi i32 [ 0, %111 ], [ %.5, %163 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  br label %165

165:                                              ; preds = %164, %108, %105
  %.7 = phi i32 [ 0, %105 ], [ 0, %108 ], [ %.6, %164 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %166

166:                                              ; preds = %165, %102, %99, %96
  %.8 = phi i32 [ 0, %96 ], [ 0, %99 ], [ 0, %102 ], [ %.7, %165 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #7
  br label %167

167:                                              ; preds = %166, %93, %90
  %.9 = phi i32 [ 0, %90 ], [ 0, %93 ], [ %.8, %166 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %168

168:                                              ; preds = %81, %167, %87, %84, %60, %57
  %.12 = phi i32 [ 0, %57 ], [ 0, %60 ], [ 0, %84 ], [ 0, %87 ], [ %.9, %167 ], [ 0, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %169

169:                                              ; preds = %168, %54, %51, %48
  %.13 = phi i32 [ 0, %48 ], [ 0, %51 ], [ 0, %54 ], [ %.12, %168 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  br label %170

170:                                              ; preds = %169, %45
  %.14 = phi i32 [ 0, %45 ], [ %.13, %169 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %171

171:                                              ; preds = %170, %42, %39
  %.15 = phi i32 [ 0, %39 ], [ 0, %42 ], [ %.14, %170 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %172

172:                                              ; preds = %171, %36, %33, %30
  %.16 = phi i32 [ 0, %30 ], [ 0, %33 ], [ 0, %36 ], [ %.15, %171 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %173

173:                                              ; preds = %172, %27, %24
  %.17 = phi i32 [ 0, %24 ], [ 0, %27 ], [ %.16, %172 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %174

174:                                              ; preds = %173, %21
  %.18 = phi i32 [ %.17, %173 ], [ 0, %21 ]
  ret i32 %.18
}

declare void @_Z6RNFailPKcz(ptr noundef, ...) local_unnamed_addr #4

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

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

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

declare void @_ZN5R3BoxC1ERK7R3PointS2_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

attributes #0 = { nobuiltin allocsize(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 willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin 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 = { "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 = { 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 #6 = { 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 = { nounwind }
attributes #8 = { builtin nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !17, i64 560}
!10 = !{!"_ZTS6R3Grid", !11, i64 0, !11, i64 272, !16, i64 544, !16, i64 552, !17, i64 560, !7, i64 568, !6, i64 580, !6, i64 584, !6, i64 588}
!11 = !{!"_ZTS8R3Affine", !12, i64 0, !13, i64 8, !13, i64 136, !14, i64 264}
!12 = !{!"_ZTS16R3Transformation"}
!13 = !{!"_ZTS8R4Matrix", !7, i64 0}
!14 = !{!"_ZTS7RNFlags", !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!10, !6, i64 584}
!19 = !{!10, !6, i64 588}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = !{!16, !16, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!17, !17, i64 0}


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