; LLVM IR from dnbaker/sketch :: testsrc (lpcqf_approx)

; 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::initializer_list" = type { ptr, i64 }
%"struct.sketch::LPCQF" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }
%"struct.schism::Schismatic" = type { i32, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sketch::LPCQF.0" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }
%"struct.sketch::LPCQF.1" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [48 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [47 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::initializer_list", align 8
  %6 = alloca [2 x i32], align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.sketch::LPCQF", align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.sketch::LPCQF.0", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.sketch::LPCQF.1", align 8
  %18 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 70, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i32 500, ptr %6, align 4, !tbaa !9
  %19 = getelementptr inbounds i32, ptr %6, i64 1
  store i32 25, ptr %19, align 4, !tbaa !9
  %20 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 0
  store ptr %6, ptr %20, align 8, !tbaa !11
  %21 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 1
  store i64 2, ptr %21, align 8, !tbaa !14
  store ptr %5, ptr %4, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %22 = load ptr, ptr %4, align 8, !tbaa !15
  %23 = call noundef ptr @_ZNKSt16initializer_listIiE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  store ptr %23, ptr %7, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %24 = load ptr, ptr %4, align 8, !tbaa !15
  %25 = call noundef ptr @_ZNKSt16initializer_listIiE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %24) #6
  store ptr %25, ptr %8, align 8, !tbaa !15
  br label %26

26:                                               ; preds = %125, %0
  %27 = load ptr, ptr %7, align 8, !tbaa !15
  %28 = load ptr, ptr %8, align 8, !tbaa !15
  %29 = icmp ne ptr %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %130

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %32 = load ptr, ptr %7, align 8, !tbaa !15
  %33 = load i32, ptr %32, align 4, !tbaa !9
  store i32 %33, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 88, ptr %11) #6
  %34 = load i64, ptr %3, align 8, !tbaa !5
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %11, i64 noundef %34, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %58, %31
  %36 = load i64, ptr %12, align 8, !tbaa !5
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %65

40:                                               ; preds = %35
  %41 = load i64, ptr %12, align 8, !tbaa !5
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = load i64, ptr %12, align 8, !tbaa !5
  %45 = add i64 %43, %44
  %46 = add i64 %45, 1
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %11, i64 noundef %41, i64 noundef %46)
          to label %47 unwind label %61

47:                                               ; preds = %40
  %48 = load ptr, ptr @stderr, align 8, !tbaa !15
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = load i64, ptr %12, align 8, !tbaa !5
  %52 = add i64 %50, %51
  %53 = add i64 %52, 1
  %54 = load i64, ptr %12, align 8, !tbaa !5
  %55 = invoke noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %11, i64 noundef %54)
          to label %56 unwind label %61

56:                                               ; preds = %47
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str, i64 noundef %53, x86_fp80 noundef %55, x86_fp80 noundef 0xK40008000000000000000) #6
  br label %58

58:                                               ; preds = %56
  %59 = load i64, ptr %12, align 8, !tbaa !5
  %60 = add i64 %59, 1
  store i64 %60, ptr %12, align 8, !tbaa !5
  br label %35, !llvm.loop !16

61:                                               ; preds = %47, %40
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %13, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %129

65:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 88, ptr %15) #6
  %66 = load i64, ptr %3, align 8, !tbaa !5
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %15, i64 noundef %66, i64 noundef 0)
          to label %67 unwind label %73

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %87, %67
  %69 = load i64, ptr %16, align 8, !tbaa !5
  %70 = load i64, ptr %2, align 8, !tbaa !5
  %71 = icmp ult i64 %69, %70
  br i1 %71, label %77, label %72

72:                                               ; preds = %68
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %94

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %13, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %14, align 4
  br label %102

77:                                               ; preds = %68
  %78 = load i64, ptr %16, align 8, !tbaa !5
  %79 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %15, i64 noundef %78, i32 noundef %79)
          to label %80 unwind label %90

80:                                               ; preds = %77
  %81 = load ptr, ptr @stderr, align 8, !tbaa !15
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = load i64, ptr %16, align 8, !tbaa !5
  %84 = invoke noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %15, i64 noundef %83)
          to label %85 unwind label %90

85:                                               ; preds = %80
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.1, i32 noundef %82, x86_fp80 noundef 0xK3FFF851EB851EB851EB8, x86_fp80 noundef %84) #6
  br label %87

87:                                               ; preds = %85
  %88 = load i64, ptr %16, align 8, !tbaa !5
  %89 = add i64 %88, 1
  store i64 %89, ptr %16, align 8, !tbaa !5
  br label %68, !llvm.loop !18

90:                                               ; preds = %80, %77
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %13, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %15) #6
  br label %102

94:                                               ; preds = %72
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %15) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 88, ptr %17) #6
  %95 = load i64, ptr %3, align 8, !tbaa !5
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %17, i64 noundef %95, i64 noundef 0)
          to label %96 unwind label %103

96:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 0, ptr %18, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %117, %96
  %98 = load i64, ptr %18, align 8, !tbaa !5
  %99 = load i64, ptr %2, align 8, !tbaa !5
  %100 = icmp ult i64 %98, %99
  br i1 %100, label %107, label %101

101:                                              ; preds = %97
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %124

102:                                              ; preds = %90, %73
  call void @llvm.lifetime.end.p0(i64 88, ptr %15) #6
  br label %129

103:                                              ; preds = %94
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %13, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %14, align 4
  br label %128

107:                                              ; preds = %97
  %108 = load i64, ptr %18, align 8, !tbaa !5
  %109 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %17, i64 noundef %108, i32 noundef %109)
          to label %110 unwind label %120

110:                                              ; preds = %107
  %111 = load ptr, ptr @stderr, align 8, !tbaa !15
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = load i64, ptr %18, align 8, !tbaa !5
  %114 = invoke noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %17, i64 noundef %113)
          to label %115 unwind label %120

115:                                              ; preds = %110
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.1, i32 noundef %112, x86_fp80 noundef 0xK3FFF8009D495182A9931, x86_fp80 noundef %114) #6
  br label %117

117:                                              ; preds = %115
  %118 = load i64, ptr %18, align 8, !tbaa !5
  %119 = add i64 %118, 1
  store i64 %119, ptr %18, align 8, !tbaa !5
  br label %97, !llvm.loop !19

120:                                              ; preds = %110, %107
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %17) #6
  br label %128

124:                                              ; preds = %101
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %17) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %17) #6
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %7, align 8, !tbaa !15
  %127 = getelementptr inbounds i32, ptr %126, i32 1
  store ptr %127, ptr %7, align 8, !tbaa !15
  br label %26

128:                                              ; preds = %120, %103
  call void @llvm.lifetime.end.p0(i64 88, ptr %17) #6
  br label %129

129:                                              ; preds = %128, %102, %61
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %132

130:                                              ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %131 = load i32, ptr %1, align 4
  ret i32 %131

132:                                              ; preds = %129
  %133 = load ptr, ptr %13, align 8
  %134 = load i32, ptr %14, align 4
  %135 = insertvalue { ptr, i32 } poison, ptr %133, 0
  %136 = insertvalue { ptr, i32 } %135, i32 %134, 1
  resume { ptr, i32 } %136
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt16initializer_listIiE5beginEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt16initializer_listIiE3endEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) #3 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse 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 = { 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 #3 = { 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 #4 = { 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 #5 = { inlinehint 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 #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, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSSt16initializer_listIiE", !13, i64 0, !6, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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::initializer_list" = type { ptr, i64 }
%"struct.sketch::LPCQF" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }
%"struct.schism::Schismatic" = type { i32, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, sse::AlignedAllocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sketch::LPCQF.0" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }
%"struct.sketch::LPCQF.1" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [48 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [47 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::initializer_list", align 8
  %2 = alloca [2 x i32], align 4
  %3 = alloca %"struct.sketch::LPCQF", align 8
  %4 = alloca %"struct.sketch::LPCQF.0", align 8
  %5 = alloca %"struct.sketch::LPCQF.1", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  store i32 500, ptr %2, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 25, ptr %6, align 4, !tbaa !5
  store ptr %2, ptr %1, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 2, ptr %7, align 8, !tbaa !13
  %8 = call noundef ptr @_ZNKSt16initializer_listIiE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  %9 = call noundef ptr @_ZNKSt16initializer_listIiE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  %.not50 = icmp eq ptr %8, %9
  br i1 %.not50, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %35, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  ret i32 0

.lr.ph:                                           ; preds = %0, %35
  %.04051 = phi ptr [ %36, %35 ], [ %8, %0 ]
  %10 = load i32, ptr %.04051, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %3) #6
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %3, i64 noundef 64, i64 noundef 0)
  %11 = sext i32 %10 to i64
  %12 = add nsw i64 %11, 1
  br label %14

13:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %4) #6
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef 64, i64 noundef 0)
          to label %.preheader46 unwind label %25

14:                                               ; preds = %.lr.ph, %19
  %.03947 = phi i64 [ 0, %.lr.ph ], [ %21, %19 ]
  %15 = add nsw i64 %12, %.03947
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %3, i64 noundef %.03947, i64 noundef %15)
          to label %16 unwind label %22

16:                                               ; preds = %14
  %17 = load ptr, ptr @stderr, align 8, !tbaa !14
  %18 = invoke noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %3, i64 noundef %.03947)
          to label %19 unwind label %22

19:                                               ; preds = %16
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str, i64 noundef %15, x86_fp80 noundef %18, x86_fp80 noundef 0xK40008000000000000000) #7
  %21 = add nuw nsw i64 %.03947, 1
  %exitcond.not = icmp eq i64 %21, 70
  br i1 %exitcond.not, label %13, label %14, !llvm.loop !15

22:                                               ; preds = %16, %14
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %49

24:                                               ; preds = %30
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %5) #6
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %5, i64 noundef 64, i64 noundef 0)
          to label %.preheader unwind label %38

25:                                               ; preds = %13
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %37

.preheader46:                                     ; preds = %13, %30
  %.03448 = phi i64 [ %32, %30 ], [ 0, %13 ]
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef %.03448, i32 noundef %10)
          to label %27 unwind label %33

27:                                               ; preds = %.preheader46
  %28 = load ptr, ptr @stderr, align 8, !tbaa !14
  %29 = invoke noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef %.03448)
          to label %30 unwind label %33

30:                                               ; preds = %27
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.1, i32 noundef %10, x86_fp80 noundef 0xK3FFF851EB851EB851EB8, x86_fp80 noundef %29) #7
  %32 = add nuw nsw i64 %.03448, 1
  %exitcond52.not = icmp eq i64 %32, 70
  br i1 %exitcond52.not, label %24, label %.preheader46, !llvm.loop !17

33:                                               ; preds = %27, %.preheader46
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #6
  br label %37

35:                                               ; preds = %43
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #6
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #6
  %36 = getelementptr inbounds i8, ptr %.04051, i64 4
  %.not = icmp eq ptr %36, %9
  br i1 %.not, label %._crit_edge, label %.lr.ph

37:                                               ; preds = %33, %25
  %.pn42 = phi { ptr, i32 } [ %34, %33 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #6
  br label %49

38:                                               ; preds = %24
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %48

.preheader:                                       ; preds = %24, %43
  %.049 = phi i64 [ %45, %43 ], [ 0, %24 ]
  invoke void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %5, i64 noundef %.049, i32 noundef %10)
          to label %40 unwind label %46

40:                                               ; preds = %.preheader
  %41 = load ptr, ptr @stderr, align 8, !tbaa !14
  %42 = invoke noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %5, i64 noundef %.049)
          to label %43 unwind label %46

43:                                               ; preds = %40
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.1, i32 noundef %10, x86_fp80 noundef 0xK3FFF8009D495182A9931, x86_fp80 noundef %42) #7
  %45 = add nuw nsw i64 %.049, 1
  %exitcond53.not = icmp eq i64 %45, 70
  br i1 %exitcond53.not, label %35, label %.preheader, !llvm.loop !18

46:                                               ; preds = %40, %.preheader
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #6
  br label %48

48:                                               ; preds = %46, %38
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #6
  br label %49

49:                                               ; preds = %48, %37, %22
  %.pn44 = phi { ptr, i32 } [ %23, %22 ], [ %.pn42, %37 ], [ %.pn, %48 ]
  call void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn44
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt16initializer_listIiE5beginEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt16initializer_listIiE3endEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm52ELm50EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE6updateIivEEvmT_(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZNK6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm10003ELm10000EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFItLm2ELi11ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { cold 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIiE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass