; LLVM IR from interpretml/interpret :: shared/libebm/sampling.ll (ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_)

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

@g_traceLevel = external global i32, align 4
@.str = external hidden unnamed_addr constant [82 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_ = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [35 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_ = external hidden unnamed_addr constant [96 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [37 x i8], align 1
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage = external hidden constant [48 x i8], align 16
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_0 = external hidden constant [64 x i8], align 16
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_1 = external hidden constant [48 x i8], align 16
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_2 = external hidden constant [62 x i8], align 16

; 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 void @InteralLogWithoutArguments(i32 noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef, i64 noundef) #2

declare void @LogAssertFailure(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_(i64 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 {
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  store i64 %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !9
  %22 = load ptr, ptr %8, align 8, !tbaa !9
  %23 = icmp ne ptr null, %22
  br i1 %23, label %26, label %24

24:                                               ; preds = %4
  call void @LogAssertFailure(i64 noundef 429, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_, ptr noundef @.str.41)
  call void @__assert_fail(ptr noundef @.str.42, ptr noundef @.str, i32 noundef 429, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_) #5
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %4
  %27 = phi i1 [ true, %4 ], [ false, %25 ]
  %28 = load ptr, ptr %9, align 8, !tbaa !9
  %29 = icmp ne ptr null, %28
  br i1 %29, label %32, label %30

30:                                               ; preds = %26
  call void @LogAssertFailure(i64 noundef 430, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_, ptr noundef @.str.43)
  call void @__assert_fail(ptr noundef @.str.44, ptr noundef @.str, i32 noundef 430, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_) #5
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %26
  %33 = phi i1 [ true, %26 ], [ false, %31 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %34 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %34, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !9
  %36 = icmp ne ptr null, %35
  br i1 %36, label %37, label %130

37:                                               ; preds = %32
  store i64 0, ptr %10, align 8, !tbaa !5
  %38 = load i64, ptr %6, align 8, !tbaa !5
  %39 = icmp ne i64 0, %38
  br i1 %39, label %40, label %129

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %41 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %41, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %42 = load ptr, ptr %7, align 8, !tbaa !9
  %43 = load i64, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %42, i64 %43
  store ptr %44, ptr %13, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %121, %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  %46 = load ptr, ptr %12, align 8, !tbaa !9
  %47 = load i8, ptr %46, align 1, !tbaa !11
  store i8 %47, ptr %14, align 1, !tbaa !11
  %48 = load i8, ptr %14, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp slt i32 %49, 0
  br i1 %50, label %51, label %83

51:                                               ; preds = %45
  %52 = load i8, ptr %14, align 1, !tbaa !11
  %53 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsAbsCastErrorImaEEbT0_(i8 noundef signext %52) #6
  br i1 %53, label %54, label %62

54:                                               ; preds = %51
  br label %55

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !12
  %56 = load i32, ptr @g_traceLevel, align 4, !tbaa !12
  %57 = icmp sle i32 1, %56
  br i1 %57, label %58, label %59

58:                                               ; preds = %55
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage)
  br label %59

59:                                               ; preds = %58, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %60

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %118

62:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %63 = load i8, ptr %14, align 1, !tbaa !11
  %64 = call noundef i64 @_ZN14NAMESPACE_MAINL7AbsCastImaEET_T0_(i8 noundef signext %63) #6
  store i64 %64, ptr %17, align 8, !tbaa !5
  %65 = load i64, ptr %11, align 8, !tbaa !5
  %66 = load i64, ptr %17, align 8, !tbaa !5
  %67 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef %65, i64 noundef %66) #6
  br i1 %67, label %68, label %76

68:                                               ; preds = %62
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 1, ptr %18, align 4, !tbaa !12
  %70 = load i32, ptr @g_traceLevel, align 4, !tbaa !12
  %71 = icmp sle i32 1, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %69
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_0)
  br label %73

73:                                               ; preds = %72, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %80

76:                                               ; preds = %62
  %77 = load i64, ptr %17, align 8, !tbaa !5
  %78 = load i64, ptr %11, align 8, !tbaa !5
  %79 = add i64 %78, %77
  store i64 %79, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %16, align 4
  br label %80

80:                                               ; preds = %76, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  %81 = load i32, ptr %16, align 4
  switch i32 %81, label %118 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %115

83:                                               ; preds = %45
  %84 = load i8, ptr %14, align 1, !tbaa !11
  %85 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImaEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i8 noundef signext %84) #6
  br i1 %85, label %86, label %94

86:                                               ; preds = %83
  br label %87

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !12
  %88 = load i32, ptr @g_traceLevel, align 4, !tbaa !12
  %89 = icmp sle i32 1, %88
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_1)
  br label %91

91:                                               ; preds = %90, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %118

94:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %95 = load i8, ptr %14, align 1, !tbaa !11
  %96 = sext i8 %95 to i64
  store i64 %96, ptr %20, align 8, !tbaa !5
  %97 = load i64, ptr %10, align 8, !tbaa !5
  %98 = load i64, ptr %20, align 8, !tbaa !5
  %99 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef %97, i64 noundef %98) #6
  br i1 %99, label %100, label %108

100:                                              ; preds = %94
  br label %101

101:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 1, ptr %21, align 4, !tbaa !12
  %102 = load i32, ptr @g_traceLevel, align 4, !tbaa !12
  %103 = icmp sle i32 1, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %101
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_2)
  br label %105

105:                                              ; preds = %104, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %106

106:                                              ; preds = %105
  br label %107

107:                                              ; preds = %106
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %112

108:                                              ; preds = %94
  %109 = load i64, ptr %20, align 8, !tbaa !5
  %110 = load i64, ptr %10, align 8, !tbaa !5
  %111 = add i64 %110, %109
  store i64 %111, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %16, align 4
  br label %112

112:                                              ; preds = %108, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %113 = load i32, ptr %16, align 4
  switch i32 %113, label %118 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %82
  %116 = load ptr, ptr %12, align 8, !tbaa !9
  %117 = getelementptr inbounds i8, ptr %116, i32 1
  store ptr %117, ptr %12, align 8, !tbaa !9
  store i32 0, ptr %16, align 4
  br label %118

118:                                              ; preds = %115, %112, %93, %80, %61
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  %119 = load i32, ptr %16, align 4
  switch i32 %119, label %126 [
    i32 0, label %120
  ]

120:                                              ; preds = %118
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %13, align 8, !tbaa !9
  %123 = load ptr, ptr %12, align 8, !tbaa !9
  %124 = icmp ne ptr %122, %123
  br i1 %124, label %45, label %125, !llvm.loop !14

125:                                              ; preds = %121
  store i32 0, ptr %16, align 4
  br label %126

126:                                              ; preds = %125, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %127 = load i32, ptr %16, align 4
  switch i32 %127, label %135 [
    i32 0, label %128
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128, %37
  br label %130

130:                                              ; preds = %129, %32
  %131 = load i64, ptr %10, align 8, !tbaa !5
  %132 = load ptr, ptr %8, align 8, !tbaa !9
  store i64 %131, ptr %132, align 8, !tbaa !5
  %133 = load i64, ptr %11, align 8, !tbaa !5
  %134 = load ptr, ptr %9, align 8, !tbaa !9
  store i64 %133, ptr %134, align 8, !tbaa !5
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %135

135:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %136 = load i32, ptr %5, align 4
  ret i32 %136
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsAbsCastErrorImaEEbT0_(i8 noundef signext) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN14NAMESPACE_MAINL7AbsCastImaEET_T0_(i8 noundef signext) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImaEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i8 noundef signext) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #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 #2 = { 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 #3 = { 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 #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 = { noreturn nounwind }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !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 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

@g_traceLevel = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [82 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_ = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [35 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_ = external hidden unnamed_addr constant [96 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [37 x i8], align 1
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage = external hidden constant [48 x i8], align 16
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_0 = external hidden constant [64 x i8], align 16
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_1 = external hidden constant [48 x i8], align 16
@_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_2 = external hidden constant [62 x i8], align 16

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef, i64 noundef) local_unnamed_addr #1

declare void @LogAssertFailure(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_(i64 noundef %0, ptr noundef readonly %1, ptr noundef writeonly %2, ptr noundef writeonly %3) local_unnamed_addr #3 {
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %5, label %6

5:                                                ; preds = %4
  tail call void @LogAssertFailure(i64 noundef 429, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_, ptr noundef nonnull @.str.41)
  tail call void @__assert_fail(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str, i32 noundef 429, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_) #4
  unreachable

6:                                                ; preds = %4
  %.not56 = icmp eq ptr %3, null
  br i1 %.not56, label %7, label %8

7:                                                ; preds = %6
  tail call void @LogAssertFailure(i64 noundef 430, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_, ptr noundef nonnull @.str.43)
  tail call void @__assert_fail(ptr noundef nonnull @.str.44, ptr noundef nonnull @.str, i32 noundef 430, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_) #4
  unreachable

8:                                                ; preds = %6
  %.not57 = icmp eq ptr %1, null
  br i1 %.not57, label %.loopexit, label %9

9:                                                ; preds = %8
  %.not58 = icmp eq i64 %0, 0
  br i1 %.not58, label %.loopexit, label %10

10:                                               ; preds = %9
  %11 = getelementptr inbounds i8, ptr %1, i64 %0
  br label %12

12:                                               ; preds = %45, %10
  %.046 = phi ptr [ %1, %10 ], [ %46, %45 ]
  %.041 = phi i64 [ 0, %10 ], [ %.243, %45 ]
  %.036 = phi i64 [ 0, %10 ], [ %.238, %45 ]
  %13 = load i8, ptr %.046, align 1, !tbaa !5
  %14 = icmp slt i8 %13, 0
  br i1 %14, label %15, label %30

15:                                               ; preds = %12
  %16 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsAbsCastErrorImaEEbT0_(i8 noundef signext %13) #5
  br i1 %16, label %17, label %21

17:                                               ; preds = %15
  %18 = load i32, ptr @g_traceLevel, align 4, !tbaa !8
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %20, label %.critedge

20:                                               ; preds = %17
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage)
  br label %.critedge

21:                                               ; preds = %15
  %22 = tail call noundef i64 @_ZN14NAMESPACE_MAINL7AbsCastImaEET_T0_(i8 noundef signext %13) #5
  %23 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef %.041, i64 noundef %22) #5
  br i1 %23, label %24, label %28

24:                                               ; preds = %21
  %25 = load i32, ptr @g_traceLevel, align 4, !tbaa !8
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %27, label %.critedge

27:                                               ; preds = %24
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_0)
  br label %.critedge

28:                                               ; preds = %21
  %29 = add i64 %22, %.041
  br label %45

30:                                               ; preds = %12
  %31 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImaEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i8 noundef signext %13) #5
  br i1 %31, label %32, label %36

32:                                               ; preds = %30
  %33 = load i32, ptr @g_traceLevel, align 4, !tbaa !8
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %.critedge

35:                                               ; preds = %32
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_1)
  br label %.critedge

36:                                               ; preds = %30
  %37 = zext nneg i8 %13 to i64
  %38 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL10IsAddErrorImEEbT_S1_(i64 noundef %.036, i64 noundef %37) #5
  br i1 %38, label %39, label %43

39:                                               ; preds = %36
  %40 = load i32, ptr @g_traceLevel, align 4, !tbaa !8
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %42, label %.critedge

42:                                               ; preds = %39
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN5UnbagEmPKaPmS2_E13LOG__sMessage_2)
  br label %.critedge

43:                                               ; preds = %36
  %44 = add i64 %.036, %37
  br label %45

45:                                               ; preds = %43, %28
  %.243 = phi i64 [ %29, %28 ], [ %.041, %43 ]
  %.238 = phi i64 [ %.036, %28 ], [ %44, %43 ]
  %46 = getelementptr inbounds i8, ptr %.046, i64 1
  %.not59 = icmp eq ptr %11, %46
  br i1 %.not59, label %.loopexit, label %12, !llvm.loop !10

.loopexit:                                        ; preds = %45, %9, %8
  %.445 = phi i64 [ 0, %9 ], [ 0, %8 ], [ %.243, %45 ]
  %.440 = phi i64 [ 0, %9 ], [ %0, %8 ], [ %.238, %45 ]
  store i64 %.440, ptr %2, align 8, !tbaa !12
  store i64 %.445, ptr %3, align 8, !tbaa !12
  br label %.critedge

.critedge:                                        ; preds = %42, %39, %27, %24, %32, %35, %17, %20, %.loopexit
  %.5 = phi i32 [ 0, %.loopexit ], [ -3, %20 ], [ -3, %17 ], [ -3, %35 ], [ -3, %32 ], [ -3, %24 ], [ -3, %27 ], [ -3, %39 ], [ -3, %42 ]
  ret i32 %.5
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsAbsCastErrorImaEEbT0_(i8 noundef signext) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN14NAMESPACE_MAINL7AbsCastImaEET_T0_(i8 noundef signext) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImaEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i8 noundef signext) local_unnamed_addr #1

attributes #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 = { 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 #2 = { 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 #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 = { noreturn nounwind }
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 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !6, i64 0}


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