; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl (scalespace)

; 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._VlScaleSpaceOctaveGeometry = type { i64, i64, double }
%struct._VlScaleSpaceGeometry = type { i64, i64, i64, i64, i64, i64, i64, double, double }
%struct._VlScaleSpace = type { %struct._VlScaleSpaceGeometry, ptr }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.vl_scalespace_new_with_geometry = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local void @vl_scalespace_get_octave_geometry(ptr dead_on_unwind noalias writable sret(%struct._VlScaleSpaceOctaveGeometry) align 8, ptr noundef, i64 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @vl_scalespace_new_with_geometry(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8 %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct._VlScaleSpaceOctaveGeometry, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %10 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 6
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 5
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %14 = sub nsw i64 %11, %13
  %15 = add nsw i64 %14, 1
  store i64 %15, ptr %4, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %16 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 3
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 2
  %19 = load i64, ptr %18, align 8, !tbaa !14
  %20 = sub nsw i64 %17, %19
  %21 = add nsw i64 %20, 1
  store i64 %21, ptr %5, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %22 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 2
  %23 = load i64, ptr %22, align 8, !tbaa !14
  %24 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 3
  %25 = load i64, ptr %24, align 8, !tbaa !13
  %26 = icmp sle i64 %23, %25
  br i1 %26, label %27, label %46

27:                                               ; preds = %1
  %28 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 4
  %29 = load i64, ptr %28, align 8, !tbaa !15
  %30 = icmp uge i64 %29, 1
  br i1 %30, label %31, label %46

31:                                               ; preds = %27
  %32 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 5
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 6
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = icmp sle i64 %33, %35
  br i1 %36, label %37, label %46

37:                                               ; preds = %31
  %38 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 7
  %39 = load double, ptr %38, align 8, !tbaa !16
  %40 = fcmp oge double %39, 0.000000e+00
  br i1 %40, label %41, label %46

41:                                               ; preds = %37
  %42 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 8
  %43 = load double, ptr %42, align 8, !tbaa !17
  %44 = fcmp oge double %43, 0.000000e+00
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  br label %47

46:                                               ; preds = %41, %37, %31, %27, %1
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 566, ptr noundef @__PRETTY_FUNCTION__.vl_scalespace_new_with_geometry) #6
  unreachable

47:                                               ; preds = %45
  %48 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 3
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 2
  %51 = load i64, ptr %50, align 8, !tbaa !14
  %52 = sub nsw i64 %49, %51
  %53 = add nsw i64 %52, 1
  store i64 %53, ptr %5, align 8, !tbaa !12
  %54 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 6
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %0, i32 0, i32 5
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = sub nsw i64 %55, %57
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %4, align 8, !tbaa !12
  %60 = call ptr @vl_calloc(i64 noundef 1, i64 noundef 80)
  store ptr %60, ptr %6, align 8, !tbaa !18
  %61 = load ptr, ptr %6, align 8, !tbaa !18
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %64

63:                                               ; preds = %47
  br label %177

64:                                               ; preds = %47
  %65 = load ptr, ptr %6, align 8, !tbaa !18
  %66 = getelementptr inbounds %struct._VlScaleSpace, ptr %65, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %66, ptr align 8 %0, i64 72, i1 false), !tbaa.struct !20
  %67 = load i64, ptr %5, align 8, !tbaa !12
  %68 = call ptr @vl_calloc(i64 noundef %67, i64 noundef 8)
  %69 = load ptr, ptr %6, align 8, !tbaa !18
  %70 = getelementptr inbounds %struct._VlScaleSpace, ptr %69, i32 0, i32 1
  store ptr %68, ptr %70, align 8, !tbaa !22
  %71 = load ptr, ptr %6, align 8, !tbaa !18
  %72 = getelementptr inbounds %struct._VlScaleSpace, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !22
  %74 = icmp eq ptr %73, null
  br i1 %74, label %75, label %76

75:                                               ; preds = %64
  br label %175

76:                                               ; preds = %64
  %77 = load ptr, ptr %6, align 8, !tbaa !18
  %78 = getelementptr inbounds %struct._VlScaleSpace, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %78, i32 0, i32 2
  %80 = load i64, ptr %79, align 8, !tbaa !24
  store i64 %80, ptr %3, align 8, !tbaa !12
  br label %81

81:                                               ; preds = %128, %76
  %82 = load i64, ptr %3, align 8, !tbaa !12
  %83 = load ptr, ptr %6, align 8, !tbaa !18
  %84 = getelementptr inbounds %struct._VlScaleSpace, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %84, i32 0, i32 3
  %86 = load i64, ptr %85, align 8, !tbaa !25
  %87 = icmp sle i64 %82, %86
  br i1 %87, label %88, label %131

88:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %89 = load ptr, ptr %6, align 8, !tbaa !18
  %90 = load i64, ptr %3, align 8, !tbaa !12
  call void @vl_scalespace_get_octave_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceOctaveGeometry) align 8 %7, ptr noundef %89, i64 noundef %90)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %91 = getelementptr inbounds %struct._VlScaleSpaceOctaveGeometry, ptr %7, i32 0, i32 0
  %92 = load i64, ptr %91, align 8, !tbaa !26
  %93 = getelementptr inbounds %struct._VlScaleSpaceOctaveGeometry, ptr %7, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !28
  %95 = mul i64 %92, %94
  %96 = load i64, ptr %4, align 8, !tbaa !12
  %97 = mul i64 %95, %96
  store i64 %97, ptr %8, align 8, !tbaa !12
  %98 = load i64, ptr %8, align 8, !tbaa !12
  %99 = mul i64 %98, 4
  %100 = call ptr @vl_malloc(i64 noundef %99)
  %101 = load ptr, ptr %6, align 8, !tbaa !18
  %102 = getelementptr inbounds %struct._VlScaleSpace, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !22
  %104 = load i64, ptr %3, align 8, !tbaa !12
  %105 = load ptr, ptr %6, align 8, !tbaa !18
  %106 = getelementptr inbounds %struct._VlScaleSpace, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %106, i32 0, i32 2
  %108 = load i64, ptr %107, align 8, !tbaa !24
  %109 = sub nsw i64 %104, %108
  %110 = getelementptr inbounds ptr, ptr %103, i64 %109
  store ptr %100, ptr %110, align 8, !tbaa !18
  %111 = load ptr, ptr %6, align 8, !tbaa !18
  %112 = getelementptr inbounds %struct._VlScaleSpace, ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !22
  %114 = load i64, ptr %3, align 8, !tbaa !12
  %115 = load ptr, ptr %6, align 8, !tbaa !18
  %116 = getelementptr inbounds %struct._VlScaleSpace, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %116, i32 0, i32 2
  %118 = load i64, ptr %117, align 8, !tbaa !24
  %119 = sub nsw i64 %114, %118
  %120 = getelementptr inbounds ptr, ptr %113, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !18
  %122 = icmp eq ptr %121, null
  br i1 %122, label %123, label %124

123:                                              ; preds = %88
  store i32 7, ptr %9, align 4
  br label %125

124:                                              ; preds = %88
  store i32 0, ptr %9, align 4
  br label %125

125:                                              ; preds = %124, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  %126 = load i32, ptr %9, align 4
  switch i32 %126, label %178 [
    i32 0, label %127
    i32 7, label %133
  ]

127:                                              ; preds = %125
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %3, align 8, !tbaa !12
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %3, align 8, !tbaa !12
  br label %81, !llvm.loop !29

131:                                              ; preds = %81
  %132 = load ptr, ptr %6, align 8, !tbaa !18
  store ptr %132, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %178

133:                                              ; preds = %125
  %134 = load ptr, ptr %6, align 8, !tbaa !18
  %135 = getelementptr inbounds %struct._VlScaleSpace, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %135, i32 0, i32 2
  %137 = load i64, ptr %136, align 8, !tbaa !24
  store i64 %137, ptr %3, align 8, !tbaa !12
  br label %138

138:                                              ; preds = %171, %133
  %139 = load i64, ptr %3, align 8, !tbaa !12
  %140 = load ptr, ptr %6, align 8, !tbaa !18
  %141 = getelementptr inbounds %struct._VlScaleSpace, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %141, i32 0, i32 3
  %143 = load i64, ptr %142, align 8, !tbaa !25
  %144 = icmp sle i64 %139, %143
  br i1 %144, label %145, label %174

145:                                              ; preds = %138
  %146 = load ptr, ptr %6, align 8, !tbaa !18
  %147 = getelementptr inbounds %struct._VlScaleSpace, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !22
  %149 = load i64, ptr %3, align 8, !tbaa !12
  %150 = load ptr, ptr %6, align 8, !tbaa !18
  %151 = getelementptr inbounds %struct._VlScaleSpace, ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %151, i32 0, i32 2
  %153 = load i64, ptr %152, align 8, !tbaa !24
  %154 = sub nsw i64 %149, %153
  %155 = getelementptr inbounds ptr, ptr %148, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !18
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %170

158:                                              ; preds = %145
  %159 = load ptr, ptr %6, align 8, !tbaa !18
  %160 = getelementptr inbounds %struct._VlScaleSpace, ptr %159, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !22
  %162 = load i64, ptr %3, align 8, !tbaa !12
  %163 = load ptr, ptr %6, align 8, !tbaa !18
  %164 = getelementptr inbounds %struct._VlScaleSpace, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %164, i32 0, i32 2
  %166 = load i64, ptr %165, align 8, !tbaa !24
  %167 = sub nsw i64 %162, %166
  %168 = getelementptr inbounds ptr, ptr %161, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !18
  call void @vl_free(ptr noundef %169)
  br label %170

170:                                              ; preds = %158, %145
  br label %171

171:                                              ; preds = %170
  %172 = load i64, ptr %3, align 8, !tbaa !12
  %173 = add nsw i64 %172, 1
  store i64 %173, ptr %3, align 8, !tbaa !12
  br label %138, !llvm.loop !31

174:                                              ; preds = %138
  br label %175

175:                                              ; preds = %174, %75
  %176 = load ptr, ptr %6, align 8, !tbaa !18
  call void @vl_free(ptr noundef %176)
  br label %177

177:                                              ; preds = %175, %63
  store ptr null, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %178

178:                                              ; preds = %177, %131, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %179 = load ptr, ptr %2, align 8
  ret ptr %179
}

declare ptr @vl_calloc(i64 noundef, i64 noundef) #4

declare ptr @vl_malloc(i64 noundef) #4

declare void @vl_free(ptr noundef) #4

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


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

%struct._VlScaleSpaceOctaveGeometry = type { i64, i64, double }
%struct._VlScaleSpaceGeometry = type { i64, i64, i64, i64, i64, i64, i64, double, double }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.vl_scalespace_new_with_geometry = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local void @vl_scalespace_get_octave_geometry(ptr dead_on_unwind noalias writable sret(%struct._VlScaleSpaceOctaveGeometry) align 8, ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @vl_scalespace_new_with_geometry(ptr nocapture noundef readonly byval(%struct._VlScaleSpaceGeometry) align 8 %0) local_unnamed_addr #2 {
  %2 = alloca %struct._VlScaleSpaceOctaveGeometry, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 48
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = load i64, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load i64, ptr %7, align 8, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load i64, ptr %9, align 8, !tbaa !13
  %11 = icmp sle i64 %10, %8
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load i64, ptr %12, align 8
  %14 = icmp ne i64 %13, 0
  %or.cond = select i1 %11, i1 %14, i1 false
  br i1 %or.cond, label %15, label %23

15:                                               ; preds = %1
  %16 = icmp sle i64 %6, %4
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load double, ptr %17, align 8
  %19 = fcmp oge double %18, 0.000000e+00
  %or.cond5 = select i1 %16, i1 %19, i1 false
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  %21 = load double, ptr %20, align 8
  %22 = fcmp oge double %21, 0.000000e+00
  %or.cond8 = select i1 %or.cond5, i1 %22, i1 false
  br i1 %or.cond8, label %24, label %23

23:                                               ; preds = %15, %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 566, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_scalespace_new_with_geometry) #5
  unreachable

24:                                               ; preds = %15
  %25 = add i64 %4, 1
  %26 = sub i64 %25, %6
  %27 = tail call ptr @vl_calloc(i64 noundef 1, i64 noundef 80) #6
  %28 = icmp eq ptr %27, null
  br i1 %28, label %.loopexit47, label %29

29:                                               ; preds = %24
  %30 = add i64 %8, 1
  %31 = sub i64 %30, %10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %27, ptr noundef nonnull align 8 dereferenceable(72) %0, i64 72, i1 false), !tbaa.struct !14
  %32 = tail call ptr @vl_calloc(i64 noundef %31, i64 noundef 8) #6
  %33 = getelementptr inbounds i8, ptr %27, i64 72
  store ptr %32, ptr %33, align 8, !tbaa !17
  %34 = icmp eq ptr %32, null
  br i1 %34, label %.loopexit, label %35

35:                                               ; preds = %29
  %36 = getelementptr inbounds i8, ptr %27, i64 16
  %37 = load i64, ptr %36, align 8, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %27, i64 24
  %39 = load i64, ptr %38, align 8, !tbaa !21
  %.not49 = icmp sgt i64 %37, %39
  br i1 %.not49, label %.loopexit47, label %.lr.ph

.lr.ph:                                           ; preds = %35
  %40 = getelementptr inbounds i8, ptr %2, i64 8
  %41 = shl i64 %26, 2
  br label %45

42:                                               ; preds = %45
  %43 = add nsw i64 %.04150, 1
  %44 = load i64, ptr %38, align 8, !tbaa !21
  %.not.not = icmp slt i64 %.04150, %44
  br i1 %.not.not, label %45, label %.loopexit47, !llvm.loop !22

45:                                               ; preds = %.lr.ph, %42
  %.04150 = phi i64 [ %37, %.lr.ph ], [ %43, %42 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @vl_scalespace_get_octave_geometry(ptr dead_on_unwind nonnull writable sret(%struct._VlScaleSpaceOctaveGeometry) align 8 %2, ptr noundef nonnull %27, i64 noundef %.04150)
  %46 = load i64, ptr %2, align 8, !tbaa !24
  %47 = load i64, ptr %40, align 8, !tbaa !26
  %48 = mul i64 %41, %46
  %49 = mul i64 %48, %47
  %50 = call ptr @vl_malloc(i64 noundef %49) #6
  %51 = load ptr, ptr %33, align 8, !tbaa !17
  %52 = load i64, ptr %36, align 8, !tbaa !20
  %53 = sub nsw i64 %.04150, %52
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  store ptr %50, ptr %54, align 8, !tbaa !27
  %55 = load ptr, ptr %33, align 8, !tbaa !17
  %56 = getelementptr inbounds ptr, ptr %55, i64 %53
  %57 = load ptr, ptr %56, align 8, !tbaa !27
  %58 = icmp eq ptr %57, null
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  br i1 %58, label %59, label %42

59:                                               ; preds = %45
  %60 = load i64, ptr %38, align 8, !tbaa !21
  %.not4451 = icmp sgt i64 %52, %60
  br i1 %.not4451, label %.loopexit, label %.lr.ph53

.lr.ph53:                                         ; preds = %59, %68
  %61 = phi i64 [ %69, %68 ], [ %60, %59 ]
  %.152 = phi i64 [ %70, %68 ], [ %52, %59 ]
  %62 = load ptr, ptr %33, align 8, !tbaa !17
  %63 = load i64, ptr %36, align 8, !tbaa !20
  %64 = sub nsw i64 %.152, %63
  %65 = getelementptr inbounds ptr, ptr %62, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !27
  %.not45 = icmp eq ptr %66, null
  br i1 %.not45, label %68, label %67

67:                                               ; preds = %.lr.ph53
  call void @vl_free(ptr noundef nonnull %66) #6
  %.pre = load i64, ptr %38, align 8, !tbaa !21
  br label %68

68:                                               ; preds = %.lr.ph53, %67
  %69 = phi i64 [ %61, %.lr.ph53 ], [ %.pre, %67 ]
  %70 = add nsw i64 %.152, 1
  %.not44.not = icmp slt i64 %.152, %69
  br i1 %.not44.not, label %.lr.ph53, label %.loopexit, !llvm.loop !28

.loopexit:                                        ; preds = %68, %59, %29
  call void @vl_free(ptr noundef nonnull %27) #6
  br label %.loopexit47

.loopexit47:                                      ; preds = %42, %35, %.loopexit, %24
  %.040 = phi ptr [ null, %24 ], [ null, %.loopexit ], [ %27, %35 ], [ %27, %42 ]
  ret ptr %.040
}

declare ptr @vl_calloc(i64 noundef, i64 noundef) local_unnamed_addr #4

declare ptr @vl_malloc(i64 noundef) local_unnamed_addr #4

declare void @vl_free(ptr noundef) local_unnamed_addr #4

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


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