; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_mesh)

; 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.RcsMeshData = type { i32, ptr, i32, ptr }

@Rcs_calloc = external global ptr, align 8
@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@.str = external hidden unnamed_addr constant [67 x i8], align 1
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@__func__.RcsMesh_readFromFile = external hidden unnamed_addr constant [21 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [52 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 i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

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

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

declare zeroext i1 @String_hasEnding(ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @RcsMesh_readObjFile(ptr noundef, ptr noundef) #3

declare double @String_toDouble_l(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @RcsMesh_readFromFile(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca [256 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call zeroext i1 @File_exists(ptr noundef %15)
  %17 = zext i1 %16 to i32
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %39

19:                                               ; preds = %2
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %24(i32 noundef 1, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 828, ptr noundef @.str.29, ptr noundef %25)
  br label %26

26:                                               ; preds = %23, %20
  %27 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %28 = icmp sle i32 1, %27
  br i1 %28, label %29, label %37

29:                                               ; preds = %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 828) #5
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.29, ptr noundef %33) #5
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.3) #5
  br label %37

37:                                               ; preds = %29, %26
  br label %38

38:                                               ; preds = %37
  store i1 false, ptr %3, align 1
  br label %495

39:                                               ; preds = %2
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call zeroext i1 @String_hasEnding(ptr noundef %40, ptr noundef @.str.10, i1 noundef zeroext false)
  %42 = zext i1 %41 to i32
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %149

44:                                               ; preds = %39
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.RcsMeshData, ptr %46, i32 0, i32 0
  %48 = call ptr @RcsMesh_readSTLFile(ptr noundef %45, ptr noundef %47)
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.RcsMeshData, ptr %49, i32 0, i32 1
  store ptr %48, ptr %50, align 8, !tbaa !11
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.RcsMeshData, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %75

55:                                               ; preds = %44
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %60(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 838, ptr noundef @.str.30, ptr noundef %61)
  br label %62

62:                                               ; preds = %59, %56
  %63 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %64 = icmp sle i32 4, %63
  br i1 %64, label %65, label %73

65:                                               ; preds = %62
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 838) #5
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.30, ptr noundef %69) #5
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.3) #5
  br label %73

73:                                               ; preds = %65, %62
  br label %74

74:                                               ; preds = %73
  store i1 false, ptr %3, align 1
  br label %495

75:                                               ; preds = %44
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.RcsMeshData, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !13
  %79 = udiv i32 %78, 3
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.RcsMeshData, ptr %80, i32 0, i32 2
  store i32 %79, ptr %81, align 8, !tbaa !14
  %82 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.RcsMeshData, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !14
  %86 = mul i32 3, %85
  %87 = zext i32 %86 to i64
  %88 = call ptr %82(i64 noundef %87, i64 noundef 4)
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.RcsMeshData, ptr %89, i32 0, i32 3
  store ptr %88, ptr %90, align 8, !tbaa !15
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.RcsMeshData, ptr %91, i32 0, i32 3
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = icmp eq ptr %93, null
  br i1 %94, label %95, label %128

95:                                               ; preds = %75
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %105

99:                                               ; preds = %96
  %100 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.RcsMeshData, ptr %101, i32 0, i32 2
  %103 = load i32, ptr %102, align 8, !tbaa !14
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %100(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 848, ptr noundef @.str.31, i32 noundef %103, ptr noundef %104)
  br label %105

105:                                              ; preds = %99, %96
  %106 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %107 = icmp sle i32 4, %106
  br i1 %107, label %108, label %119

108:                                              ; preds = %105
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 848) #5
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.RcsMeshData, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %113, align 8, !tbaa !14
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.31, i32 noundef %114, ptr noundef %115) #5
  %117 = load ptr, ptr @stderr, align 8, !tbaa !5
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str.3) #5
  br label %119

119:                                              ; preds = %108, %105
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.RcsMeshData, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  call void @free(ptr noundef %123) #5
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.RcsMeshData, ptr %124, i32 0, i32 0
  store i32 0, ptr %125, align 8, !tbaa !13
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.RcsMeshData, ptr %126, i32 0, i32 2
  store i32 0, ptr %127, align 8, !tbaa !14
  store i1 false, ptr %3, align 1
  br label %495

128:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %145, %128
  %130 = load i32, ptr %6, align 4, !tbaa !9
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.RcsMeshData, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 8, !tbaa !14
  %134 = mul i32 3, %133
  %135 = icmp ult i32 %130, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %148

137:                                              ; preds = %129
  %138 = load i32, ptr %6, align 4, !tbaa !9
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.RcsMeshData, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !15
  %142 = load i32, ptr %6, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  store i32 %138, ptr %144, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %137
  %146 = load i32, ptr %6, align 4, !tbaa !9
  %147 = add i32 %146, 1
  store i32 %147, ptr %6, align 4, !tbaa !9
  br label %129, !llvm.loop !16

148:                                              ; preds = %136
  store i1 true, ptr %3, align 1
  br label %495

149:                                              ; preds = %39
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = call zeroext i1 @String_hasEnding(ptr noundef %150, ptr noundef @.str.12, i1 noundef zeroext false)
  %152 = zext i1 %151 to i32
  %153 = icmp eq i32 %152, 1
  br i1 %153, label %154, label %483

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = call noalias ptr @fopen(ptr noundef %155, ptr noundef @.str.32)
  store ptr %156, ptr %7, align 8, !tbaa !5
  br label %157

157:                                              ; preds = %154
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = icmp ne ptr %158, null
  br i1 %159, label %163, label %160

160:                                              ; preds = %157
  %161 = load ptr, ptr @stderr, align 8, !tbaa !5
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.33, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 865, ptr noundef @.str.34) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

163:                                              ; preds = %157
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.RcsMeshData, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.RcsMeshData, ptr %170, i32 0, i32 2
  %172 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %166, ptr noundef @.str.35, ptr noundef %167, ptr noundef %169, ptr noundef %171)
  store i32 %172, ptr %9, align 4, !tbaa !9
  %173 = load i32, ptr %9, align 4, !tbaa !9
  %174 = icmp slt i32 %173, 3
  br i1 %174, label %175, label %202

175:                                              ; preds = %165
  br label %176

176:                                              ; preds = %175
  %177 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %182

179:                                              ; preds = %176
  %180 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %181 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) %180(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 872, ptr noundef @.str.36, i32 noundef %181)
  br label %182

182:                                              ; preds = %179, %176
  %183 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %184 = icmp sle i32 4, %183
  br i1 %184, label %185, label %193

185:                                              ; preds = %182
  %186 = load ptr, ptr @stderr, align 8, !tbaa !5
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %186, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 872) #5
  %188 = load ptr, ptr @stderr, align 8, !tbaa !5
  %189 = load i32, ptr %9, align 4, !tbaa !9
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.36, i32 noundef %189) #5
  %191 = load ptr, ptr @stderr, align 8, !tbaa !5
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.3) #5
  br label %193

193:                                              ; preds = %185, %182
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.RcsMeshData, ptr %196, i32 0, i32 0
  store i32 0, ptr %197, align 8, !tbaa !13
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.RcsMeshData, ptr %198, i32 0, i32 2
  store i32 0, ptr %199, align 8, !tbaa !14
  %200 = load ptr, ptr %7, align 8, !tbaa !5
  %201 = call i32 @fclose(ptr noundef %200)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %482

202:                                              ; preds = %165
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.RcsMeshData, ptr %203, i32 0, i32 0
  %205 = load i32, ptr %204, align 8, !tbaa !13
  %206 = icmp uge i32 %205, 1431655765
  br i1 %206, label %212, label %207

207:                                              ; preds = %202
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.RcsMeshData, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %209, align 8, !tbaa !14
  %211 = icmp uge i32 %210, 1431655765
  br i1 %211, label %212, label %251

212:                                              ; preds = %207, %202
  br label %213

213:                                              ; preds = %212
  %214 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %215 = icmp ne ptr %214, null
  br i1 %215, label %216, label %225

216:                                              ; preds = %213
  %217 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.RcsMeshData, ptr %218, i32 0, i32 0
  %220 = load i32, ptr %219, align 8, !tbaa !13
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.RcsMeshData, ptr %221, i32 0, i32 2
  %223 = load i32, ptr %222, align 8, !tbaa !14
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %217(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 882, ptr noundef @.str.37, i32 noundef %220, i32 noundef %223, i32 noundef 1431655765, ptr noundef %224)
  br label %225

225:                                              ; preds = %216, %213
  %226 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %227 = icmp sle i32 4, %226
  br i1 %227, label %228, label %242

228:                                              ; preds = %225
  %229 = load ptr, ptr @stderr, align 8, !tbaa !5
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 882) #5
  %231 = load ptr, ptr @stderr, align 8, !tbaa !5
  %232 = load ptr, ptr %5, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.RcsMeshData, ptr %232, i32 0, i32 0
  %234 = load i32, ptr %233, align 8, !tbaa !13
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.RcsMeshData, ptr %235, i32 0, i32 2
  %237 = load i32, ptr %236, align 8, !tbaa !14
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %231, ptr noundef @.str.37, i32 noundef %234, i32 noundef %237, i32 noundef 1431655765, ptr noundef %238) #5
  %240 = load ptr, ptr @stderr, align 8, !tbaa !5
  %241 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %240, ptr noundef @.str.3) #5
  br label %242

242:                                              ; preds = %228, %225
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.RcsMeshData, ptr %245, i32 0, i32 0
  store i32 0, ptr %246, align 8, !tbaa !13
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.RcsMeshData, ptr %247, i32 0, i32 2
  store i32 0, ptr %248, align 8, !tbaa !14
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = call i32 @fclose(ptr noundef %249)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %482

251:                                              ; preds = %207
  %252 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %253 = load ptr, ptr %5, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.RcsMeshData, ptr %253, i32 0, i32 0
  %255 = load i32, ptr %254, align 8, !tbaa !13
  %256 = mul i32 3, %255
  %257 = zext i32 %256 to i64
  %258 = call ptr %252(i64 noundef %257, i64 noundef 8)
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.RcsMeshData, ptr %259, i32 0, i32 1
  store ptr %258, ptr %260, align 8, !tbaa !11
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.RcsMeshData, ptr %261, i32 0, i32 1
  %263 = load ptr, ptr %262, align 8, !tbaa !11
  %264 = icmp eq ptr %263, null
  br i1 %264, label %265, label %298

265:                                              ; preds = %251
  br label %266

266:                                              ; preds = %265
  %267 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %268 = icmp ne ptr %267, null
  br i1 %268, label %269, label %275

269:                                              ; preds = %266
  %270 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %271 = load ptr, ptr %5, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.RcsMeshData, ptr %271, i32 0, i32 0
  %273 = load i32, ptr %272, align 8, !tbaa !13
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %270(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 897, ptr noundef @.str.38, i32 noundef %273, ptr noundef %274)
  br label %275

275:                                              ; preds = %269, %266
  %276 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %277 = icmp sle i32 4, %276
  br i1 %277, label %278, label %289

278:                                              ; preds = %275
  %279 = load ptr, ptr @stderr, align 8, !tbaa !5
  %280 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %279, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 897) #5
  %281 = load ptr, ptr @stderr, align 8, !tbaa !5
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.RcsMeshData, ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 8, !tbaa !13
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %281, ptr noundef @.str.38, i32 noundef %284, ptr noundef %285) #5
  %287 = load ptr, ptr @stderr, align 8, !tbaa !5
  %288 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %287, ptr noundef @.str.3) #5
  br label %289

289:                                              ; preds = %278, %275
  br label %290

290:                                              ; preds = %289
  br label %291

291:                                              ; preds = %290
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.RcsMeshData, ptr %292, i32 0, i32 0
  store i32 0, ptr %293, align 8, !tbaa !13
  %294 = load ptr, ptr %5, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.RcsMeshData, ptr %294, i32 0, i32 2
  store i32 0, ptr %295, align 8, !tbaa !14
  %296 = load ptr, ptr %7, align 8, !tbaa !5
  %297 = call i32 @fclose(ptr noundef %296)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %482

298:                                              ; preds = %251
  %299 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.RcsMeshData, ptr %300, i32 0, i32 2
  %302 = load i32, ptr %301, align 8, !tbaa !14
  %303 = mul i32 3, %302
  %304 = zext i32 %303 to i64
  %305 = call ptr %299(i64 noundef %304, i64 noundef 4)
  %306 = load ptr, ptr %5, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.RcsMeshData, ptr %306, i32 0, i32 3
  store ptr %305, ptr %307, align 8, !tbaa !15
  %308 = load ptr, ptr %5, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.RcsMeshData, ptr %308, i32 0, i32 3
  %310 = load ptr, ptr %309, align 8, !tbaa !15
  %311 = icmp eq ptr %310, null
  br i1 %311, label %312, label %348

312:                                              ; preds = %298
  br label %313

313:                                              ; preds = %312
  %314 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %315 = icmp ne ptr %314, null
  br i1 %315, label %316, label %322

316:                                              ; preds = %313
  %317 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %318 = load ptr, ptr %5, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.RcsMeshData, ptr %318, i32 0, i32 2
  %320 = load i32, ptr %319, align 8, !tbaa !14
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %317(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 909, ptr noundef @.str.39, i32 noundef %320, ptr noundef %321)
  br label %322

322:                                              ; preds = %316, %313
  %323 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %324 = icmp sle i32 4, %323
  br i1 %324, label %325, label %336

325:                                              ; preds = %322
  %326 = load ptr, ptr @stderr, align 8, !tbaa !5
  %327 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %326, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 909) #5
  %328 = load ptr, ptr @stderr, align 8, !tbaa !5
  %329 = load ptr, ptr %5, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.RcsMeshData, ptr %329, i32 0, i32 2
  %331 = load i32, ptr %330, align 8, !tbaa !14
  %332 = load ptr, ptr %4, align 8, !tbaa !5
  %333 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %328, ptr noundef @.str.39, i32 noundef %331, ptr noundef %332) #5
  %334 = load ptr, ptr @stderr, align 8, !tbaa !5
  %335 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %334, ptr noundef @.str.3) #5
  br label %336

336:                                              ; preds = %325, %322
  br label %337

337:                                              ; preds = %336
  br label %338

338:                                              ; preds = %337
  %339 = load ptr, ptr %5, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.RcsMeshData, ptr %339, i32 0, i32 3
  %341 = load ptr, ptr %340, align 8, !tbaa !15
  call void @free(ptr noundef %341) #5
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.RcsMeshData, ptr %342, i32 0, i32 0
  store i32 0, ptr %343, align 8, !tbaa !13
  %344 = load ptr, ptr %5, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.RcsMeshData, ptr %344, i32 0, i32 2
  store i32 0, ptr %345, align 8, !tbaa !14
  %346 = load ptr, ptr %7, align 8, !tbaa !5
  %347 = call i32 @fclose(ptr noundef %346)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %482

348:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %349

349:                                              ; preds = %410, %348
  %350 = load i32, ptr %11, align 4, !tbaa !9
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.RcsMeshData, ptr %351, i32 0, i32 0
  %353 = load i32, ptr %352, align 8, !tbaa !13
  %354 = mul i32 3, %353
  %355 = icmp ult i32 %350, %354
  br i1 %355, label %357, label %356

356:                                              ; preds = %349
  store i32 21, ptr %10, align 4
  br label %413

357:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %358 = load ptr, ptr %7, align 8, !tbaa !5
  %359 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %360 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %358, ptr noundef @.str.40, ptr noundef %359)
  store i32 %360, ptr %12, align 4, !tbaa !9
  %361 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %362 = call double @String_toDouble_l(ptr noundef %361)
  %363 = load ptr, ptr %5, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.RcsMeshData, ptr %363, i32 0, i32 1
  %365 = load ptr, ptr %364, align 8, !tbaa !11
  %366 = load i32, ptr %11, align 4, !tbaa !9
  %367 = zext i32 %366 to i64
  %368 = getelementptr inbounds double, ptr %365, i64 %367
  store double %362, ptr %368, align 8, !tbaa !18
  %369 = load i32, ptr %12, align 4, !tbaa !9
  %370 = icmp slt i32 %369, 1
  br i1 %370, label %371, label %406

371:                                              ; preds = %357
  br label %372

372:                                              ; preds = %371
  %373 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %374 = icmp ne ptr %373, null
  br i1 %374, label %375, label %379

375:                                              ; preds = %372
  %376 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %377 = load i32, ptr %11, align 4, !tbaa !9
  %378 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %376(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 926, ptr noundef @.str.41, i32 noundef %377, ptr noundef %378)
  br label %379

379:                                              ; preds = %375, %372
  %380 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %381 = icmp sle i32 4, %380
  br i1 %381, label %382, label %391

382:                                              ; preds = %379
  %383 = load ptr, ptr @stderr, align 8, !tbaa !5
  %384 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %383, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 926) #5
  %385 = load ptr, ptr @stderr, align 8, !tbaa !5
  %386 = load i32, ptr %11, align 4, !tbaa !9
  %387 = load ptr, ptr %4, align 8, !tbaa !5
  %388 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %385, ptr noundef @.str.41, i32 noundef %386, ptr noundef %387) #5
  %389 = load ptr, ptr @stderr, align 8, !tbaa !5
  %390 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %389, ptr noundef @.str.3) #5
  br label %391

391:                                              ; preds = %382, %379
  br label %392

392:                                              ; preds = %391
  br label %393

393:                                              ; preds = %392
  %394 = load ptr, ptr %5, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.RcsMeshData, ptr %394, i32 0, i32 1
  %396 = load ptr, ptr %395, align 8, !tbaa !11
  call void @free(ptr noundef %396) #5
  %397 = load ptr, ptr %5, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.RcsMeshData, ptr %397, i32 0, i32 3
  %399 = load ptr, ptr %398, align 8, !tbaa !15
  call void @free(ptr noundef %399) #5
  %400 = load ptr, ptr %5, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.RcsMeshData, ptr %400, i32 0, i32 0
  store i32 0, ptr %401, align 8, !tbaa !13
  %402 = load ptr, ptr %5, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct.RcsMeshData, ptr %402, i32 0, i32 2
  store i32 0, ptr %403, align 8, !tbaa !14
  %404 = load ptr, ptr %7, align 8, !tbaa !5
  %405 = call i32 @fclose(ptr noundef %404)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %407

406:                                              ; preds = %357
  store i32 0, ptr %10, align 4
  br label %407

407:                                              ; preds = %406, %393
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %408 = load i32, ptr %10, align 4
  switch i32 %408, label %413 [
    i32 0, label %409
  ]

409:                                              ; preds = %407
  br label %410

410:                                              ; preds = %409
  %411 = load i32, ptr %11, align 4, !tbaa !9
  %412 = add i32 %411, 1
  store i32 %412, ptr %11, align 4, !tbaa !9
  br label %349, !llvm.loop !20

413:                                              ; preds = %407, %356
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %414 = load i32, ptr %10, align 4
  switch i32 %414, label %482 [
    i32 21, label %415
  ]

415:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %416

416:                                              ; preds = %474, %415
  %417 = load i32, ptr %13, align 4, !tbaa !9
  %418 = load ptr, ptr %5, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.RcsMeshData, ptr %418, i32 0, i32 2
  %420 = load i32, ptr %419, align 8, !tbaa !14
  %421 = mul i32 3, %420
  %422 = icmp ult i32 %417, %421
  br i1 %422, label %424, label %423

423:                                              ; preds = %416
  store i32 26, ptr %10, align 4
  br label %477

424:                                              ; preds = %416
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %425 = load ptr, ptr %7, align 8, !tbaa !5
  %426 = load ptr, ptr %5, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.RcsMeshData, ptr %426, i32 0, i32 3
  %428 = load ptr, ptr %427, align 8, !tbaa !15
  %429 = load i32, ptr %13, align 4, !tbaa !9
  %430 = zext i32 %429 to i64
  %431 = getelementptr inbounds i32, ptr %428, i64 %430
  %432 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %425, ptr noundef @.str.42, ptr noundef %431)
  store i32 %432, ptr %14, align 4, !tbaa !9
  %433 = load i32, ptr %14, align 4, !tbaa !9
  %434 = icmp slt i32 %433, 1
  br i1 %434, label %435, label %470

435:                                              ; preds = %424
  br label %436

436:                                              ; preds = %435
  %437 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %438 = icmp ne ptr %437, null
  br i1 %438, label %439, label %443

439:                                              ; preds = %436
  %440 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %441 = load i32, ptr %13, align 4, !tbaa !9
  %442 = load ptr, ptr %4, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %440(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 944, ptr noundef @.str.43, i32 noundef %441, ptr noundef %442)
  br label %443

443:                                              ; preds = %439, %436
  %444 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %445 = icmp sle i32 4, %444
  br i1 %445, label %446, label %455

446:                                              ; preds = %443
  %447 = load ptr, ptr @stderr, align 8, !tbaa !5
  %448 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %447, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_readFromFile, i32 noundef 944) #5
  %449 = load ptr, ptr @stderr, align 8, !tbaa !5
  %450 = load i32, ptr %13, align 4, !tbaa !9
  %451 = load ptr, ptr %4, align 8, !tbaa !5
  %452 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %449, ptr noundef @.str.43, i32 noundef %450, ptr noundef %451) #5
  %453 = load ptr, ptr @stderr, align 8, !tbaa !5
  %454 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %453, ptr noundef @.str.3) #5
  br label %455

455:                                              ; preds = %446, %443
  br label %456

456:                                              ; preds = %455
  br label %457

457:                                              ; preds = %456
  %458 = load ptr, ptr %5, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.RcsMeshData, ptr %458, i32 0, i32 1
  %460 = load ptr, ptr %459, align 8, !tbaa !11
  call void @free(ptr noundef %460) #5
  %461 = load ptr, ptr %5, align 8, !tbaa !5
  %462 = getelementptr inbounds %struct.RcsMeshData, ptr %461, i32 0, i32 3
  %463 = load ptr, ptr %462, align 8, !tbaa !15
  call void @free(ptr noundef %463) #5
  %464 = load ptr, ptr %5, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.RcsMeshData, ptr %464, i32 0, i32 0
  store i32 0, ptr %465, align 8, !tbaa !13
  %466 = load ptr, ptr %5, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.RcsMeshData, ptr %466, i32 0, i32 2
  store i32 0, ptr %467, align 8, !tbaa !14
  %468 = load ptr, ptr %7, align 8, !tbaa !5
  %469 = call i32 @fclose(ptr noundef %468)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %471

470:                                              ; preds = %424
  store i32 0, ptr %10, align 4
  br label %471

471:                                              ; preds = %470, %457
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %472 = load i32, ptr %10, align 4
  switch i32 %472, label %477 [
    i32 0, label %473
  ]

473:                                              ; preds = %471
  br label %474

474:                                              ; preds = %473
  %475 = load i32, ptr %13, align 4, !tbaa !9
  %476 = add i32 %475, 1
  store i32 %476, ptr %13, align 4, !tbaa !9
  br label %416, !llvm.loop !21

477:                                              ; preds = %471, %423
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %478 = load i32, ptr %10, align 4
  switch i32 %478, label %482 [
    i32 26, label %479
  ]

479:                                              ; preds = %477
  %480 = load ptr, ptr %7, align 8, !tbaa !5
  %481 = call i32 @fclose(ptr noundef %480)
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %482

482:                                              ; preds = %479, %477, %413, %338, %291, %244, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %495

483:                                              ; preds = %149
  %484 = load ptr, ptr %4, align 8, !tbaa !5
  %485 = call zeroext i1 @String_hasEnding(ptr noundef %484, ptr noundef @.str.11, i1 noundef zeroext false)
  %486 = zext i1 %485 to i32
  %487 = icmp eq i32 %486, 1
  br i1 %487, label %488, label %492

488:                                              ; preds = %483
  %489 = load ptr, ptr %4, align 8, !tbaa !5
  %490 = load ptr, ptr %5, align 8, !tbaa !5
  %491 = call zeroext i1 @RcsMesh_readObjFile(ptr noundef %489, ptr noundef %490)
  store i1 %491, ptr %3, align 1
  br label %495

492:                                              ; preds = %483
  br label %493

493:                                              ; preds = %492
  br label %494

494:                                              ; preds = %493
  store i1 false, ptr %3, align 1
  br label %495

495:                                              ; preds = %494, %488, %482, %148, %120, %74, %38
  %496 = load i1, ptr %3, align 1
  ret i1 %496
}

declare zeroext i1 @File_exists(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @RcsMesh_readSTLFile(ptr noundef, ptr noundef) #3

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #4

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

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 = { "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 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 #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !6, i64 24}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


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

@Rcs_calloc = external local_unnamed_addr global ptr, align 8
@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [67 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@__func__.RcsMesh_readFromFile = external hidden unnamed_addr constant [21 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [52 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
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

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

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

declare zeroext i1 @String_hasEnding(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @RcsMesh_readObjFile(ptr noundef, ptr noundef) local_unnamed_addr #4

declare double @String_toDouble_l(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @RcsMesh_readFromFile(ptr noundef %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = alloca [256 x i8], align 16
  %4 = tail call zeroext i1 @File_exists(ptr noundef %0) #6
  br i1 %4, label %18, label %5

5:                                                ; preds = %2
  %6 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not144 = icmp eq ptr %6, null
  br i1 %.not144, label %8, label %7

7:                                                ; preds = %5
  tail call void (i32, ptr, ptr, i32, ptr, ...) %6(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 828, ptr noundef nonnull @.str.29, ptr noundef %0) #6
  br label %8

8:                                                ; preds = %7, %5
  %9 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %11, label %.loopexit

11:                                               ; preds = %8
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 828) #7
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.29, ptr noundef %0) #7
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.3) #7
  br label %.loopexit

18:                                               ; preds = %2
  %19 = tail call zeroext i1 @String_hasEnding(ptr noundef %0, ptr noundef nonnull @.str.10, i1 noundef zeroext false) #6
  br i1 %19, label %20, label %71

20:                                               ; preds = %18
  %21 = tail call ptr @RcsMesh_readSTLFile(ptr noundef %0, ptr noundef %1)
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr %21, ptr %22, align 8, !tbaa !11
  %23 = icmp eq ptr %21, null
  br i1 %23, label %24, label %37

24:                                               ; preds = %20
  %25 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not143 = icmp eq ptr %25, null
  br i1 %.not143, label %27, label %26

26:                                               ; preds = %24
  tail call void (i32, ptr, ptr, i32, ptr, ...) %25(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 838, ptr noundef nonnull @.str.30, ptr noundef %0) #6
  br label %27

27:                                               ; preds = %26, %24
  %28 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %29 = icmp sgt i32 %28, 3
  br i1 %29, label %30, label %.loopexit

30:                                               ; preds = %27
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 838) #7
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.30, ptr noundef %0) #7
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.3) #7
  br label %.loopexit

37:                                               ; preds = %20
  %38 = load i32, ptr %1, align 8, !tbaa !13
  %39 = udiv i32 %38, 3
  %40 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 %39, ptr %40, align 8, !tbaa !14
  %41 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %42 = mul nuw i32 %39, 3
  %43 = zext i32 %42 to i64
  %44 = tail call ptr %41(i64 noundef %43, i64 noundef 4) #6
  %45 = getelementptr inbounds i8, ptr %1, i64 24
  store ptr %44, ptr %45, align 8, !tbaa !15
  %46 = icmp eq ptr %44, null
  br i1 %46, label %48, label %.preheader

.preheader:                                       ; preds = %37
  %47 = load i32, ptr %40, align 8, !tbaa !14
  %.not161 = icmp eq i32 %47, 0
  br i1 %.not161, label %.loopexit, label %.lr.ph160

48:                                               ; preds = %37
  %49 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not142 = icmp eq ptr %49, null
  br i1 %.not142, label %52, label %50

50:                                               ; preds = %48
  %51 = load i32, ptr %40, align 8, !tbaa !14
  tail call void (i32, ptr, ptr, i32, ptr, ...) %49(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 848, ptr noundef nonnull @.str.31, i32 noundef %51, ptr noundef %0) #6
  br label %52

52:                                               ; preds = %50, %48
  %53 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %54 = icmp sgt i32 %53, 3
  br i1 %54, label %55, label %63

55:                                               ; preds = %52
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 848) #7
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = load i32, ptr %40, align 8, !tbaa !14
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.31, i32 noundef %59, ptr noundef %0) #7
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.3) #7
  br label %63

63:                                               ; preds = %52, %55
  %64 = load ptr, ptr %22, align 8, !tbaa !11
  tail call void @free(ptr noundef %64) #6
  store i32 0, ptr %1, align 8, !tbaa !13
  store i32 0, ptr %40, align 8, !tbaa !14
  br label %.loopexit

.lr.ph160:                                        ; preds = %.preheader, %.lr.ph160
  %indvars.iv168 = phi i64 [ %indvars.iv.next169, %.lr.ph160 ], [ 0, %.preheader ]
  %65 = getelementptr inbounds i32, ptr %44, i64 %indvars.iv168
  %66 = trunc nuw i64 %indvars.iv168 to i32
  store i32 %66, ptr %65, align 4, !tbaa !9
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %67 = load i32, ptr %40, align 8, !tbaa !14
  %68 = mul i32 %67, 3
  %69 = zext i32 %68 to i64
  %70 = icmp ult i64 %indvars.iv.next169, %69
  br i1 %70, label %.lr.ph160, label %.loopexit, !llvm.loop !16

71:                                               ; preds = %18
  %72 = tail call zeroext i1 @String_hasEnding(ptr noundef %0, ptr noundef nonnull @.str.12, i1 noundef zeroext false) #6
  br i1 %72, label %73, label %216

73:                                               ; preds = %71
  %74 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.32)
  %.not = icmp eq ptr %74, null
  br i1 %.not, label %75, label %78

75:                                               ; preds = %73
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 865, ptr noundef nonnull @.str.34) #7
  tail call void @print_trace() #6
  tail call void @abort() #8
  unreachable

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #6
  %79 = getelementptr inbounds i8, ptr %1, i64 16
  %80 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %74, ptr noundef nonnull @.str.35, ptr noundef nonnull %3, ptr noundef %1, ptr noundef nonnull %79) #6
  %81 = icmp slt i32 %80, 3
  br i1 %81, label %82, label %95

82:                                               ; preds = %78
  %83 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not141 = icmp eq ptr %83, null
  br i1 %.not141, label %85, label %84

84:                                               ; preds = %82
  call void (i32, ptr, ptr, i32, ptr, ...) %83(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 872, ptr noundef nonnull @.str.36, i32 noundef %80) #6
  br label %85

85:                                               ; preds = %84, %82
  %86 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %87 = icmp sgt i32 %86, 3
  br i1 %87, label %88, label %.critedge150.sink.split

88:                                               ; preds = %85
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 872) #7
  %91 = load ptr, ptr @stderr, align 8, !tbaa !5
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.36, i32 noundef %80) #7
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.3) #7
  br label %.critedge150.sink.split

95:                                               ; preds = %78
  %96 = load i32, ptr %1, align 8, !tbaa !13
  %97 = icmp ugt i32 %96, 1431655764
  br i1 %97, label %101, label %98

98:                                               ; preds = %95
  %99 = load i32, ptr %79, align 8, !tbaa !14
  %100 = icmp ugt i32 %99, 1431655764
  br i1 %100, label %101, label %117

101:                                              ; preds = %95, %98
  %102 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not140 = icmp eq ptr %102, null
  br i1 %.not140, label %105, label %103

103:                                              ; preds = %101
  %104 = load i32, ptr %79, align 8, !tbaa !14
  call void (i32, ptr, ptr, i32, ptr, ...) %102(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 882, ptr noundef nonnull @.str.37, i32 noundef %96, i32 noundef %104, i32 noundef 1431655765, ptr noundef %0) #6
  br label %105

105:                                              ; preds = %103, %101
  %106 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %107 = icmp sgt i32 %106, 3
  br i1 %107, label %108, label %.critedge150.sink.split

108:                                              ; preds = %105
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 882) #7
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = load i32, ptr %1, align 8, !tbaa !13
  %113 = load i32, ptr %79, align 8, !tbaa !14
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef nonnull @.str.37, i32 noundef %112, i32 noundef %113, i32 noundef 1431655765, ptr noundef %0) #7
  %115 = load ptr, ptr @stderr, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef nonnull @.str.3) #7
  br label %.critedge150.sink.split

117:                                              ; preds = %98
  %118 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %119 = mul nuw i32 %96, 3
  %120 = zext i32 %119 to i64
  %121 = call ptr %118(i64 noundef %120, i64 noundef 8) #6
  %122 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr %121, ptr %122, align 8, !tbaa !11
  %123 = icmp eq ptr %121, null
  br i1 %123, label %124, label %139

124:                                              ; preds = %117
  %125 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not139 = icmp eq ptr %125, null
  br i1 %.not139, label %128, label %126

126:                                              ; preds = %124
  %127 = load i32, ptr %1, align 8, !tbaa !13
  call void (i32, ptr, ptr, i32, ptr, ...) %125(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 897, ptr noundef nonnull @.str.38, i32 noundef %127, ptr noundef %0) #6
  br label %128

128:                                              ; preds = %126, %124
  %129 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %130 = icmp sgt i32 %129, 3
  br i1 %130, label %131, label %.critedge150.sink.split

131:                                              ; preds = %128
  %132 = load ptr, ptr @stderr, align 8, !tbaa !5
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 897) #7
  %134 = load ptr, ptr @stderr, align 8, !tbaa !5
  %135 = load i32, ptr %1, align 8, !tbaa !13
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef nonnull @.str.38, i32 noundef %135, ptr noundef %0) #7
  %137 = load ptr, ptr @stderr, align 8, !tbaa !5
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef nonnull @.str.3) #7
  br label %.critedge150.sink.split

139:                                              ; preds = %117
  %140 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %141 = load i32, ptr %79, align 8, !tbaa !14
  %142 = mul i32 %141, 3
  %143 = zext i32 %142 to i64
  %144 = call ptr %140(i64 noundef %143, i64 noundef 4) #6
  %145 = getelementptr inbounds i8, ptr %1, i64 24
  store ptr %144, ptr %145, align 8, !tbaa !15
  %146 = icmp eq ptr %144, null
  br i1 %146, label %148, label %.preheader151

.preheader151:                                    ; preds = %139
  %147 = load i32, ptr %1, align 8, !tbaa !13
  %.not135154.not = icmp eq i32 %147, 0
  br i1 %.not135154.not, label %.critedge146.preheader, label %.lr.ph

148:                                              ; preds = %139
  %149 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not138 = icmp eq ptr %149, null
  br i1 %.not138, label %152, label %150

150:                                              ; preds = %148
  %151 = load i32, ptr %79, align 8, !tbaa !14
  call void (i32, ptr, ptr, i32, ptr, ...) %149(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 909, ptr noundef nonnull @.str.39, i32 noundef %151, ptr noundef %0) #6
  br label %152

152:                                              ; preds = %150, %148
  %153 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %154 = icmp sgt i32 %153, 3
  br i1 %154, label %155, label %163

155:                                              ; preds = %152
  %156 = load ptr, ptr @stderr, align 8, !tbaa !5
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 909) #7
  %158 = load ptr, ptr @stderr, align 8, !tbaa !5
  %159 = load i32, ptr %79, align 8, !tbaa !14
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef nonnull @.str.39, i32 noundef %159, ptr noundef %0) #7
  %161 = load ptr, ptr @stderr, align 8, !tbaa !5
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef nonnull @.str.3) #7
  br label %163

163:                                              ; preds = %155, %152
  %164 = load ptr, ptr %145, align 8, !tbaa !15
  call void @free(ptr noundef %164) #6
  br label %.critedge150.sink.split

.critedge146.preheader:                           ; preds = %.critedge, %.preheader151
  %165 = load i32, ptr %79, align 8, !tbaa !14
  %.not137156.not = icmp eq i32 %165, 0
  br i1 %.not137156.not, label %.critedge150, label %.lr.ph158

.lr.ph:                                           ; preds = %.preheader151, %.critedge
  %indvars.iv = phi i64 [ %indvars.iv.next, %.critedge ], [ 0, %.preheader151 ]
  %166 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %74, ptr noundef nonnull @.str.40, ptr noundef nonnull %3) #6
  %167 = call double @String_toDouble_l(ptr noundef nonnull %3) #6
  %168 = load ptr, ptr %122, align 8, !tbaa !11
  %169 = getelementptr inbounds double, ptr %168, i64 %indvars.iv
  store double %167, ptr %169, align 8, !tbaa !18
  %170 = icmp sgt i32 %166, 0
  br i1 %170, label %.critedge, label %171

171:                                              ; preds = %.lr.ph
  %172 = trunc nuw i64 %indvars.iv to i32
  %173 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not134 = icmp eq ptr %173, null
  br i1 %.not134, label %175, label %174

174:                                              ; preds = %171
  call void (i32, ptr, ptr, i32, ptr, ...) %173(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 926, ptr noundef nonnull @.str.41, i32 noundef %172, ptr noundef %0) #6
  br label %175

175:                                              ; preds = %174, %171
  %176 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %177 = icmp sgt i32 %176, 3
  br i1 %177, label %178, label %188

178:                                              ; preds = %175
  %179 = load ptr, ptr @stderr, align 8, !tbaa !5
  %180 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %179, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 926) #7
  %181 = load ptr, ptr @stderr, align 8, !tbaa !5
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef nonnull @.str.41, i32 noundef %172, ptr noundef %0) #7
  %183 = load ptr, ptr @stderr, align 8, !tbaa !5
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef nonnull @.str.3) #7
  br label %188

.critedge:                                        ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %185 = load i32, ptr %1, align 8, !tbaa !13
  %186 = mul i32 %185, 3
  %187 = zext i32 %186 to i64
  %.not135 = icmp ult i64 %indvars.iv.next, %187
  br i1 %.not135, label %.lr.ph, label %.critedge146.preheader, !llvm.loop !20

188:                                              ; preds = %175, %178
  %189 = load ptr, ptr %122, align 8, !tbaa !11
  call void @free(ptr noundef %189) #6
  %190 = load ptr, ptr %145, align 8, !tbaa !15
  call void @free(ptr noundef %190) #6
  br label %.critedge150.sink.split

.lr.ph158:                                        ; preds = %.critedge146.preheader, %.critedge148
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %.critedge148 ], [ 0, %.critedge146.preheader ]
  %191 = load ptr, ptr %145, align 8, !tbaa !15
  %192 = getelementptr inbounds i32, ptr %191, i64 %indvars.iv165
  %193 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %74, ptr noundef nonnull @.str.42, ptr noundef %192) #6
  %194 = icmp sgt i32 %193, 0
  br i1 %194, label %.critedge148, label %195

195:                                              ; preds = %.lr.ph158
  %196 = trunc nuw i64 %indvars.iv165 to i32
  %197 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not136 = icmp eq ptr %197, null
  br i1 %.not136, label %199, label %198

198:                                              ; preds = %195
  call void (i32, ptr, ptr, i32, ptr, ...) %197(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 944, ptr noundef nonnull @.str.43, i32 noundef %196, ptr noundef %0) #6
  br label %199

199:                                              ; preds = %198, %195
  %200 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %201 = icmp sgt i32 %200, 3
  br i1 %201, label %202, label %212

202:                                              ; preds = %199
  %203 = load ptr, ptr @stderr, align 8, !tbaa !5
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %203, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_readFromFile, i32 noundef 944) #7
  %205 = load ptr, ptr @stderr, align 8, !tbaa !5
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %205, ptr noundef nonnull @.str.43, i32 noundef %196, ptr noundef %0) #7
  %207 = load ptr, ptr @stderr, align 8, !tbaa !5
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef nonnull @.str.3) #7
  br label %212

.critedge148:                                     ; preds = %.lr.ph158
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %209 = load i32, ptr %79, align 8, !tbaa !14
  %210 = mul i32 %209, 3
  %211 = zext i32 %210 to i64
  %.not137 = icmp ult i64 %indvars.iv.next166, %211
  br i1 %.not137, label %.lr.ph158, label %.critedge150, !llvm.loop !21

212:                                              ; preds = %199, %202
  %213 = load ptr, ptr %122, align 8, !tbaa !11
  call void @free(ptr noundef %213) #6
  %214 = load ptr, ptr %145, align 8, !tbaa !15
  call void @free(ptr noundef %214) #6
  br label %.critedge150.sink.split

.critedge150.sink.split:                          ; preds = %128, %131, %105, %108, %85, %88, %163, %188, %212
  store i32 0, ptr %1, align 8, !tbaa !13
  store i32 0, ptr %79, align 8, !tbaa !14
  br label %.critedge150

.critedge150:                                     ; preds = %.critedge148, %.critedge150.sink.split, %.critedge146.preheader
  %.6 = phi i1 [ true, %.critedge146.preheader ], [ false, %.critedge150.sink.split ], [ true, %.critedge148 ]
  %215 = call i32 @fclose(ptr noundef nonnull %74)
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  br label %.loopexit

216:                                              ; preds = %71
  %217 = tail call zeroext i1 @String_hasEnding(ptr noundef %0, ptr noundef nonnull @.str.11, i1 noundef zeroext false) #6
  br i1 %217, label %218, label %.loopexit

218:                                              ; preds = %216
  %219 = tail call zeroext i1 @RcsMesh_readObjFile(ptr noundef %0, ptr noundef %1)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph160, %.preheader, %216, %30, %27, %11, %8, %218, %.critedge150, %63
  %.7 = phi i1 [ false, %63 ], [ %.6, %.critedge150 ], [ %219, %218 ], [ false, %8 ], [ false, %11 ], [ false, %27 ], [ false, %30 ], [ false, %216 ], [ true, %.preheader ], [ true, %.lr.ph160 ]
  ret i1 %.7
}

declare zeroext i1 @File_exists(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden ptr @RcsMesh_readSTLFile(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @print_trace() local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #5

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 = { noreturn 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 }
attributes #7 = { cold nounwind }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !6, i64 24}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


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