; LLVM IR from bldeng/AASolver :: AndersonOpt/external/OpenMesh/Core/IO/writer (OFFWriter)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl" }
%"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl" = type { %"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.OpenMesh::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options17vertex_has_normalEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options16vertex_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options15color_has_alphaEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options19vertex_has_texcoordEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8OpenMesh10FaceHandleC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options14face_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZNK8OpenMesh2IO11_OFFWriter_11binary_sizeERNS0_12BaseExporterENS0_7OptionsE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::vector.26", align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"struct.OpenMesh::FaceHandle", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 12, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 12, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 16, ptr %12, align 8, !tbaa !9
  %23 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options9is_binaryEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %23, label %25, label %24

24:                                               ; preds = %3
  store i64 0, ptr %4, align 8
  store i32 1, ptr %13, align 4
  br label %187

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store i64 24, ptr %14, align 8, !tbaa !9
  %26 = load i64, ptr %8, align 8, !tbaa !9
  %27 = add i64 %26, 11
  store i64 %27, ptr %8, align 8, !tbaa !9
  %28 = load i64, ptr %14, align 8, !tbaa !9
  %29 = load i64, ptr %8, align 8, !tbaa !9
  %30 = add i64 %29, %28
  store i64 %30, ptr %8, align 8, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds ptr, ptr %32, i64 26
  %34 = load ptr, ptr %33, align 8
  %35 = call noundef i64 %34(ptr noundef nonnull align 8 dereferenceable(8) %31)
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = mul i64 %35, %36
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = add i64 %38, %37
  store i64 %39, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %40

40:                                               ; preds = %25
  %41 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options17vertex_has_normalEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %41, label %42, label %60

42:                                               ; preds = %40
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds ptr, ptr %44, i64 30
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef zeroext i1 %46(ptr noundef nonnull align 8 dereferenceable(8) %43)
  br i1 %47, label %48, label %60

48:                                               ; preds = %42
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = add i64 %49, 1
  store i64 %50, ptr %8, align 8, !tbaa !9
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = getelementptr inbounds ptr, ptr %52, i64 26
  %54 = load ptr, ptr %53, align 8
  %55 = call noundef i64 %54(ptr noundef nonnull align 8 dereferenceable(8) %51)
  %56 = load i64, ptr %10, align 8, !tbaa !9
  %57 = mul i64 %55, %56
  %58 = load i64, ptr %9, align 8, !tbaa !9
  %59 = add i64 %58, %57
  store i64 %59, ptr %9, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %48, %42, %40
  %61 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options16vertex_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %61, label %62, label %80

62:                                               ; preds = %60
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds ptr, ptr %64, i64 31
  %66 = load ptr, ptr %65, align 8
  %67 = call noundef zeroext i1 %66(ptr noundef nonnull align 8 dereferenceable(8) %63)
  br i1 %67, label %68, label %80

68:                                               ; preds = %62
  %69 = load i64, ptr %8, align 8, !tbaa !9
  %70 = add i64 %69, 1
  store i64 %70, ptr %8, align 8, !tbaa !9
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = getelementptr inbounds ptr, ptr %72, i64 26
  %74 = load ptr, ptr %73, align 8
  %75 = call noundef i64 %74(ptr noundef nonnull align 8 dereferenceable(8) %71)
  %76 = load i64, ptr %10, align 8, !tbaa !9
  %77 = mul i64 %75, %76
  %78 = load i64, ptr %9, align 8, !tbaa !9
  %79 = add i64 %78, %77
  store i64 %79, ptr %9, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %68, %62, %60
  %81 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options19vertex_has_texcoordEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %81, label %82, label %100

82:                                               ; preds = %80
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds ptr, ptr %84, i64 32
  %86 = load ptr, ptr %85, align 8
  %87 = call noundef zeroext i1 %86(ptr noundef nonnull align 8 dereferenceable(8) %83)
  br i1 %87, label %88, label %100

88:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 8, ptr %15, align 8, !tbaa !9
  %89 = load i64, ptr %8, align 8, !tbaa !9
  %90 = add i64 %89, 2
  store i64 %90, ptr %8, align 8, !tbaa !9
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds ptr, ptr %92, i64 26
  %94 = load ptr, ptr %93, align 8
  %95 = call noundef i64 %94(ptr noundef nonnull align 8 dereferenceable(8) %91)
  %96 = load i64, ptr %15, align 8, !tbaa !9
  %97 = mul i64 %95, %96
  %98 = load i64, ptr %9, align 8, !tbaa !9
  %99 = add i64 %98, %97
  store i64 %99, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %100

100:                                              ; preds = %88, %82, %80
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = load ptr, ptr %101, align 8, !tbaa !11
  %103 = getelementptr inbounds ptr, ptr %102, i64 29
  %104 = load ptr, ptr %103, align 8
  %105 = call noundef zeroext i1 %104(ptr noundef nonnull align 8 dereferenceable(8) %101)
  br i1 %105, label %106, label %116

106:                                              ; preds = %100
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load ptr, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds ptr, ptr %108, i64 27
  %110 = load ptr, ptr %109, align 8
  %111 = call noundef i64 %110(ptr noundef nonnull align 8 dereferenceable(8) %107)
  %112 = load i64, ptr %12, align 8, !tbaa !9
  %113 = mul i64 %111, %112
  %114 = load i64, ptr %9, align 8, !tbaa !9
  %115 = add i64 %114, %113
  store i64 %115, ptr %9, align 8, !tbaa !9
  br label %152

116:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #3
  call void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  store i32 0, ptr %16, align 4, !tbaa !13
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  %119 = getelementptr inbounds ptr, ptr %118, i64 27
  %120 = load ptr, ptr %119, align 8
  %121 = invoke noundef i64 %120(ptr noundef nonnull align 8 dereferenceable(8) %117)
          to label %122 unwind label %147

122:                                              ; preds = %116
  %123 = trunc i64 %121 to i32
  store i32 %123, ptr %17, align 4, !tbaa !13
  br label %124

124:                                              ; preds = %144, %122
  %125 = load i32, ptr %16, align 4, !tbaa !13
  %126 = load i32, ptr %17, align 4, !tbaa !13
  %127 = icmp ult i32 %125, %126
  br i1 %127, label %128, label %151

128:                                              ; preds = %124
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load i32, ptr %16, align 4, !tbaa !13
  invoke void @_ZN8OpenMesh10FaceHandleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %130)
          to label %131 unwind label %147

131:                                              ; preds = %128
  %132 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %21, i32 0, i32 0
  %133 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %132, i32 0, i32 0
  %134 = load i32, ptr %133, align 4
  %135 = load ptr, ptr %129, align 8, !tbaa !11
  %136 = getelementptr inbounds ptr, ptr %135, i64 11
  %137 = load ptr, ptr %136, align 8
  %138 = invoke noundef i32 %137(ptr noundef nonnull align 8 dereferenceable(8) %129, i32 %134, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %139 unwind label %147

139:                                              ; preds = %131
  %140 = zext i32 %138 to i64
  %141 = mul i64 %140, 4
  %142 = load i64, ptr %9, align 8, !tbaa !9
  %143 = add i64 %142, %141
  store i64 %143, ptr %9, align 8, !tbaa !9
  br label %144

144:                                              ; preds = %139
  %145 = load i32, ptr %16, align 4, !tbaa !13
  %146 = add i32 %145, 1
  store i32 %146, ptr %16, align 4, !tbaa !13
  br label %124, !llvm.loop !15

147:                                              ; preds = %131, %128, %116
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %19, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %20, align 4
  call void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %189

151:                                              ; preds = %124
  call void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %152

152:                                              ; preds = %151, %106
  %153 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options14face_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %153, label %154, label %183

154:                                              ; preds = %152
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = load ptr, ptr %155, align 8, !tbaa !11
  %157 = getelementptr inbounds ptr, ptr %156, i64 35
  %158 = load ptr, ptr %157, align 8
  %159 = call noundef zeroext i1 %158(ptr noundef nonnull align 8 dereferenceable(8) %155)
  br i1 %159, label %160, label %183

160:                                              ; preds = %154
  %161 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options15color_has_alphaEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %161, label %162, label %172

162:                                              ; preds = %160
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = getelementptr inbounds ptr, ptr %164, i64 27
  %166 = load ptr, ptr %165, align 8
  %167 = call noundef i64 %166(ptr noundef nonnull align 8 dereferenceable(8) %163)
  %168 = load i64, ptr %12, align 8, !tbaa !9
  %169 = mul i64 %167, %168
  %170 = load i64, ptr %9, align 8, !tbaa !9
  %171 = add i64 %170, %169
  store i64 %171, ptr %9, align 8, !tbaa !9
  br label %182

172:                                              ; preds = %160
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  %175 = getelementptr inbounds ptr, ptr %174, i64 27
  %176 = load ptr, ptr %175, align 8
  %177 = call noundef i64 %176(ptr noundef nonnull align 8 dereferenceable(8) %173)
  %178 = load i64, ptr %11, align 8, !tbaa !9
  %179 = mul i64 %177, %178
  %180 = load i64, ptr %9, align 8, !tbaa !9
  %181 = add i64 %180, %179
  store i64 %181, ptr %9, align 8, !tbaa !9
  br label %182

182:                                              ; preds = %172, %162
  br label %183

183:                                              ; preds = %182, %154, %152
  %184 = load i64, ptr %8, align 8, !tbaa !9
  %185 = load i64, ptr %9, align 8, !tbaa !9
  %186 = add i64 %184, %185
  store i64 %186, ptr %4, align 8
  store i32 1, ptr %13, align 4
  br label %187

187:                                              ; preds = %183, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %188 = load i64, ptr %4, align 8
  ret i64 %188

189:                                              ; preds = %147
  %190 = load ptr, ptr %19, align 8
  %191 = load i32, ptr %20, align 4
  %192 = insertvalue { ptr, i32 } poison, ptr %190, 0
  %193 = insertvalue { ptr, i32 } %192, i32 %191, 1
  resume { ptr, i32 } %193
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options9is_binaryEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl" }
%"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl" = type { %"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<OpenMesh::VertexHandle, std::allocator<OpenMesh::VertexHandle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.OpenMesh::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options17vertex_has_normalEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options16vertex_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options15color_has_alphaEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options19vertex_has_texcoordEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8OpenMesh10FaceHandleC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options14face_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZNK8OpenMesh2IO11_OFFWriter_11binary_sizeERNS0_12BaseExporterENS0_7OptionsE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.26", align 8
  %5 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %6 = tail call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options9is_binaryEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %6, label %7, label %103

7:                                                ; preds = %3
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 208
  %10 = load ptr, ptr %9, align 8
  %11 = tail call noundef i64 %10(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %12 = tail call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options17vertex_has_normalEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %12, label %13, label %24

13:                                               ; preds = %7
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 240
  %16 = load ptr, ptr %15, align 8
  %17 = tail call noundef zeroext i1 %16(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %17, label %18, label %24

18:                                               ; preds = %13
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 208
  %21 = load ptr, ptr %20, align 8
  %22 = tail call noundef i64 %21(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %23 = add i64 %22, %11
  br label %24

24:                                               ; preds = %18, %13, %7
  %.045.in = phi i64 [ %23, %18 ], [ %11, %13 ], [ %11, %7 ]
  %.044 = phi i64 [ 36, %18 ], [ 35, %13 ], [ 35, %7 ]
  %25 = tail call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options16vertex_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %25, label %26, label %37

26:                                               ; preds = %24
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 248
  %29 = load ptr, ptr %28, align 8
  %30 = tail call noundef zeroext i1 %29(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %30, label %31, label %37

31:                                               ; preds = %26
  %32 = add nuw nsw i64 %.044, 1
  %33 = load ptr, ptr %1, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 208
  %35 = load ptr, ptr %34, align 8
  %36 = tail call noundef i64 %35(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %.04549 = add i64 %36, %.045.in
  br label %37

37:                                               ; preds = %31, %26, %24
  %.146.in = phi i64 [ %.04549, %31 ], [ %.045.in, %26 ], [ %.045.in, %24 ]
  %.1 = phi i64 [ %32, %31 ], [ %.044, %26 ], [ %.044, %24 ]
  %.146 = mul i64 %.146.in, 12
  %38 = tail call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options19vertex_has_texcoordEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %38, label %39, label %52

39:                                               ; preds = %37
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 256
  %42 = load ptr, ptr %41, align 8
  %43 = tail call noundef zeroext i1 %42(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %43, label %44, label %52

44:                                               ; preds = %39
  %45 = add nuw nsw i64 %.1, 2
  %46 = load ptr, ptr %1, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 208
  %48 = load ptr, ptr %47, align 8
  %49 = tail call noundef i64 %48(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %50 = shl i64 %49, 3
  %51 = add i64 %50, %.146
  br label %52

52:                                               ; preds = %44, %39, %37
  %.247 = phi i64 [ %51, %44 ], [ %.146, %39 ], [ %.146, %37 ]
  %.2 = phi i64 [ %45, %44 ], [ %.1, %39 ], [ %.1, %37 ]
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 232
  %55 = load ptr, ptr %54, align 8
  %56 = tail call noundef zeroext i1 %55(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %56, label %57, label %64

57:                                               ; preds = %52
  %58 = load ptr, ptr %1, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 216
  %60 = load ptr, ptr %59, align 8
  %61 = tail call noundef i64 %60(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %62 = shl i64 %61, 4
  %63 = add i64 %62, %.247
  br label %82

64:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  call void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %65 = load ptr, ptr %1, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 216
  %67 = load ptr, ptr %66, align 8
  %68 = invoke noundef i64 %67(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %69 unwind label %.loopexit.split-lp

69:                                               ; preds = %64
  %70 = trunc i64 %68 to i32
  %.not = icmp eq i32 %70, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %69, %76
  %.352 = phi i64 [ %79, %76 ], [ %.247, %69 ]
  %.04851 = phi i32 [ %80, %76 ], [ 0, %69 ]
  call void @_ZN8OpenMesh10FaceHandleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %.04851)
  %71 = load i32, ptr %5, align 4
  %72 = load ptr, ptr %1, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 88
  %74 = load ptr, ptr %73, align 8
  %75 = invoke noundef i32 %74(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 %71, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %76 unwind label %.loopexit

76:                                               ; preds = %.lr.ph
  %77 = zext i32 %75 to i64
  %78 = shl nuw nsw i64 %77, 2
  %79 = add i64 %78, %.352
  %80 = add nuw i32 %.04851, 1
  %exitcond.not = icmp eq i32 %80, %70
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %81

.loopexit.split-lp:                               ; preds = %64
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %81

81:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  resume { ptr, i32 } %lpad.phi

._crit_edge:                                      ; preds = %76, %69
  %.3.lcssa = phi i64 [ %.247, %69 ], [ %79, %76 ]
  call void @_ZNSt6vectorIN8OpenMesh12VertexHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br label %82

82:                                               ; preds = %._crit_edge, %57
  %.4 = phi i64 [ %63, %57 ], [ %.3.lcssa, %._crit_edge ]
  %83 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options14face_has_colorEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %83, label %84, label %101

84:                                               ; preds = %82
  %85 = load ptr, ptr %1, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 280
  %87 = load ptr, ptr %86, align 8
  %88 = call noundef zeroext i1 %87(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %88, label %89, label %101

89:                                               ; preds = %84
  %90 = call noundef zeroext i1 @_ZNK8OpenMesh2IO7Options15color_has_alphaEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  %91 = load ptr, ptr %1, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 216
  %93 = load ptr, ptr %92, align 8
  %94 = call noundef i64 %93(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %90, label %95, label %98

95:                                               ; preds = %89
  %96 = shl i64 %94, 4
  %97 = add i64 %96, %.4
  br label %101

98:                                               ; preds = %89
  %99 = mul i64 %94, 12
  %100 = add i64 %99, %.4
  br label %101

101:                                              ; preds = %95, %98, %84, %82
  %.5 = phi i64 [ %97, %95 ], [ %100, %98 ], [ %.4, %84 ], [ %.4, %82 ]
  %102 = add i64 %.5, %.2
  br label %103

103:                                              ; preds = %3, %101
  %.0 = phi i64 [ %102, %101 ], [ 0, %3 ]
  ret i64 %.0
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO7Options9is_binaryEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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