; LLVM IR from cruppstahl/upscaledb :: tools/ups_bench/generator_parser.ll (ZN15ParserGenerator15generate_recordEPKc)

; 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.ups_record_t = type { i32, ptr, i32 }
%class.Generator = type <{ ptr, i32, [4 x i8], ptr, ptr, i32, [4 x i8], %struct.ups_record_t, ptr, [4 x i32], i8, [7 x i8] }>
%struct.Configuration = type <{ i8, [3 x i8], i32, i8, i8, i8, [5 x i8], %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i32, i32, i8, [3 x i8], i32, i64, i64, i64, i64, i32, i8, [3 x i8], i32, i32, i32, i32, i8, i8, [2 x i8], i32, i8, [3 x i8], i32, i8, i8, i8, i8, i8, [3 x i8], i32, i32, i32, i8, i8, i8, i8, i32, i32, %"class.std::__cxx11::basic_string", i32, i32, i32, i8, i8, [2 x i8], i32, i32, i32, i8, i8, i8, i8, i32, i8, i8, [2 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.ParserGenerator = type { %class.Generator.base, ptr, ptr, ptr, i8, %struct.Metrics, %"class.std::vector", i32, %struct.Timer, i32, ptr, %"class.std::vector" }
%class.Generator.base = type <{ ptr, i32, [4 x i8], ptr, ptr, i32, [4 x i8], %struct.ups_record_t, ptr, [4 x i32], i8 }>
%struct.Metrics = type { ptr, i64, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, %struct.ups_env_metrics_t }
%struct.ups_env_metrics_t = type { i16, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.btree_metrics_t, %struct.btree_metrics_t, i32 }
%struct.btree_metrics_t = type { i16, i64, i64, i64, i32, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t }
%struct.min_max_avg_u32_t = type { i32, i32, i32, i32, i32 }
%struct.Timer = type { %"class.boost::chrono::time_point" }
%"class.boost::chrono::time_point" = type { %"class.boost::chrono::duration" }
%"class.boost::chrono::duration" = type { i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN15ParserGenerator15generate_recordEPKc(ptr dead_on_unwind noalias writable sret(%struct.ups_record_t) align 8 %0, ptr noundef nonnull align 8 dereferenceable(1040) %1, ptr noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %1, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %5, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  %9 = getelementptr inbounds %class.Generator, ptr %8, i32 0, i32 3
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds %struct.Configuration, ptr %10, i32 0, i32 11
  %12 = load i32, ptr %11, align 8, !tbaa !15
  switch i32 %12, label %17 [
    i32 3, label %13
    i32 4, label %14
    i32 7, label %15
    i32 5, label %15
    i32 8, label %16
    i32 6, label %16
  ]

13:                                               ; preds = %3
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %21

14:                                               ; preds = %3
  store i32 2, ptr %6, align 4, !tbaa !9
  br label %21

15:                                               ; preds = %3, %3
  store i32 4, ptr %6, align 4, !tbaa !9
  br label %21

16:                                               ; preds = %3, %3
  store i32 8, ptr %6, align 4, !tbaa !9
  br label %21

17:                                               ; preds = %3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call i64 @strtoul(ptr noundef %18, ptr noundef null, i32 noundef 0) #5
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %6, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %17, %16, %15, %14, %13
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %74

24:                                               ; preds = %21
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 9
  %27 = load i32, ptr %26, align 8, !tbaa !20
  %28 = icmp ugt i32 %25, %27
  br i1 %28, label %29, label %38

29:                                               ; preds = %24
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 9
  store i32 %30, ptr %31, align 8, !tbaa !20
  %32 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 10
  %33 = load ptr, ptr %32, align 8, !tbaa !35
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = call ptr @realloc(ptr noundef %33, i64 noundef %35) #6
  %37 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 10
  store ptr %36, ptr %37, align 8, !tbaa !35
  br label %38

38:                                               ; preds = %29, %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %56, %38
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = icmp ult i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %59

44:                                               ; preds = %39
  %45 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 7
  %46 = load i32, ptr %45, align 8, !tbaa !36
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = add i32 %46, %47
  %49 = and i32 %48, 255
  %50 = trunc i32 %49 to i8
  %51 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 10
  %52 = load ptr, ptr %51, align 8, !tbaa !35
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %52, i64 %54
  store i8 %50, ptr %55, align 1, !tbaa !37
  br label %56

56:                                               ; preds = %44
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = add i32 %57, 1
  store i32 %58, ptr %7, align 4, !tbaa !9
  br label %39, !llvm.loop !38

59:                                               ; preds = %43
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = icmp uge i64 %61, 4
  br i1 %62, label %63, label %68

63:                                               ; preds = %59
  %64 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 7
  %65 = load i32, ptr %64, align 8, !tbaa !36
  %66 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 10
  %67 = load ptr, ptr %66, align 8, !tbaa !35
  store i32 %65, ptr %67, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %63, %59
  %69 = getelementptr inbounds %class.ParserGenerator, ptr %8, i32 0, i32 10
  %70 = load ptr, ptr %69, align 8, !tbaa !35
  %71 = getelementptr inbounds %struct.ups_record_t, ptr %0, i32 0, i32 1
  store ptr %70, ptr %71, align 8, !tbaa !40
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = getelementptr inbounds %struct.ups_record_t, ptr %0, i32 0, i32 0
  store i32 %72, ptr %73, align 8, !tbaa !41
  br label %74

74:                                               ; preds = %68, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret void
}

; Function Attrs: nounwind
declare i64 @strtoul(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTS9Generator", !10, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !6, i64 64, !7, i64 72, !14, i64 88}
!13 = !{!"_ZTS12ups_record_t", !10, i64 0, !6, i64 8, !10, i64 16}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !10, i64 56}
!16 = !{!"_ZTS13Configuration", !14, i64 0, !10, i64 4, !14, i64 8, !14, i64 9, !14, i64 10, !17, i64 16, !14, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !14, i64 64, !10, i64 68, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !10, i64 104, !14, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !14, i64 128, !14, i64 129, !10, i64 132, !14, i64 136, !10, i64 140, !14, i64 144, !14, i64 145, !14, i64 146, !14, i64 147, !14, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !14, i64 164, !14, i64 165, !14, i64 166, !10, i64 168, !10, i64 172, !17, i64 176, !10, i64 208, !10, i64 212, !10, i64 216, !14, i64 220, !14, i64 221, !10, i64 224, !10, i64 228, !10, i64 232, !14, i64 236, !14, i64 237, !14, i64 238, !14, i64 239, !10, i64 240, !14, i64 244, !14, i64 245}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !19, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !10, i64 1000}
!21 = !{!"_ZTS15ParserGenerator", !12, i64 0, !6, i64 96, !6, i64 104, !6, i64 112, !14, i64 120, !22, i64 128, !28, i64 960, !10, i64 984, !32, i64 992, !10, i64 1000, !6, i64 1008, !28, i64 1016}
!22 = !{!"_ZTS7Metrics", !6, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !23, i64 64, !23, i64 72, !23, i64 80, !23, i64 88, !23, i64 96, !23, i64 104, !23, i64 112, !23, i64 120, !23, i64 128, !23, i64 136, !23, i64 144, !23, i64 152, !23, i64 160, !24, i64 168}
!23 = !{!"double", !7, i64 0}
!24 = !{!"_ZTS17ups_env_metrics_t", !25, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !19, i64 120, !19, i64 128, !19, i64 136, !19, i64 144, !19, i64 152, !19, i64 160, !19, i64 168, !19, i64 176, !19, i64 184, !19, i64 192, !19, i64 200, !19, i64 208, !19, i64 216, !26, i64 224, !26, i64 440, !10, i64 656}
!25 = !{!"short", !7, i64 0}
!26 = !{!"_ZTS15btree_metrics_t", !25, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !10, i64 32, !27, i64 36, !27, i64 56, !27, i64 76, !27, i64 96, !27, i64 116, !27, i64 136, !27, i64 156, !27, i64 176, !27, i64 196}
!27 = !{!"_ZTS17min_max_avg_u32_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!28 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTS5TimerIN5boost6chrono12system_clockEE", !33, i64 0}
!33 = !{!"_ZTSN5boost6chrono10time_pointINS0_12system_clockENS0_8durationIlNS_5ratioILl1ELl1000000000EEEEEEE", !34, i64 0}
!34 = !{!"_ZTSN5boost6chrono8durationIlNS_5ratioILl1ELl1000000000EEEEE", !19, i64 0}
!35 = !{!21, !6, i64 1008}
!36 = !{!21, !10, i64 984}
!37 = !{!7, !7, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!13, !6, i64 8}
!41 = !{!13, !10, 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.ups_record_t = type { i32, ptr, i32 }

@switch.table._ZN15ParserGenerator15generate_recordEPKc = private unnamed_addr constant [6 x i32] [i32 1, i32 2, i32 4, i32 8, i32 4, i32 8], align 4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN15ParserGenerator15generate_recordEPKc(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.ups_record_t) align 8 %0, ptr nocapture noundef nonnull align 8 dereferenceable(1040) %1, ptr nocapture noundef readonly %2) local_unnamed_addr #1 align 2 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  %4 = getelementptr inbounds i8, ptr %1, i64 16
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 56
  %7 = load i32, ptr %6, align 8, !tbaa !13
  %switch.tableidx = add i32 %7, -3
  %8 = icmp ult i32 %switch.tableidx, 6
  br i1 %8, label %switch.lookup, label %9

9:                                                ; preds = %3
  %10 = tail call i64 @strtoul(ptr nocapture noundef %2, ptr noundef null, i32 noundef 0) #4
  %11 = trunc i64 %10 to i32
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %62, label %.thread

switch.lookup:                                    ; preds = %3
  %12 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [6 x i32], ptr @switch.table._ZN15ParserGenerator15generate_recordEPKc, i64 0, i64 %12
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %.thread

.thread:                                          ; preds = %switch.lookup, %9
  %.01215 = phi i32 [ %11, %9 ], [ %switch.load, %switch.lookup ]
  %13 = getelementptr inbounds i8, ptr %1, i64 1000
  %14 = load i32, ptr %13, align 8, !tbaa !18
  %15 = icmp ugt i32 %.01215, %14
  br i1 %15, label %16, label %21

16:                                               ; preds = %.thread
  store i32 %.01215, ptr %13, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %1, i64 1008
  %18 = load ptr, ptr %17, align 8, !tbaa !33
  %19 = zext i32 %.01215 to i64
  %20 = tail call ptr @realloc(ptr noundef %18, i64 noundef %19) #5
  store ptr %20, ptr %17, align 8, !tbaa !33
  br label %21

21:                                               ; preds = %16, %.thread
  %22 = getelementptr inbounds i8, ptr %1, i64 984
  %23 = getelementptr inbounds i8, ptr %1, i64 1008
  %wide.trip.count = zext i32 %.01215 to i64
  %24 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 3
  %25 = icmp ult i64 %24, 3
  br i1 %25, label %.unr-lcssa, label %.new

.new:                                             ; preds = %21
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %33

.unr-lcssa:                                       ; preds = %33, %21
  %indvars.iv.unr = phi i64 [ 0, %21 ], [ %indvars.iv.next.3, %33 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %26 = load i32, ptr %22, align 8, !tbaa !34
  %27 = trunc nuw i64 %indvars.iv.epil to i32
  %28 = add i32 %26, %27
  %29 = trunc i32 %28 to i8
  %30 = load ptr, ptr %23, align 8, !tbaa !33
  %31 = getelementptr inbounds i8, ptr %30, i64 %indvars.iv.epil
  store i8 %29, ptr %31, align 1, !tbaa !35
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader, !llvm.loop !36

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %32 = icmp ugt i32 %.01215, 3
  %.pre = load ptr, ptr %23, align 8, !tbaa !33
  br i1 %32, label %58, label %60

33:                                               ; preds = %33, %.new
  %indvars.iv = phi i64 [ 0, %.new ], [ %indvars.iv.next.3, %33 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.3, %33 ]
  %34 = load i32, ptr %22, align 8, !tbaa !34
  %35 = trunc nuw i64 %indvars.iv to i32
  %36 = add i32 %34, %35
  %37 = trunc i32 %36 to i8
  %38 = load ptr, ptr %23, align 8, !tbaa !33
  %39 = getelementptr inbounds i8, ptr %38, i64 %indvars.iv
  store i8 %37, ptr %39, align 1, !tbaa !35
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %40 = load i32, ptr %22, align 8, !tbaa !34
  %41 = trunc nuw i64 %indvars.iv.next to i32
  %42 = add i32 %40, %41
  %43 = trunc i32 %42 to i8
  %44 = load ptr, ptr %23, align 8, !tbaa !33
  %45 = getelementptr inbounds i8, ptr %44, i64 %indvars.iv.next
  store i8 %43, ptr %45, align 1, !tbaa !35
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %46 = load i32, ptr %22, align 8, !tbaa !34
  %47 = trunc nuw i64 %indvars.iv.next.1 to i32
  %48 = add i32 %46, %47
  %49 = trunc i32 %48 to i8
  %50 = load ptr, ptr %23, align 8, !tbaa !33
  %51 = getelementptr inbounds i8, ptr %50, i64 %indvars.iv.next.1
  store i8 %49, ptr %51, align 1, !tbaa !35
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %52 = load i32, ptr %22, align 8, !tbaa !34
  %53 = trunc nuw i64 %indvars.iv.next.2 to i32
  %54 = add i32 %52, %53
  %55 = trunc i32 %54 to i8
  %56 = load ptr, ptr %23, align 8, !tbaa !33
  %57 = getelementptr inbounds i8, ptr %56, i64 %indvars.iv.next.2
  store i8 %55, ptr %57, align 1, !tbaa !35
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.unr-lcssa, label %33, !llvm.loop !38

58:                                               ; preds = %.epilog-lcssa
  %59 = load i32, ptr %22, align 8, !tbaa !34
  store i32 %59, ptr %.pre, align 4, !tbaa !40
  br label %60

60:                                               ; preds = %58, %.epilog-lcssa
  %61 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %.pre, ptr %61, align 8, !tbaa !41
  store i32 %.01215, ptr %0, align 8, !tbaa !42
  br label %62

62:                                               ; preds = %60, %9
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtoul(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #3

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

!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 = !{!"_ZTS9Generator", !7, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !11, i64 40, !10, i64 64, !8, i64 72, !12, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS12ups_record_t", !7, i64 0, !10, i64 8, !7, i64 16}
!12 = !{!"bool", !8, i64 0}
!13 = !{!14, !7, i64 56}
!14 = !{!"_ZTS13Configuration", !12, i64 0, !7, i64 4, !12, i64 8, !12, i64 9, !12, i64 10, !15, i64 16, !12, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !12, i64 64, !7, i64 68, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !7, i64 104, !12, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !12, i64 128, !12, i64 129, !7, i64 132, !12, i64 136, !7, i64 140, !12, i64 144, !12, i64 145, !12, i64 146, !12, i64 147, !12, i64 148, !7, i64 152, !7, i64 156, !7, i64 160, !12, i64 164, !12, i64 165, !12, i64 166, !7, i64 168, !7, i64 172, !15, i64 176, !7, i64 208, !7, i64 212, !7, i64 216, !12, i64 220, !12, i64 221, !7, i64 224, !7, i64 228, !7, i64 232, !12, i64 236, !12, i64 237, !12, i64 238, !12, i64 239, !7, i64 240, !12, i64 244, !12, i64 245}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !8, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!19, !7, i64 1000}
!19 = !{!"_ZTS15ParserGenerator", !6, i64 0, !10, i64 96, !10, i64 104, !10, i64 112, !12, i64 120, !20, i64 128, !26, i64 960, !7, i64 984, !30, i64 992, !7, i64 1000, !10, i64 1008, !26, i64 1016}
!20 = !{!"_ZTS7Metrics", !10, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !21, i64 64, !21, i64 72, !21, i64 80, !21, i64 88, !21, i64 96, !21, i64 104, !21, i64 112, !21, i64 120, !21, i64 128, !21, i64 136, !21, i64 144, !21, i64 152, !21, i64 160, !22, i64 168}
!21 = !{!"double", !8, i64 0}
!22 = !{!"_ZTS17ups_env_metrics_t", !23, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112, !17, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !17, i64 208, !17, i64 216, !24, i64 224, !24, i64 440, !7, i64 656}
!23 = !{!"short", !8, i64 0}
!24 = !{!"_ZTS15btree_metrics_t", !23, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !7, i64 32, !25, i64 36, !25, i64 56, !25, i64 76, !25, i64 96, !25, i64 116, !25, i64 136, !25, i64 156, !25, i64 176, !25, i64 196}
!25 = !{!"_ZTS17min_max_avg_u32_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!26 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!30 = !{!"_ZTS5TimerIN5boost6chrono12system_clockEE", !31, i64 0}
!31 = !{!"_ZTSN5boost6chrono10time_pointINS0_12system_clockENS0_8durationIlNS_5ratioILl1ELl1000000000EEEEEEE", !32, i64 0}
!32 = !{!"_ZTSN5boost6chrono8durationIlNS_5ratioILl1ELl1000000000EEEEE", !17, i64 0}
!33 = !{!19, !10, i64 1008}
!34 = !{!19, !7, i64 984}
!35 = !{!8, !8, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.unroll.disable"}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!7, !7, i64 0}
!41 = !{!11, !10, i64 8}
!42 = !{!11, !7, i64 0}


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