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

; 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._VlScaleSpaceGeometry = type { i64, i64, i64, i64, i64, i64, i64, double, double }
%struct._VlCovDet = type { ptr, ptr, i32, double, double, double, i64, i64, double, i64, ptr, i64, i64, ptr, i64, i32, [4 x %struct._VlCovDetFeatureOrientation], [4 x %struct._VlCovDetFeatureLaplacianScale], i32, [1681 x float], [1681 x float], [1681 x float], [1681 x float], [1089 x float], [10890 x float], [5 x i64] }
%struct._VlCovDetFeatureOrientation = type { double, double }
%struct._VlCovDetFeatureLaplacianScale = type { double, double }

@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__.vl_covdet_put_image = external hidden unnamed_addr constant [69 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare void @vl_scalespace_delete(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @vl_covdet_put_image(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) #3 {
  %5 = alloca i32, align 4
  %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 i64, align 8
  %14 = alloca %struct._VlScaleSpaceGeometry, align 8
  %15 = alloca %struct._VlScaleSpaceGeometry, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i64 %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 16, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, 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
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #5
  %17 = load i64, ptr %8, align 8, !tbaa !9
  %18 = load i64, ptr %9, align 8, !tbaa !9
  call void @vl_scalespace_get_default_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceGeometry) align 8 %14, i64 noundef %17, i64 noundef %18)
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %4
  br label %23

22:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 1693, ptr noundef @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

23:                                               ; preds = %21
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  br label %28

27:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 1694, ptr noundef @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

28:                                               ; preds = %26
  %29 = load i64, ptr %8, align 8, !tbaa !9
  %30 = icmp uge i64 %29, 1
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  br label %33

32:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 1695, ptr noundef @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

33:                                               ; preds = %31
  %34 = load i64, ptr %9, align 8, !tbaa !9
  %35 = icmp uge i64 %34, 1
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  br label %38

37:                                               ; preds = %33
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 1696, ptr noundef @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

38:                                               ; preds = %36
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = uitofp i64 %39 to double
  %41 = fsub double %40, 1.000000e+00
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = uitofp i64 %42 to double
  %44 = fsub double %43, 1.000000e+00
  %45 = fcmp olt double %41, %44
  br i1 %45, label %46, label %50

46:                                               ; preds = %38
  %47 = load i64, ptr %8, align 8, !tbaa !9
  %48 = uitofp i64 %47 to double
  %49 = fsub double %48, 1.000000e+00
  br label %54

50:                                               ; preds = %38
  %51 = load i64, ptr %9, align 8, !tbaa !9
  %52 = uitofp i64 %51 to double
  %53 = fsub double %52, 1.000000e+00
  br label %54

54:                                               ; preds = %50, %46
  %55 = phi double [ %49, %46 ], [ %53, %50 ]
  %56 = fdiv double %55, 1.500000e+01
  %57 = call double @vl_log2_d(double noundef %56)
  %58 = call i64 @vl_floor_d(double noundef %57)
  store i64 %58, ptr %11, align 8, !tbaa !9
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._VlCovDet, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 8, !tbaa !11
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %63, label %68

63:                                               ; preds = %54
  store i64 -1, ptr %12, align 8, !tbaa !9
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._VlCovDet, ptr %64, i32 0, i32 6
  %66 = load i64, ptr %65, align 8, !tbaa !15
  %67 = add i64 %66, 1
  store i64 %67, ptr %13, align 8, !tbaa !9
  br label %83

68:                                               ; preds = %54
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._VlCovDet, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 8, !tbaa !11
  %72 = icmp eq i32 %71, 2
  br i1 %72, label %73, label %77

73:                                               ; preds = %68
  store i64 -1, ptr %12, align 8, !tbaa !9
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._VlCovDet, ptr %74, i32 0, i32 6
  %76 = load i64, ptr %75, align 8, !tbaa !15
  store i64 %76, ptr %13, align 8, !tbaa !9
  br label %82

77:                                               ; preds = %68
  store i64 0, ptr %12, align 8, !tbaa !9
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._VlCovDet, ptr %78, i32 0, i32 6
  %80 = load i64, ptr %79, align 8, !tbaa !15
  %81 = sub i64 %80, 1
  store i64 %81, ptr %13, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %77, %73
  br label %83

83:                                               ; preds = %82, %63
  %84 = load i64, ptr %8, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 0
  store i64 %84, ptr %85, align 8, !tbaa !16
  %86 = load i64, ptr %9, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 1
  store i64 %86, ptr %87, align 8, !tbaa !18
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._VlCovDet, ptr %88, i32 0, i32 7
  %90 = load i64, ptr %89, align 8, !tbaa !19
  %91 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 2
  store i64 %90, ptr %91, align 8, !tbaa !20
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 3
  store i64 %92, ptr %93, align 8, !tbaa !21
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._VlCovDet, ptr %94, i32 0, i32 6
  %96 = load i64, ptr %95, align 8, !tbaa !15
  %97 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 4
  store i64 %96, ptr %97, align 8, !tbaa !22
  %98 = load i64, ptr %12, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 5
  store i64 %98, ptr %99, align 8, !tbaa !23
  %100 = load i64, ptr %13, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct._VlScaleSpaceGeometry, ptr %14, i32 0, i32 6
  store i64 %100, ptr %101, align 8, !tbaa !24
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._VlCovDet, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !25
  %105 = icmp eq ptr %104, null
  br i1 %105, label %112, label %106

106:                                              ; preds = %83
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._VlCovDet, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !25
  call void @vl_scalespace_get_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceGeometry) align 8 %15, ptr noundef %109)
  %110 = call i32 @vl_scalespacegeometry_is_equal(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8 %14, ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8 %15)
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %131, label %112

112:                                              ; preds = %106, %83
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._VlCovDet, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !25
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %121

117:                                              ; preds = %112
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._VlCovDet, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !25
  call void @vl_scalespace_delete(ptr noundef %120)
  br label %121

121:                                              ; preds = %117, %112
  %122 = call ptr @vl_scalespace_new_with_geometry(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8 %14)
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._VlCovDet, ptr %123, i32 0, i32 0
  store ptr %122, ptr %124, align 8, !tbaa !25
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._VlCovDet, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !25
  %128 = icmp eq ptr %127, null
  br i1 %128, label %129, label %130

129:                                              ; preds = %121
  store i32 2, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %136

130:                                              ; preds = %121
  br label %131

131:                                              ; preds = %130, %106
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._VlCovDet, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !25
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  call void @vl_scalespace_put_image(ptr noundef %134, ptr noundef %135)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %136

136:                                              ; preds = %131, %129
  call void @llvm.lifetime.end.p0(i64 72, 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 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %137 = load i32, ptr %5, align 4
  ret i32 %137
}

declare void @vl_scalespace_get_default_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceGeometry) align 8, i64 noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_floor_d(double noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @vl_log2_d(double noundef) #4

declare i32 @vl_scalespacegeometry_is_equal(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8, ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8) #2

declare void @vl_scalespace_get_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceGeometry) align 8, ptr noundef) #2

declare ptr @vl_scalespace_new_with_geometry(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8) #2

declare void @vl_scalespace_put_image(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"_VlCovDet", !6, i64 0, !6, i64 8, !13, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !10, i64 48, !10, i64 56, !14, i64 64, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !10, i64 112, !13, i64 120, !7, i64 128, !7, i64 192, !13, i64 256, !7, i64 260, !7, i64 6984, !7, i64 13708, !7, i64 20432, !7, i64 27156, !7, i64 31512, !7, i64 75072}
!13 = !{!"int", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!12, !10, i64 48}
!16 = !{!17, !10, i64 0}
!17 = !{!"_VlScaleSpaceGeometry", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !14, i64 56, !14, i64 64}
!18 = !{!17, !10, i64 8}
!19 = !{!12, !10, i64 56}
!20 = !{!17, !10, i64 16}
!21 = !{!17, !10, i64 24}
!22 = !{!17, !10, i64 32}
!23 = !{!17, !10, i64 40}
!24 = !{!17, !10, i64 48}
!25 = !{!12, !6, i64 0}


; 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._VlScaleSpaceGeometry = type { i64, i64, i64, i64, i64, i64, i64, double, double }

@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__.vl_covdet_put_image = external hidden unnamed_addr constant [69 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare void @vl_scalespace_delete(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @vl_covdet_put_image(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #3 {
  %5 = alloca %struct._VlScaleSpaceGeometry, align 8
  %6 = alloca %struct._VlScaleSpaceGeometry, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #5
  call void @vl_scalespace_get_default_geometry(ptr dead_on_unwind nonnull writable sret(%struct._VlScaleSpaceGeometry) align 8 %5, i64 noundef %2, i64 noundef %3) #5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %8

7:                                                ; preds = %4
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 1693, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

8:                                                ; preds = %4
  %.not41 = icmp eq ptr %1, null
  br i1 %.not41, label %9, label %10

9:                                                ; preds = %8
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 1694, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

10:                                               ; preds = %8
  %.not42 = icmp eq i64 %2, 0
  br i1 %.not42, label %11, label %12

11:                                               ; preds = %10
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 1695, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

12:                                               ; preds = %10
  %.not43 = icmp eq i64 %3, 0
  br i1 %.not43, label %13, label %14

13:                                               ; preds = %12
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 1696, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_covdet_put_image) #6
  unreachable

14:                                               ; preds = %12
  %15 = insertelement <2 x i64> poison, i64 %2, i64 0
  %16 = insertelement <2 x i64> %15, i64 %3, i64 1
  %17 = uitofp <2 x i64> %16 to <2 x double>
  %18 = fadd <2 x double> %17, <double -1.000000e+00, double -1.000000e+00>
  %19 = extractelement <2 x double> %18, i64 0
  %20 = extractelement <2 x double> %18, i64 1
  %21 = fcmp olt double %19, %20
  %. = select i1 %21, double %19, double %20
  %22 = fdiv double %., 1.500000e+01
  %23 = call double @vl_log2_d(double noundef %22)
  %24 = call i64 @vl_floor_d(double noundef %23)
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = load i32, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  %28 = load i64, ptr %27, align 8, !tbaa !13
  switch i32 %26, label %31 [
    i32 1, label %29
    i32 2, label %33
  ]

29:                                               ; preds = %14
  %30 = add i64 %28, 1
  br label %33

31:                                               ; preds = %14
  %32 = add i64 %28, -1
  br label %33

33:                                               ; preds = %14, %31, %29
  %.030 = phi i64 [ -1, %29 ], [ 0, %31 ], [ -1, %14 ]
  %.0 = phi i64 [ %30, %29 ], [ %32, %31 ], [ %28, %14 ]
  store i64 %2, ptr %5, align 8, !tbaa !14
  %34 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %3, ptr %34, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %0, i64 56
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 %36, ptr %37, align 8, !tbaa !18
  %38 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 %24, ptr %38, align 8, !tbaa !19
  %39 = getelementptr inbounds i8, ptr %5, i64 32
  store i64 %28, ptr %39, align 8, !tbaa !20
  %40 = getelementptr inbounds i8, ptr %5, i64 40
  store i64 %.030, ptr %40, align 8, !tbaa !21
  %41 = getelementptr inbounds i8, ptr %5, i64 48
  store i64 %.0, ptr %41, align 8, !tbaa !22
  %42 = load ptr, ptr %0, align 8, !tbaa !23
  %43 = icmp eq ptr %42, null
  br i1 %43, label %.thread, label %44

44:                                               ; preds = %33
  call void @vl_scalespace_get_geometry(ptr dead_on_unwind nonnull writable sret(%struct._VlScaleSpaceGeometry) align 8 %6, ptr noundef nonnull %42) #5
  %45 = call i32 @vl_scalespacegeometry_is_equal(ptr noundef nonnull byval(%struct._VlScaleSpaceGeometry) align 8 %5, ptr noundef nonnull byval(%struct._VlScaleSpaceGeometry) align 8 %6) #5
  %.not44 = icmp eq i32 %45, 0
  %.pre = load ptr, ptr %0, align 8, !tbaa !23
  br i1 %.not44, label %46, label %50

46:                                               ; preds = %44
  %.not45 = icmp eq ptr %.pre, null
  br i1 %.not45, label %.thread, label %47

47:                                               ; preds = %46
  call void @vl_scalespace_delete(ptr noundef nonnull %.pre) #5
  br label %.thread

.thread:                                          ; preds = %33, %47, %46
  %48 = call ptr @vl_scalespace_new_with_geometry(ptr noundef nonnull byval(%struct._VlScaleSpaceGeometry) align 8 %5) #5
  store ptr %48, ptr %0, align 8, !tbaa !23
  %49 = icmp eq ptr %48, null
  br i1 %49, label %52, label %50

50:                                               ; preds = %.thread, %44
  %51 = phi ptr [ %48, %.thread ], [ %.pre, %44 ]
  call void @vl_scalespace_put_image(ptr noundef %51, ptr noundef nonnull %1) #5
  br label %52

52:                                               ; preds = %.thread, %50
  %.031 = phi i32 [ 0, %50 ], [ 2, %.thread ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #5
  ret i32 %.031
}

declare void @vl_scalespace_get_default_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceGeometry) align 8, i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_floor_d(double noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @vl_log2_d(double noundef) local_unnamed_addr #4

declare i32 @vl_scalespacegeometry_is_equal(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8, ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8) local_unnamed_addr #2

declare void @vl_scalespace_get_geometry(ptr dead_on_unwind writable sret(%struct._VlScaleSpaceGeometry) align 8, ptr noundef) local_unnamed_addr #2

declare ptr @vl_scalespace_new_with_geometry(ptr noundef byval(%struct._VlScaleSpaceGeometry) align 8) local_unnamed_addr #2

declare void @vl_scalespace_put_image(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !10, i64 16}
!6 = !{!"_VlCovDet", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !12, i64 56, !11, i64 64, !12, i64 72, !7, i64 80, !12, i64 88, !12, i64 96, !7, i64 104, !12, i64 112, !10, i64 120, !8, i64 128, !8, i64 192, !10, i64 256, !8, i64 260, !8, i64 6984, !8, i64 13708, !8, i64 20432, !8, i64 27156, !8, i64 31512, !8, i64 75072}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!6, !12, i64 48}
!14 = !{!15, !12, i64 0}
!15 = !{!"_VlScaleSpaceGeometry", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !11, i64 56, !11, i64 64}
!16 = !{!15, !12, i64 8}
!17 = !{!6, !12, i64 56}
!18 = !{!15, !12, i64 16}
!19 = !{!15, !12, i64 24}
!20 = !{!15, !12, i64 32}
!21 = !{!15, !12, i64 40}
!22 = !{!15, !12, i64 48}
!23 = !{!6, !7, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass