; LLVM IR from interpretml/interpret :: shared/libebm (dataset_shared)

; 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.NAMESPACE_MAIN::HeaderDataSetShared" = type { i64, i64, i64, i64, i64, [1 x i64] }
%"struct.NAMESPACE_MAIN::FeatureDataSetShared" = type { i64, i64 }

@g_traceLevel = external global i32, align 4
@.str = external hidden unnamed_addr constant [88 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [42 x i8], align 1
@_ZZ15ExtractNominalsE13LOG__sMessage = external hidden constant [41 x i8], align 16
@_ZZ15ExtractNominalsE13LOG__sMessage_0 = external hidden constant [66 x i8], align 16
@_ZZ15ExtractNominalsE13LOG__sMessage_1 = external hidden constant [74 x i8], align 16
@__func__.ExtractNominals = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__.ExtractNominals = external hidden unnamed_addr constant [74 x i8], align 1
@_ZZ15ExtractNominalsE13LOG__sMessage_2 = external hidden constant [51 x i8], align 16
@_ZZ15ExtractNominalsE13LOG__sMessage_3 = external hidden constant [45 x i8], align 16
@.str.61 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [42 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

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL14ArrayToPointerImEEPKT_S3_(ptr noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL9IsFeatureEm(i64 noundef) #3

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) #4

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL16IsNominalFeatureEm(i64 noundef) #3

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

26:                                               ; preds = %3
  br label %27

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !11
  %28 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %29 = icmp sle i32 1, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ15ExtractNominalsE13LOG__sMessage)
  br label %31

31:                                               ; preds = %30, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %32

32:                                               ; preds = %31
  store i32 -3, ptr %4, align 4
  br label %143

33:                                               ; preds = %3
  %34 = load i64, ptr %6, align 8, !tbaa !9
  %35 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %34) #6
  br i1 %35, label %36, label %43

36:                                               ; preds = %33
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !11
  %38 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %39 = icmp sle i32 1, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ15ExtractNominalsE13LOG__sMessage_0)
  br label %41

41:                                               ; preds = %40, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %42

42:                                               ; preds = %41
  store i32 -3, ptr %4, align 4
  br label %143

43:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %44 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %44, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %45, ptr %11, align 8, !tbaa !5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.NAMESPACE_MAIN::HeaderDataSetShared", ptr %46, i32 0, i32 0
  %48 = load i64, ptr %47, align 8, !tbaa !13
  %49 = icmp ne i64 25059, %48
  br i1 %49, label %50, label %58

50:                                               ; preds = %43
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !11
  %52 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %53 = icmp sle i32 1, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ15ExtractNominalsE13LOG__sMessage_1)
  br label %55

55:                                               ; preds = %54, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %142

58:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.NAMESPACE_MAIN::HeaderDataSetShared", ptr %59, i32 0, i32 2
  %61 = load i64, ptr %60, align 8, !tbaa !15
  store i64 %61, ptr %14, align 8, !tbaa !9
  %62 = load i64, ptr %14, align 8, !tbaa !9
  %63 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %62) #6
  br i1 %63, label %64, label %66

64:                                               ; preds = %58
  call void @LogAssertFailure(i64 noundef 2045, ptr noundef @.str, ptr noundef @__func__.ExtractNominals, ptr noundef @.str.27)
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str, i32 noundef 2045, ptr noundef @__PRETTY_FUNCTION__.ExtractNominals) #7
  unreachable

65:                                               ; No predecessors!
  br label %66

66:                                               ; preds = %65, %58
  %67 = phi i1 [ true, %58 ], [ false, %65 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %68 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %68, ptr %15, align 8, !tbaa !9
  %69 = load i64, ptr %15, align 8, !tbaa !9
  %70 = load i64, ptr %10, align 8, !tbaa !9
  %71 = icmp ne i64 %69, %70
  br i1 %71, label %72, label %80

72:                                               ; preds = %66
  br label %73

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !11
  %74 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %75 = icmp sle i32 1, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ15ExtractNominalsE13LOG__sMessage_2)
  br label %77

77:                                               ; preds = %76, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %141

80:                                               ; preds = %66
  %81 = load i64, ptr %15, align 8, !tbaa !9
  %82 = icmp ne i64 0, %81
  br i1 %82, label %83, label %140

83:                                               ; preds = %80
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = icmp eq ptr null, %84
  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 %17) #6
  store i32 1, ptr %17, align 4, !tbaa !11
  %88 = load i32, ptr @g_traceLevel, align 4, !tbaa !11
  %89 = icmp sle i32 1, %88
  br i1 %89, label %90, label %91

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

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

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %141

94:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.NAMESPACE_MAIN::HeaderDataSetShared", ptr %95, i32 0, i32 5
  %97 = getelementptr inbounds [1 x i64], ptr %96, i64 0, i64 0
  %98 = call noundef ptr @_ZN14NAMESPACE_MAINL14ArrayToPointerImEEPKT_S3_(ptr noundef %97) #6
  store ptr %98, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %99, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = getelementptr inbounds i32, ptr %100, i64 %101
  store ptr %102, ptr %20, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %135, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  %105 = load i64, ptr %104, align 8, !tbaa !9
  store i64 %105, ptr %21, align 8, !tbaa !9
  %106 = load ptr, ptr %18, align 8, !tbaa !5
  %107 = getelementptr inbounds i64, ptr %106, i32 1
  store ptr %107, ptr %18, align 8, !tbaa !5
  %108 = load i64, ptr %21, align 8, !tbaa !9
  %109 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %108) #6
  br i1 %109, label %110, label %112

110:                                              ; preds = %103
  call void @LogAssertFailure(i64 noundef 2065, ptr noundef @.str, ptr noundef @__func__.ExtractNominals, ptr noundef @.str.61)
  call void @__assert_fail(ptr noundef @.str.62, ptr noundef @.str, i32 noundef 2065, ptr noundef @__PRETTY_FUNCTION__.ExtractNominals) #7
  unreachable

111:                                              ; No predecessors!
  br label %112

112:                                              ; preds = %111, %103
  %113 = phi i1 [ true, %103 ], [ false, %111 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %114 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %114, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load i64, ptr %22, align 8, !tbaa !9
  %117 = getelementptr inbounds i8, ptr %115, i64 %116
  store ptr %117, ptr %23, align 8, !tbaa !5
  %118 = load ptr, ptr %23, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.NAMESPACE_MAIN::FeatureDataSetShared", ptr %118, i32 0, i32 0
  %120 = load i64, ptr %119, align 8, !tbaa !16
  %121 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL9IsFeatureEm(i64 noundef %120) #6
  br i1 %121, label %124, label %122

122:                                              ; preds = %112
  call void @LogAssertFailure(i64 noundef 2071, ptr noundef @.str, ptr noundef @__func__.ExtractNominals, ptr noundef @.str.63)
  call void @__assert_fail(ptr noundef @.str.64, ptr noundef @.str, i32 noundef 2071, ptr noundef @__PRETTY_FUNCTION__.ExtractNominals) #7
  unreachable

123:                                              ; No predecessors!
  br label %124

124:                                              ; preds = %123, %112
  %125 = phi i1 [ true, %112 ], [ false, %123 ]
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.NAMESPACE_MAIN::FeatureDataSetShared", ptr %126, i32 0, i32 0
  %128 = load i64, ptr %127, align 8, !tbaa !16
  %129 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL16IsNominalFeatureEm(i64 noundef %128) #6
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, i32 1, i32 0
  %132 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 %131, ptr %132, align 4, !tbaa !11
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = getelementptr inbounds i32, ptr %133, i32 1
  store ptr %134, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %135

135:                                              ; preds = %124
  %136 = load ptr, ptr %20, align 8, !tbaa !5
  %137 = load ptr, ptr %19, align 8, !tbaa !5
  %138 = icmp ne ptr %136, %137
  br i1 %138, label %103, label %139, !llvm.loop !18

139:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %140

140:                                              ; preds = %139, %80
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %141

141:                                              ; preds = %140, %93, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %142

142:                                              ; preds = %141, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %143

143:                                              ; preds = %142, %42, %32
  %144 = load i32, ptr %4, align 4
  ret i32 %144
}

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 = { alwaysinline 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN14NAMESPACE_MAIN19HeaderDataSetSharedE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40}
!15 = !{!14, !10, i64 16}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN14NAMESPACE_MAIN20FeatureDataSetSharedE", !10, i64 0, !10, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"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 [88 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [42 x i8], align 1
@_ZZ15ExtractNominalsE13LOG__sMessage = external hidden constant [41 x i8], align 16
@_ZZ15ExtractNominalsE13LOG__sMessage_0 = external hidden constant [66 x i8], align 16
@_ZZ15ExtractNominalsE13LOG__sMessage_1 = external hidden constant [74 x i8], align 16
@__func__.ExtractNominals = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__.ExtractNominals = external hidden unnamed_addr constant [74 x i8], align 1
@_ZZ15ExtractNominalsE13LOG__sMessage_2 = external hidden constant [51 x i8], align 16
@_ZZ15ExtractNominalsE13LOG__sMessage_3 = external hidden constant [45 x i8], align 16
@.str.61 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [42 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL14ArrayToPointerImEEPKT_S3_(ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL9IsFeatureEm(i64 noundef) local_unnamed_addr #2

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 #3

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL16IsNominalFeatureEm(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -3, 1) i32 @ExtractNominals(ptr noundef %0, i64 noundef %1, ptr noundef writeonly %2) local_unnamed_addr #4 {
  %4 = icmp eq ptr %0, null
  br i1 %4, label %5, label %8

5:                                                ; preds = %3
  %6 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.loopexit.sink.split, label %.loopexit

8:                                                ; preds = %3
  %9 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImlEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuesr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %1) #5
  br i1 %9, label %10, label %13

10:                                               ; preds = %8
  %11 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.loopexit.sink.split, label %.loopexit

13:                                               ; preds = %8
  %14 = load i64, ptr %0, align 8, !tbaa !9
  %.not = icmp eq i64 %14, 25059
  br i1 %.not, label %18, label %15

15:                                               ; preds = %13
  %16 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.loopexit.sink.split, label %.loopexit

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load i64, ptr %19, align 8, !tbaa !12
  %21 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %20) #5
  br i1 %21, label %22, label %23

22:                                               ; preds = %18
  tail call void @LogAssertFailure(i64 noundef 2045, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ExtractNominals, ptr noundef nonnull @.str.27)
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str, i32 noundef 2045, ptr noundef nonnull @__PRETTY_FUNCTION__.ExtractNominals) #6
  unreachable

23:                                               ; preds = %18
  %.not34 = icmp eq i64 %20, %1
  br i1 %.not34, label %27, label %24

24:                                               ; preds = %23
  %25 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.loopexit.sink.split, label %.loopexit

27:                                               ; preds = %23
  %.not35 = icmp eq i64 %1, 0
  br i1 %.not35, label %.loopexit, label %28

28:                                               ; preds = %27
  %29 = icmp eq ptr %2, null
  br i1 %29, label %30, label %33

30:                                               ; preds = %28
  %31 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.loopexit.sink.split, label %.loopexit

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = tail call noundef ptr @_ZN14NAMESPACE_MAINL14ArrayToPointerImEEPKT_S3_(ptr noundef nonnull %34) #5
  %36 = getelementptr inbounds i32, ptr %2, i64 %1
  br label %37

37:                                               ; preds = %47, %33
  %.029 = phi ptr [ %2, %33 ], [ %51, %47 ]
  %.028 = phi ptr [ %35, %33 ], [ %39, %47 ]
  %38 = load i64, ptr %.028, align 8, !tbaa !13
  %39 = getelementptr inbounds i8, ptr %.028, i64 8
  %40 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %38) #5
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  tail call void @LogAssertFailure(i64 noundef 2065, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ExtractNominals, ptr noundef nonnull @.str.61)
  tail call void @__assert_fail(ptr noundef nonnull @.str.62, ptr noundef nonnull @.str, i32 noundef 2065, ptr noundef nonnull @__PRETTY_FUNCTION__.ExtractNominals) #6
  unreachable

42:                                               ; preds = %37
  %43 = getelementptr inbounds i8, ptr %0, i64 %38
  %44 = load i64, ptr %43, align 8, !tbaa !14
  %45 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL9IsFeatureEm(i64 noundef %44) #5
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  tail call void @LogAssertFailure(i64 noundef 2071, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ExtractNominals, ptr noundef nonnull @.str.63)
  tail call void @__assert_fail(ptr noundef nonnull @.str.64, ptr noundef nonnull @.str, i32 noundef 2071, ptr noundef nonnull @__PRETTY_FUNCTION__.ExtractNominals) #6
  unreachable

47:                                               ; preds = %42
  %48 = load i64, ptr %43, align 8, !tbaa !14
  %49 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL16IsNominalFeatureEm(i64 noundef %48) #5
  %50 = zext i1 %49 to i32
  store i32 %50, ptr %.029, align 4, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %.029, i64 4
  %.not36 = icmp eq ptr %36, %51
  br i1 %.not36, label %.loopexit, label %37, !llvm.loop !16

.loopexit.sink.split:                             ; preds = %30, %24, %15, %10, %5
  %_ZZ15ExtractNominalsE13LOG__sMessage_1.sink = phi ptr [ @_ZZ15ExtractNominalsE13LOG__sMessage, %5 ], [ @_ZZ15ExtractNominalsE13LOG__sMessage_0, %10 ], [ @_ZZ15ExtractNominalsE13LOG__sMessage_1, %15 ], [ @_ZZ15ExtractNominalsE13LOG__sMessage_2, %24 ], [ @_ZZ15ExtractNominalsE13LOG__sMessage_3, %30 ]
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull %_ZZ15ExtractNominalsE13LOG__sMessage_1.sink)
  br label %.loopexit

.loopexit:                                        ; preds = %47, %.loopexit.sink.split, %15, %27, %30, %24, %10, %5
  %.2 = phi i32 [ -3, %5 ], [ -3, %10 ], [ -3, %15 ], [ -3, %24 ], [ -3, %30 ], [ 0, %27 ], [ -3, %.loopexit.sink.split ], [ 0, %47 ]
  ret i32 %.2
}

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 = { alwaysinline 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 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN14NAMESPACE_MAIN19HeaderDataSetSharedE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !7, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 16}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTSN14NAMESPACE_MAIN20FeatureDataSetSharedE", !11, i64 0, !11, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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