; LLVM IR from yinqiwen/ardb :: src/common/util/string_helper.ll (ZN4ardb17random_hex_stringB5cxx11Ej)

; 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::__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] }
%struct.timeval = type { i64, i64 }
%"class.std::allocator" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

; Function Attrs: nounwind
declare i32 @rand() #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb17random_hex_stringB5cxx11Ej(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, i32 noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.timeval, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = call ptr @llvm.stacksave.p0()
  store ptr %19, ptr %5, align 8
  %20 = alloca i8, i64 %18, align 16
  store i64 %18, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %21 = call noalias ptr @fopen(ptr noundef @.str.2, ptr noundef @.str.3)
  store ptr %21, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr @.str.4, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %22 = load ptr, ptr %7, align 8, !tbaa !9
  %23 = icmp eq ptr %22, null
  br i1 %23, label %30, label %24

24:                                               ; preds = %2
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = zext i32 %25 to i64
  %27 = load ptr, ptr %7, align 8, !tbaa !9
  %28 = call i64 @fread(ptr noundef %20, i64 noundef %26, i64 noundef 1, ptr noundef %27)
  %29 = icmp eq i64 %28, 0
  br i1 %29, label %30, label %89

30:                                               ; preds = %24, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr %20, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %31 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %31, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %32 = call i32 @getpid() #7
  store i32 %32, ptr %13, align 4, !tbaa !5
  %33 = call i32 @gettimeofday(ptr noundef %12, ptr noundef null) #7
  %34 = load i32, ptr %11, align 4, !tbaa !5
  %35 = zext i32 %34 to i64
  %36 = icmp uge i64 %35, 8
  br i1 %36, label %37, label %46

37:                                               ; preds = %30
  %38 = load ptr, ptr %10, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.timeval, ptr %12, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %38, ptr align 8 %39, i64 8, i1 false)
  %40 = load i32, ptr %11, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = sub i64 %41, 8
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %11, align 4, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  store ptr %45, ptr %10, align 8, !tbaa !9
  br label %46

46:                                               ; preds = %37, %30
  %47 = load i32, ptr %11, align 4, !tbaa !5
  %48 = zext i32 %47 to i64
  %49 = icmp uge i64 %48, 8
  br i1 %49, label %50, label %59

50:                                               ; preds = %46
  %51 = load ptr, ptr %10, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.timeval, ptr %12, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %51, ptr align 8 %52, i64 8, i1 false)
  %53 = load i32, ptr %11, align 4, !tbaa !5
  %54 = zext i32 %53 to i64
  %55 = sub i64 %54, 8
  %56 = trunc i64 %55 to i32
  store i32 %56, ptr %11, align 4, !tbaa !5
  %57 = load ptr, ptr %10, align 8, !tbaa !9
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  store ptr %58, ptr %10, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %50, %46
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = zext i32 %60 to i64
  %62 = icmp uge i64 %61, 4
  br i1 %62, label %63, label %71

63:                                               ; preds = %59
  %64 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %64, ptr align 4 %13, i64 4, i1 false)
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = zext i32 %65 to i64
  %67 = sub i64 %66, 4
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %11, align 4, !tbaa !5
  %69 = load ptr, ptr %10, align 8, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %69, i64 4
  store ptr %70, ptr %10, align 8, !tbaa !9
  br label %71

71:                                               ; preds = %63, %59
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %85, %71
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = icmp ult i32 %73, %74
  br i1 %75, label %76, label %88

76:                                               ; preds = %72
  %77 = call i32 @rand() #7
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %20, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = xor i32 %82, %77
  %84 = trunc i32 %83 to i8
  store i8 %84, ptr %80, align 1, !tbaa !11
  br label %85

85:                                               ; preds = %76
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = add i32 %86, 1
  store i32 %87, ptr %9, align 4, !tbaa !5
  br label %72, !llvm.loop !12

88:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %89

89:                                               ; preds = %88, %24
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %108, %89
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = icmp ult i32 %91, %92
  br i1 %93, label %94, label %111

94:                                               ; preds = %90
  %95 = load ptr, ptr %8, align 8, !tbaa !9
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %20, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !11
  %100 = sext i8 %99 to i32
  %101 = and i32 %100, 15
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %95, i64 %102
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %20, i64 %106
  store i8 %104, ptr %107, align 1, !tbaa !11
  br label %108

108:                                              ; preds = %94
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = add i32 %109, 1
  store i32 %110, ptr %9, align 4, !tbaa !5
  br label %90, !llvm.loop !14

111:                                              ; preds = %90
  %112 = load ptr, ptr %7, align 8, !tbaa !9
  %113 = call i32 @fclose(ptr noundef %112)
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = zext i32 %114 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %20, i64 noundef %115, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %116 unwind label %118

116:                                              ; preds = %111
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %117 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %117)
  ret void

118:                                              ; preds = %111
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %15, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %16, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %122

122:                                              ; preds = %118
  %123 = load ptr, ptr %15, align 8
  %124 = load i32, ptr %16, align 4
  %125 = insertvalue { ptr, i32 } poison, ptr %123, 0
  %126 = insertvalue { ptr, i32 } %125, i32 %124, 1
  resume { ptr, i32 } %126
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @getpid() #2

; Function Attrs: nounwind
declare i32 @gettimeofday(ptr noundef, ptr noundef) #2

; 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) #6

declare i32 @fclose(ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; 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::__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] }
%struct.timeval = type { i64, i64 }
%"class.std::allocator" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb17random_hex_stringB5cxx11Ej(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, i32 noundef %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.timeval, align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = zext i32 %1 to i64
  %6 = alloca i8, i64 %5, align 16
  %7 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %12, label %9

9:                                                ; preds = %2
  %10 = call i64 @fread(ptr noundef nonnull %6, i64 noundef %5, i64 noundef 1, ptr noundef nonnull %7)
  %11 = icmp eq i64 %10, 0
  br i1 %11, label %12, label %34

12:                                               ; preds = %9, %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  %13 = tail call i32 @getpid() #5
  %14 = call i32 @gettimeofday(ptr noundef nonnull %3, ptr noundef null) #5
  %15 = icmp ugt i32 %1, 7
  br i1 %15, label %16, label %.thread

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = load i64, ptr %17, align 8
  store i64 %18, ptr %6, align 16
  %19 = add i32 %1, -8
  %20 = getelementptr inbounds i8, ptr %6, i64 8
  %21 = icmp ugt i32 %19, 7
  br i1 %21, label %22, label %.thread

22:                                               ; preds = %16
  %23 = load i64, ptr %3, align 8
  store i64 %23, ptr %20, align 8
  %24 = add i32 %1, -16
  %25 = getelementptr inbounds i8, ptr %6, i64 16
  br label %.thread

.thread:                                          ; preds = %12, %22, %16
  %.134 = phi i32 [ %24, %22 ], [ %19, %16 ], [ %1, %12 ]
  %.132 = phi ptr [ %25, %22 ], [ %20, %16 ], [ %6, %12 ]
  %26 = icmp ugt i32 %.134, 3
  br i1 %26, label %27, label %28

27:                                               ; preds = %.thread
  store i32 %13, ptr %.132, align 1
  br label %28

28:                                               ; preds = %27, %.thread
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %28, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %28 ]
  %29 = tail call i32 @rand() #5
  %30 = getelementptr inbounds i8, ptr %6, i64 %indvars.iv
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %32 = trunc i32 %29 to i8
  %33 = xor i8 %31, %32
  store i8 %33, ptr %30, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %5
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

._crit_edge:                                      ; preds = %.lr.ph, %28
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  br label %34

34:                                               ; preds = %._crit_edge, %9
  %.not46 = icmp eq i32 %1, 0
  br i1 %.not46, label %._crit_edge45, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %34
  %xtraiter = and i64 %5, 1
  %35 = icmp eq i32 %1, 1
  br i1 %35, label %._crit_edge45.loopexit.unr-lcssa, label %.lr.ph44.preheader.new

.lr.ph44.preheader.new:                           ; preds = %.lr.ph44.preheader
  %unroll_iter = and i64 %5, 4294967294
  br label %.lr.ph44

.lr.ph44:                                         ; preds = %.lr.ph44, %.lr.ph44.preheader.new
  %indvars.iv48 = phi i64 [ 0, %.lr.ph44.preheader.new ], [ %indvars.iv.next49.1, %.lr.ph44 ]
  %niter = phi i64 [ 0, %.lr.ph44.preheader.new ], [ %niter.next.1, %.lr.ph44 ]
  %36 = getelementptr inbounds i8, ptr %6, i64 %indvars.iv48
  %37 = load i8, ptr %36, align 2, !tbaa !5
  %38 = and i8 %37, 15
  %39 = zext nneg i8 %38 to i64
  %40 = getelementptr inbounds i8, ptr @.str.4, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !5
  store i8 %41, ptr %36, align 2, !tbaa !5
  %indvars.iv.next49 = or disjoint i64 %indvars.iv48, 1
  %42 = getelementptr inbounds i8, ptr %6, i64 %indvars.iv.next49
  %43 = load i8, ptr %42, align 1, !tbaa !5
  %44 = and i8 %43, 15
  %45 = zext nneg i8 %44 to i64
  %46 = getelementptr inbounds i8, ptr @.str.4, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !5
  store i8 %47, ptr %42, align 1, !tbaa !5
  %indvars.iv.next49.1 = add nuw nsw i64 %indvars.iv48, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge45.loopexit.unr-lcssa, label %.lr.ph44, !llvm.loop !10

._crit_edge45.loopexit.unr-lcssa:                 ; preds = %.lr.ph44, %.lr.ph44.preheader
  %indvars.iv48.unr = phi i64 [ 0, %.lr.ph44.preheader ], [ %indvars.iv.next49.1, %.lr.ph44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge45, label %.lr.ph44.epil

.lr.ph44.epil:                                    ; preds = %._crit_edge45.loopexit.unr-lcssa
  %48 = getelementptr inbounds i8, ptr %6, i64 %indvars.iv48.unr
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %50 = and i8 %49, 15
  %51 = zext nneg i8 %50 to i64
  %52 = getelementptr inbounds i8, ptr @.str.4, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !5
  store i8 %53, ptr %48, align 1, !tbaa !5
  br label %._crit_edge45

._crit_edge45:                                    ; preds = %.lr.ph44.epil, %._crit_edge45.loopexit.unr-lcssa, %34
  %54 = tail call i32 @fclose(ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %6, i64 noundef %5, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %55 unwind label %56

55:                                               ; preds = %._crit_edge45
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  ret void

56:                                               ; preds = %._crit_edge45
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  resume { ptr, i32 } %57
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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