; LLVM IR from sourceryinstitute/MORFEUS-Source :: src/FV/src/mesh_optimize/OptMS (SMfree)

; 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.__SMlocal_mesh = type { i32, i32, i32, [3 x double], [3 x double], [3 x double], ptr, ptr, ptr, i32, double, ptr, double, i32, i32, i32, ptr, ptr, ptr }
%struct.__SMlap_info = type { double, ptr, double, i32, i32 }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMfreeLocalMesh(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 75, ptr %7, align 4, !tbaa !9
  store i32 150, ptr %6, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %9

9:                                                ; preds = %33, %1
  %10 = load i32, ptr %5, align 4, !tbaa !9
  %11 = load i32, ptr %7, align 4, !tbaa !9
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %13, label %36

13:                                               ; preds = %9
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %14, i32 0, i32 6
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds ptr, ptr %16, i64 %18
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %24

22:                                               ; preds = %13
  %23 = call i32 @SMerror(i32 noundef 22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %23, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

24:                                               ; preds = %13
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %25, i32 0, i32 6
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds ptr, ptr %27, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %31) #4
  br label %32

32:                                               ; preds = %24
  br label %33

33:                                               ; preds = %32
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %5, align 4, !tbaa !9
  br label %9, !llvm.loop !14

36:                                               ; preds = %9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %61, %36
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %41, label %64

41:                                               ; preds = %37
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %42, i32 0, i32 7
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds ptr, ptr %44, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %52

50:                                               ; preds = %41
  %51 = call i32 @SMerror(i32 noundef 25, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %51, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

52:                                               ; preds = %41
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %53, i32 0, i32 7
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %55, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  call void @free(ptr noundef %59) #4
  br label %60

60:                                               ; preds = %52
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %5, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %5, align 4, !tbaa !9
  br label %37, !llvm.loop !17

64:                                               ; preds = %37
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %65, i32 0, i32 8
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %71

69:                                               ; preds = %64
  %70 = call i32 @SMerror(i32 noundef 27, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %70, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

71:                                               ; preds = %64
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %72, i32 0, i32 8
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  call void @free(ptr noundef %74) #4
  br label %75

75:                                               ; preds = %71
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %76, i32 0, i32 11
  %78 = load ptr, ptr %77, align 8, !tbaa !19
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %82

80:                                               ; preds = %75
  %81 = call i32 @SMerror(i32 noundef 28, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %81, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

82:                                               ; preds = %75
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %83, i32 0, i32 11
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  call void @free(ptr noundef %85) #4
  br label %86

86:                                               ; preds = %82
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %87, i32 0, i32 6
  %89 = load ptr, ptr %88, align 8, !tbaa !11
  %90 = icmp eq ptr %89, null
  br i1 %90, label %91, label %93

91:                                               ; preds = %86
  %92 = call i32 @SMerror(i32 noundef 29, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %92, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

93:                                               ; preds = %86
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  call void @free(ptr noundef %96) #4
  br label %97

97:                                               ; preds = %93
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %98, i32 0, i32 7
  %100 = load ptr, ptr %99, align 8, !tbaa !16
  %101 = icmp eq ptr %100, null
  br i1 %101, label %102, label %104

102:                                              ; preds = %97
  %103 = call i32 @SMerror(i32 noundef 30, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %103, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

104:                                              ; preds = %97
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %105, i32 0, i32 7
  %107 = load ptr, ptr %106, align 8, !tbaa !16
  call void @free(ptr noundef %107) #4
  br label %108

108:                                              ; preds = %104
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %109, i32 0, i32 17
  %111 = load ptr, ptr %110, align 8, !tbaa !20
  %112 = getelementptr inbounds %struct.__SMlap_info, ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !21
  %114 = icmp eq ptr %113, null
  br i1 %114, label %115, label %117

115:                                              ; preds = %108
  %116 = call i32 @SMerror(i32 noundef 31, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %116, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

117:                                              ; preds = %108
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %118, i32 0, i32 17
  %120 = load ptr, ptr %119, align 8, !tbaa !20
  %121 = getelementptr inbounds %struct.__SMlap_info, ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !21
  call void @free(ptr noundef %122) #4
  br label %123

123:                                              ; preds = %117
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %124, i32 0, i32 17
  %126 = load ptr, ptr %125, align 8, !tbaa !20
  %127 = icmp eq ptr %126, null
  br i1 %127, label %128, label %130

128:                                              ; preds = %123
  %129 = call i32 @SMerror(i32 noundef 32, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %129, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

130:                                              ; preds = %123
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %131, i32 0, i32 17
  %133 = load ptr, ptr %132, align 8, !tbaa !20
  call void @free(ptr noundef %133) #4
  br label %134

134:                                              ; preds = %130
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %135, i32 0, i32 16
  %137 = load ptr, ptr %136, align 8, !tbaa !23
  %138 = call i32 @SMfreeOpt(ptr noundef %137)
  store i32 %138, ptr %4, align 4, !tbaa !9
  %139 = load i32, ptr %4, align 4, !tbaa !9
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %144

141:                                              ; preds = %134
  %142 = load i32, ptr %4, align 4, !tbaa !9
  %143 = call i32 @SMerror(i32 noundef 33, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %142, i32 noundef 0, ptr noundef null)
  store i32 %143, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

144:                                              ; preds = %134
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = load i32, ptr %6, align 4, !tbaa !9
  %147 = call i32 @SMfreeLP(ptr noundef %145, i32 noundef 5, i32 noundef %146)
  store i32 %147, ptr %4, align 4, !tbaa !9
  %148 = load i32, ptr %4, align 4, !tbaa !9
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %153

150:                                              ; preds = %144
  %151 = load i32, ptr %4, align 4, !tbaa !9
  %152 = call i32 @SMerror(i32 noundef 34, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %151, i32 noundef 0, ptr noundef null)
  store i32 %152, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

153:                                              ; preds = %144
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = icmp eq ptr %154, null
  br i1 %155, label %156, label %158

156:                                              ; preds = %153
  %157 = call i32 @SMerror(i32 noundef 35, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null)
  store i32 %157, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

158:                                              ; preds = %153
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %159) #4
  br label %160

160:                                              ; preds = %158
  store i32 0, ptr %4, align 4, !tbaa !9
  store i32 0, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %161

161:                                              ; preds = %160, %156, %150, %141, %128, %115, %102, %91, %80, %69, %50, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %162 = load i32, ptr %2, align 4
  ret i32 %162
}

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

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMfreeOpt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMfreeLP(ptr noundef, i32 noundef, i32 noundef) #0

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 }

!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 88}
!12 = !{!"__SMlocal_mesh", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !13, i64 120, !6, i64 128, !13, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!12, !6, i64 96}
!17 = distinct !{!17, !15}
!18 = !{!12, !6, i64 104}
!19 = !{!12, !6, i64 128}
!20 = !{!12, !6, i64 168}
!21 = !{!22, !6, i64 8}
!22 = !{!"__SMlap_info", !13, i64 0, !6, i64 8, !13, i64 16, !10, i64 24, !10, i64 28}
!23 = !{!12, !6, i64 160}


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

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMfreeLocalMesh(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 88
  br label %4

.preheader:                                       ; preds = %11
  %3 = getelementptr inbounds i8, ptr %0, i64 96
  br label %12

4:                                                ; preds = %1, %11
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %11 ]
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds ptr, ptr %5, i64 %indvars.iv
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %11

9:                                                ; preds = %4
  %10 = tail call i32 @SMerror(i32 noundef 22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

11:                                               ; preds = %4
  tail call void @free(ptr noundef nonnull %7) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 75
  br i1 %exitcond.not, label %.preheader, label %4, !llvm.loop !13

12:                                               ; preds = %.preheader, %19
  %indvars.iv51 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next52, %19 ]
  %13 = load ptr, ptr %3, align 8, !tbaa !15
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv51
  %15 = load ptr, ptr %14, align 8, !tbaa !12
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %19

17:                                               ; preds = %12
  %18 = tail call i32 @SMerror(i32 noundef 25, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

19:                                               ; preds = %12
  tail call void @free(ptr noundef nonnull %15) #3
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next52, 150
  br i1 %exitcond54.not, label %20, label %12, !llvm.loop !16

20:                                               ; preds = %19
  %21 = getelementptr inbounds i8, ptr %0, i64 104
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %26

24:                                               ; preds = %20
  %25 = tail call i32 @SMerror(i32 noundef 27, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

26:                                               ; preds = %20
  tail call void @free(ptr noundef nonnull %22) #3
  %27 = getelementptr inbounds i8, ptr %0, i64 128
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %32

30:                                               ; preds = %26
  %31 = tail call i32 @SMerror(i32 noundef 28, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

32:                                               ; preds = %26
  tail call void @free(ptr noundef nonnull %28) #3
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %37

35:                                               ; preds = %32
  %36 = tail call i32 @SMerror(i32 noundef 29, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

37:                                               ; preds = %32
  tail call void @free(ptr noundef nonnull %33) #3
  %38 = load ptr, ptr %3, align 8, !tbaa !15
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %42

40:                                               ; preds = %37
  %41 = tail call i32 @SMerror(i32 noundef 30, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

42:                                               ; preds = %37
  tail call void @free(ptr noundef nonnull %38) #3
  %43 = getelementptr inbounds i8, ptr %0, i64 168
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %50

48:                                               ; preds = %42
  %49 = tail call i32 @SMerror(i32 noundef 31, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

50:                                               ; preds = %42
  tail call void @free(ptr noundef nonnull %46) #3
  %51 = load ptr, ptr %43, align 8, !tbaa !19
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = tail call i32 @SMerror(i32 noundef 32, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 60, i32 noundef 0, ptr noundef null) #3
  br label %66

55:                                               ; preds = %50
  tail call void @free(ptr noundef nonnull %51) #3
  %56 = getelementptr inbounds i8, ptr %0, i64 160
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = tail call i32 @SMfreeOpt(ptr noundef %57)
  %.not = icmp eq i32 %58, 0
  br i1 %.not, label %61, label %59

59:                                               ; preds = %55
  %60 = tail call i32 @SMerror(i32 noundef 33, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %58, i32 noundef 0, ptr noundef null) #3
  br label %66

61:                                               ; preds = %55
  %62 = tail call i32 @SMfreeLP(ptr noundef nonnull %0, i32 noundef 5, i32 noundef 150)
  %.not47 = icmp eq i32 %62, 0
  br i1 %.not47, label %65, label %63

63:                                               ; preds = %61
  %64 = tail call i32 @SMerror(i32 noundef 34, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %62, i32 noundef 0, ptr noundef null) #3
  br label %66

65:                                               ; preds = %61
  tail call void @free(ptr noundef nonnull %0) #3
  br label %66

66:                                               ; preds = %65, %63, %59, %53, %48, %40, %35, %30, %24, %17, %9
  %.0 = phi i32 [ %10, %9 ], [ %18, %17 ], [ %25, %24 ], [ %31, %30 ], [ %36, %35 ], [ %41, %40 ], [ %49, %48 ], [ %54, %53 ], [ %60, %59 ], [ %64, %63 ], [ 0, %65 ]
  ret i32 %.0
}

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) 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: nounwind uwtable
declare dso_local i32 @SMfreeOpt(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SMfreeLP(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

attributes #0 = { 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 #1 = { "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 = { 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, !10, i64 88}
!6 = !{!"__SMlocal_mesh", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 16, !8, i64 40, !8, i64 64, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !11, i64 120, !10, i64 128, !11, i64 136, !7, i64 144, !7, i64 148, !7, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!10, !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!6, !10, i64 96}
!16 = distinct !{!16, !14}
!17 = !{!6, !10, i64 104}
!18 = !{!6, !10, i64 128}
!19 = !{!6, !10, i64 168}
!20 = !{!21, !10, i64 8}
!21 = !{!"__SMlap_info", !11, i64 0, !10, i64 8, !11, i64 16, !7, i64 24, !7, i64 28}
!22 = !{!6, !10, i64 160}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass