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

; 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.PlyFile = type { ptr, i32, float, i32, ptr, i32, ptr, i32, ptr, ptr, ptr }
%struct.PlyElement = type { ptr, i32, i32, i32, ptr, ptr, i32, i32 }
%struct.PlyProperty = type { ptr, i32, i32, i32, i32, i32, i32, i32 }

@ply_type_size = external dso_local global [9 x i32], align 16
@.str.9 = external hidden unnamed_addr constant [85 x i8], align 1
@stderr = external global ptr, align 8
@.str.48 = external hidden unnamed_addr constant [41 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z8my_allociiPc(i32 noundef, i32 noundef, ptr noundef) #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z9get_wordsP8_IO_FILEPiPPc(ptr noundef, ptr noundef, ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17ascii_get_elementP7PlyFilePc(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store ptr null, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.PlyFile, ptr %26, i32 0, i32 9
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  store ptr %28, ptr %7, align 8, !tbaa !5
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.PlyElement, ptr %29, i32 0, i32 6
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = icmp ne i32 %31, -1
  br i1 %32, label %33, label %46

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store i32 1, ptr %24, align 4, !tbaa !15
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.PlyElement, ptr %34, i32 0, i32 7
  %36 = load i32, ptr %35, align 4, !tbaa !16
  %37 = call noundef ptr @_Z8my_allociiPc(i32 noundef %36, i32 noundef 1544, ptr noundef @.str.9)
  store ptr %37, ptr %23, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.PlyElement, ptr %39, i32 0, i32 6
  %41 = load i32, ptr %40, align 8, !tbaa !13
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %38, i64 %42
  store ptr %43, ptr %25, align 8, !tbaa !5
  %44 = load ptr, ptr %23, align 8, !tbaa !5
  %45 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %44, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %47

46:                                               ; preds = %2
  store i32 0, ptr %24, align 4, !tbaa !15
  br label %47

47:                                               ; preds = %46, %33
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.PlyFile, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  %51 = call noundef ptr @_Z9get_wordsP8_IO_FILEPiPPc(ptr noundef %50, ptr noundef %10, ptr noundef %22)
  store ptr %51, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %57

54:                                               ; preds = %47
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.48) #5
  call void @exit(i32 noundef -1) #6
  unreachable

57:                                               ; preds = %47
  store i32 0, ptr %11, align 4, !tbaa !15
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %58

58:                                               ; preds = %225, %57
  %59 = load i32, ptr %5, align 4, !tbaa !15
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.PlyElement, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 8, !tbaa !18
  %63 = icmp slt i32 %59, %62
  br i1 %63, label %64, label %228

64:                                               ; preds = %58
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.PlyElement, ptr %65, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = load i32, ptr %5, align 4, !tbaa !15
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %67, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  store ptr %71, ptr %8, align 8, !tbaa !5
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.PlyElement, ptr %72, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  %75 = load i32, ptr %5, align 4, !tbaa !15
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %74, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !21
  %79 = sext i8 %78 to i32
  %80 = load i32, ptr %24, align 4, !tbaa !15
  %81 = or i32 %79, %80
  store i32 %81, ptr %20, align 4, !tbaa !15
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.PlyElement, ptr %82, i32 0, i32 5
  %84 = load ptr, ptr %83, align 8, !tbaa !20
  %85 = load i32, ptr %5, align 4, !tbaa !15
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %84, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !21
  %89 = icmp ne i8 %88, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %64
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %91, ptr %12, align 8, !tbaa !5
  br label %94

92:                                               ; preds = %64
  %93 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %93, ptr %12, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %92, %90
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.PlyProperty, ptr %95, i32 0, i32 4
  %97 = load i32, ptr %96, align 4, !tbaa !22
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %197

99:                                               ; preds = %94
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = load i32, ptr %11, align 4, !tbaa !15
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %11, align 4, !tbaa !15
  %103 = sext i32 %101 to i64
  %104 = getelementptr inbounds ptr, ptr %100, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.PlyProperty, ptr %106, i32 0, i32 5
  %108 = load i32, ptr %107, align 8, !tbaa !24
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %105, i32 noundef %108, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %109 = load i32, ptr %20, align 4, !tbaa !15
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %125

111:                                              ; preds = %99
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.PlyProperty, ptr %113, i32 0, i32 7
  %115 = load i32, ptr %114, align 8, !tbaa !25
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i8, ptr %112, i64 %116
  store ptr %117, ptr %13, align 8, !tbaa !5
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.PlyProperty, ptr %119, i32 0, i32 6
  %121 = load i32, ptr %120, align 4, !tbaa !26
  %122 = load i32, ptr %16, align 4, !tbaa !15
  %123 = load i32, ptr %17, align 4, !tbaa !15
  %124 = load double, ptr %18, align 8, !tbaa !27
  call void @_Z10store_itemPciijd(ptr noundef %118, i32 noundef %121, i32 noundef %122, i32 noundef %123, double noundef %124)
  br label %125

125:                                              ; preds = %111, %99
  %126 = load i32, ptr %16, align 4, !tbaa !15
  store i32 %126, ptr %19, align 4, !tbaa !15
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.PlyProperty, ptr %127, i32 0, i32 2
  %129 = load i32, ptr %128, align 4, !tbaa !29
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [9 x i32], ptr @ply_type_size, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !15
  store i32 %132, ptr %15, align 4, !tbaa !15
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.PlyProperty, ptr %134, i32 0, i32 3
  %136 = load i32, ptr %135, align 8, !tbaa !30
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %133, i64 %137
  store ptr %138, ptr %21, align 8, !tbaa !5
  %139 = load i32, ptr %19, align 4, !tbaa !15
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %147

141:                                              ; preds = %125
  %142 = load i32, ptr %20, align 4, !tbaa !15
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %146

144:                                              ; preds = %141
  %145 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr null, ptr %145, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %144, %141
  br label %196

147:                                              ; preds = %125
  %148 = load i32, ptr %20, align 4, !tbaa !15
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %162

150:                                              ; preds = %147
  %151 = load i32, ptr %15, align 4, !tbaa !15
  %152 = sext i32 %151 to i64
  %153 = mul i64 1, %152
  %154 = load i32, ptr %19, align 4, !tbaa !15
  %155 = sext i32 %154 to i64
  %156 = mul i64 %153, %155
  %157 = trunc i64 %156 to i32
  %158 = call noundef ptr @_Z8my_allociiPc(i32 noundef %157, i32 noundef 1594, ptr noundef @.str.9)
  store ptr %158, ptr %14, align 8, !tbaa !5
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %159, ptr %13, align 8, !tbaa !5
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %160, ptr %161, align 8, !tbaa !5
  br label %162

162:                                              ; preds = %150, %147
  store i32 0, ptr %6, align 4, !tbaa !15
  br label %163

163:                                              ; preds = %192, %162
  %164 = load i32, ptr %6, align 4, !tbaa !15
  %165 = load i32, ptr %19, align 4, !tbaa !15
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %167, label %195

167:                                              ; preds = %163
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = load i32, ptr %11, align 4, !tbaa !15
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %11, align 4, !tbaa !15
  %171 = sext i32 %169 to i64
  %172 = getelementptr inbounds ptr, ptr %168, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.PlyProperty, ptr %174, i32 0, i32 1
  %176 = load i32, ptr %175, align 8, !tbaa !31
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %173, i32 noundef %176, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %177 = load i32, ptr %20, align 4, !tbaa !15
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %191

179:                                              ; preds = %167
  %180 = load ptr, ptr %13, align 8, !tbaa !5
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.PlyProperty, ptr %181, i32 0, i32 2
  %183 = load i32, ptr %182, align 4, !tbaa !29
  %184 = load i32, ptr %16, align 4, !tbaa !15
  %185 = load i32, ptr %17, align 4, !tbaa !15
  %186 = load double, ptr %18, align 8, !tbaa !27
  call void @_Z10store_itemPciijd(ptr noundef %180, i32 noundef %183, i32 noundef %184, i32 noundef %185, double noundef %186)
  %187 = load i32, ptr %15, align 4, !tbaa !15
  %188 = load ptr, ptr %13, align 8, !tbaa !5
  %189 = sext i32 %187 to i64
  %190 = getelementptr inbounds i8, ptr %188, i64 %189
  store ptr %190, ptr %13, align 8, !tbaa !5
  br label %191

191:                                              ; preds = %179, %167
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %6, align 4, !tbaa !15
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %6, align 4, !tbaa !15
  br label %163, !llvm.loop !32

195:                                              ; preds = %163
  br label %196

196:                                              ; preds = %195, %146
  br label %224

197:                                              ; preds = %94
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = load i32, ptr %11, align 4, !tbaa !15
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %11, align 4, !tbaa !15
  %201 = sext i32 %199 to i64
  %202 = getelementptr inbounds ptr, ptr %198, i64 %201
  %203 = load ptr, ptr %202, align 8, !tbaa !5
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.PlyProperty, ptr %204, i32 0, i32 1
  %206 = load i32, ptr %205, align 8, !tbaa !31
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %203, i32 noundef %206, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %207 = load i32, ptr %20, align 4, !tbaa !15
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %209, label %223

209:                                              ; preds = %197
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.PlyProperty, ptr %211, i32 0, i32 3
  %213 = load i32, ptr %212, align 8, !tbaa !30
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i8, ptr %210, i64 %214
  store ptr %215, ptr %13, align 8, !tbaa !5
  %216 = load ptr, ptr %13, align 8, !tbaa !5
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.PlyProperty, ptr %217, i32 0, i32 2
  %219 = load i32, ptr %218, align 4, !tbaa !29
  %220 = load i32, ptr %16, align 4, !tbaa !15
  %221 = load i32, ptr %17, align 4, !tbaa !15
  %222 = load double, ptr %18, align 8, !tbaa !27
  call void @_Z10store_itemPciijd(ptr noundef %216, i32 noundef %219, i32 noundef %220, i32 noundef %221, double noundef %222)
  br label %223

223:                                              ; preds = %209, %197
  br label %224

224:                                              ; preds = %223, %196
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %5, align 4, !tbaa !15
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %5, align 4, !tbaa !15
  br label %58, !llvm.loop !34

228:                                              ; preds = %58
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %229) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z14get_ascii_itemPciPiPjPd(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10store_itemPciijd(ptr noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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++ TBAA"}
!9 = !{!10, !6, i64 64}
!10 = !{!"_ZTS7PlyFile", !6, i64 0, !11, i64 8, !12, i64 12, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !11, i64 40}
!14 = !{!"_ZTS10PlyElement", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44}
!15 = !{!11, !11, i64 0}
!16 = !{!14, !11, i64 44}
!17 = !{!10, !6, i64 0}
!18 = !{!14, !11, i64 16}
!19 = !{!14, !6, i64 24}
!20 = !{!14, !6, i64 32}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !11, i64 20}
!23 = !{!"_ZTS11PlyProperty", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!24 = !{!23, !11, i64 24}
!25 = !{!23, !11, i64 32}
!26 = !{!23, !11, i64 28}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = !{!23, !11, i64 12}
!30 = !{!23, !11, i64 16}
!31 = !{!23, !11, i64 8}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


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

@ply_type_size = external dso_local local_unnamed_addr global [9 x i32], align 16
@.str.9 = external hidden unnamed_addr constant [85 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.48 = external hidden unnamed_addr constant [41 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z8my_allociiPc(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z9get_wordsP8_IO_FILEPiPPc(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17ascii_get_elementP7PlyFilePc(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 40
  %11 = load i32, ptr %10, align 8, !tbaa !12
  %.not = icmp eq i32 %11, -1
  br i1 %.not, label %19, label %12

12:                                               ; preds = %2
  %13 = getelementptr inbounds i8, ptr %9, i64 44
  %14 = load i32, ptr %13, align 4, !tbaa !14
  %15 = tail call noundef ptr @_Z8my_allociiPc(i32 noundef %14, i32 noundef 1544, ptr noundef nonnull @.str.9)
  %16 = load i32, ptr %10, align 8, !tbaa !12
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i8, ptr %1, i64 %17
  store ptr %15, ptr %18, align 8, !tbaa !15
  br label %19

19:                                               ; preds = %2, %12
  %.062 = phi ptr [ %15, %12 ], [ null, %2 ]
  %.061 = phi i32 [ 1, %12 ], [ 0, %2 ]
  %20 = load ptr, ptr %0, align 8, !tbaa !16
  %21 = call noundef ptr @_Z9get_wordsP8_IO_FILEPiPPc(ptr noundef %20, ptr noundef nonnull %3, ptr noundef nonnull %7)
  %22 = icmp eq ptr %21, null
  br i1 %22, label %28, label %.preheader

.preheader:                                       ; preds = %19
  %23 = getelementptr inbounds i8, ptr %9, i64 16
  %24 = load i32, ptr %23, align 8, !tbaa !17
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph91, label %._crit_edge

.lr.ph91:                                         ; preds = %.preheader
  %26 = getelementptr inbounds i8, ptr %9, i64 24
  %27 = getelementptr inbounds i8, ptr %9, i64 32
  br label %31

28:                                               ; preds = %19
  %29 = load ptr, ptr @stderr, align 8, !tbaa !15
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.48) #7
  call void @exit(i32 noundef -1) #8
  unreachable

31:                                               ; preds = %.lr.ph91, %.loopexit
  %indvars.iv100 = phi i64 [ 0, %.lr.ph91 ], [ %indvars.iv.next101, %.loopexit ]
  %.06489 = phi i32 [ 0, %.lr.ph91 ], [ %.2, %.loopexit ]
  %32 = load ptr, ptr %26, align 8, !tbaa !18
  %33 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv100
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = load ptr, ptr %27, align 8, !tbaa !19
  %36 = getelementptr inbounds i8, ptr %35, i64 %indvars.iv100
  %37 = load i8, ptr %36, align 1, !tbaa !20
  %38 = sext i8 %37 to i32
  %39 = or i32 %.061, %38
  %.not71 = icmp eq i8 %37, 0
  %.062. = select i1 %.not71, ptr %.062, ptr %1
  %40 = getelementptr inbounds i8, ptr %34, i64 20
  %41 = load i32, ptr %40, align 4, !tbaa !21
  %.not72 = icmp eq i32 %41, 0
  %42 = add i32 %.06489, 1
  %43 = sext i32 %.06489 to i64
  %44 = getelementptr inbounds ptr, ptr %21, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  %.not73 = icmp eq i32 %39, 0
  br i1 %.not72, label %94, label %46

46:                                               ; preds = %31
  %47 = getelementptr inbounds i8, ptr %34, i64 24
  %48 = load i32, ptr %47, align 8, !tbaa !23
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %45, i32 noundef %48, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  br i1 %.not73, label %49, label %.thread

49:                                               ; preds = %46
  %50 = load i32, ptr %4, align 4, !tbaa !24
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.lr.ph.split.us.preheader, label %.loopexit

.thread:                                          ; preds = %46
  %52 = getelementptr inbounds i8, ptr %34, i64 32
  %53 = load i32, ptr %52, align 8, !tbaa !25
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %.062., i64 %54
  %56 = getelementptr inbounds i8, ptr %34, i64 28
  %57 = load i32, ptr %56, align 4, !tbaa !26
  %58 = load i32, ptr %4, align 4, !tbaa !24
  %59 = load i32, ptr %5, align 4, !tbaa !24
  %60 = load double, ptr %6, align 8, !tbaa !27
  call void @_Z10store_itemPciijd(ptr noundef %55, i32 noundef %57, i32 noundef %58, i32 noundef %59, double noundef %60)
  %61 = load i32, ptr %4, align 4, !tbaa !24
  %62 = getelementptr inbounds i8, ptr %34, i64 16
  %63 = load i32, ptr %62, align 8, !tbaa !29
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %.062., i64 %64
  %66 = icmp eq i32 %61, 0
  br i1 %66, label %67, label %.thread103

67:                                               ; preds = %.thread
  store ptr null, ptr %65, align 8, !tbaa !15
  br label %.loopexit

.thread103:                                       ; preds = %.thread
  %68 = getelementptr inbounds i8, ptr %34, i64 12
  %69 = load i32, ptr %68, align 4, !tbaa !30
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [9 x i32], ptr @ply_type_size, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !24
  %73 = mul i32 %72, %61
  %74 = call noundef ptr @_Z8my_allociiPc(i32 noundef %73, i32 noundef 1594, ptr noundef nonnull @.str.9)
  store ptr %74, ptr %65, align 8, !tbaa !15
  %75 = icmp sgt i32 %61, 0
  br i1 %75, label %.lr.ph.split.preheader, label %.loopexit

.lr.ph.split.preheader:                           ; preds = %.thread103
  %76 = getelementptr inbounds i8, ptr %34, i64 8
  %77 = sext i32 %72 to i64
  %78 = sext i32 %42 to i64
  br label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %49
  %79 = getelementptr inbounds i8, ptr %34, i64 8
  %80 = sext i32 %42 to i64
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %.lr.ph.split.us
  %indvars.iv96 = phi i64 [ %80, %.lr.ph.split.us.preheader ], [ %indvars.iv.next97, %.lr.ph.split.us ]
  %.06385.us = phi i32 [ 0, %.lr.ph.split.us.preheader ], [ %84, %.lr.ph.split.us ]
  %indvars.iv.next97 = add nsw i64 %indvars.iv96, 1
  %81 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv96
  %82 = load ptr, ptr %81, align 8, !tbaa !15
  %83 = load i32, ptr %79, align 8, !tbaa !31
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %82, i32 noundef %83, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %84 = add nuw nsw i32 %.06385.us, 1
  %exitcond99.not = icmp eq i32 %84, %50
  br i1 %exitcond99.not, label %.loopexit.loopexit, label %.lr.ph.split.us, !llvm.loop !32

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %.lr.ph.split
  %indvars.iv = phi i64 [ %78, %.lr.ph.split.preheader ], [ %indvars.iv.next, %.lr.ph.split ]
  %.06385 = phi i32 [ 0, %.lr.ph.split.preheader ], [ %93, %.lr.ph.split ]
  %.383 = phi ptr [ %74, %.lr.ph.split.preheader ], [ %92, %.lr.ph.split ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %85 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = load i32, ptr %76, align 8, !tbaa !31
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %86, i32 noundef %87, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %88 = load i32, ptr %68, align 4, !tbaa !30
  %89 = load i32, ptr %4, align 4, !tbaa !24
  %90 = load i32, ptr %5, align 4, !tbaa !24
  %91 = load double, ptr %6, align 8, !tbaa !27
  call void @_Z10store_itemPciijd(ptr noundef %.383, i32 noundef %88, i32 noundef %89, i32 noundef %90, double noundef %91)
  %92 = getelementptr inbounds i8, ptr %.383, i64 %77
  %93 = add nuw nsw i32 %.06385, 1
  %exitcond.not = icmp eq i32 %93, %61
  br i1 %exitcond.not, label %.loopexit.loopexit92, label %.lr.ph.split, !llvm.loop !32

94:                                               ; preds = %31
  %95 = getelementptr inbounds i8, ptr %34, i64 8
  %96 = load i32, ptr %95, align 8, !tbaa !31
  call void @_Z14get_ascii_itemPciPiPjPd(ptr noundef %45, i32 noundef %96, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  br i1 %.not73, label %.loopexit, label %97

97:                                               ; preds = %94
  %98 = getelementptr inbounds i8, ptr %34, i64 16
  %99 = load i32, ptr %98, align 8, !tbaa !29
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %.062., i64 %100
  %102 = getelementptr inbounds i8, ptr %34, i64 12
  %103 = load i32, ptr %102, align 4, !tbaa !30
  %104 = load i32, ptr %4, align 4, !tbaa !24
  %105 = load i32, ptr %5, align 4, !tbaa !24
  %106 = load double, ptr %6, align 8, !tbaa !27
  call void @_Z10store_itemPciijd(ptr noundef %101, i32 noundef %103, i32 noundef %104, i32 noundef %105, double noundef %106)
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %.lr.ph.split.us
  %107 = trunc nsw i64 %indvars.iv.next97 to i32
  br label %.loopexit

.loopexit.loopexit92:                             ; preds = %.lr.ph.split
  %108 = trunc nsw i64 %indvars.iv.next to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.thread103, %.loopexit.loopexit92, %.loopexit.loopexit, %49, %67, %97, %94
  %.2 = phi i32 [ %42, %67 ], [ %42, %97 ], [ %42, %94 ], [ %42, %49 ], [ %107, %.loopexit.loopexit ], [ %108, %.loopexit.loopexit92 ], [ %42, %.thread103 ]
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %109 = load i32, ptr %23, align 8, !tbaa !17
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next101, %110
  br i1 %111, label %31, label %._crit_edge, !llvm.loop !34

._crit_edge:                                      ; preds = %.loopexit, %.preheader
  call void @free(ptr noundef nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z14get_ascii_itemPciPiPjPd(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10store_itemPciijd(ptr noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 #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, !7, i64 64}
!6 = !{!"_ZTS7PlyFile", !7, i64 0, !10, i64 8, !11, i64 12, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !10, i64 40}
!13 = !{!"_ZTS10PlyElement", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44}
!14 = !{!13, !10, i64 44}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !7, i64 0}
!17 = !{!13, !10, i64 16}
!18 = !{!13, !7, i64 24}
!19 = !{!13, !7, i64 32}
!20 = !{!8, !8, i64 0}
!21 = !{!22, !10, i64 20}
!22 = !{!"_ZTS11PlyProperty", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!23 = !{!22, !10, i64 24}
!24 = !{!10, !10, i64 0}
!25 = !{!22, !10, i64 32}
!26 = !{!22, !10, i64 28}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !8, i64 0}
!29 = !{!22, !10, i64 16}
!30 = !{!22, !10, i64 12}
!31 = !{!22, !10, i64 8}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


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