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

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

@.str = external hidden unnamed_addr constant [89 x i8], align 1
@__func__.CheckRegistrationName = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@__PRETTY_FUNCTION__.CheckRegistrationName = external hidden unnamed_addr constant [86 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @SkipWhitespace(ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @IsStringEqualsCaseInsensitive(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local ptr @CheckRegistrationName(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = icmp ne ptr null, %8
  br i1 %9, label %12, label %10

10:                                               ; preds = %3
  call void @LogAssertFailure(i64 noundef 113, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.7)
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str, i32 noundef 113, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

11:                                               ; No predecessors!
  br label %12

12:                                               ; preds = %11, %3
  %13 = phi i1 [ true, %3 ], [ false, %11 ]
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = icmp ne ptr null, %14
  br i1 %15, label %18, label %16

16:                                               ; preds = %12
  call void @LogAssertFailure(i64 noundef 114, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.9)
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str, i32 noundef 114, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %12
  %19 = phi i1 [ true, %12 ], [ false, %17 ]
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = icmp ult ptr %20, %21
  br i1 %22, label %25, label %23

23:                                               ; preds = %18
  call void @LogAssertFailure(i64 noundef 115, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.11)
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str, i32 noundef 115, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %18
  %26 = phi i1 [ true, %18 ], [ false, %24 ]
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = load i8, ptr %27, align 1, !tbaa !9
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 0, %29
  br i1 %30, label %33, label %31

31:                                               ; preds = %25
  call void @LogAssertFailure(i64 noundef 116, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.13)
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str, i32 noundef 116, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %25
  %34 = phi i1 [ true, %25 ], [ false, %32 ]
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 32, %37
  br i1 %38, label %49, label %39

39:                                               ; preds = %33
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = sext i8 %41 to i32
  %43 = icmp sle i32 9, %42
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp sle i32 %47, 13
  br i1 %48, label %49, label %51

49:                                               ; preds = %44, %33
  call void @LogAssertFailure(i64 noundef 117, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.15)
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str, i32 noundef 117, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50, %44, %39
  %52 = phi i1 [ true, %44 ], [ true, %39 ], [ false, %50 ]
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 0, %55
  br i1 %56, label %64, label %57

57:                                               ; preds = %51
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = sext i8 %59 to i32
  %61 = icmp eq i32 44, %60
  br i1 %61, label %64, label %62

62:                                               ; preds = %57
  call void @LogAssertFailure(i64 noundef 118, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.17)
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str, i32 noundef 118, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %57, %51
  %65 = phi i1 [ true, %57 ], [ true, %51 ], [ false, %63 ]
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = call ptr @IsStringEqualsCaseInsensitive(ptr noundef %66, ptr noundef %67)
  store ptr %68, ptr %5, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = icmp eq ptr null, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %64
  store ptr null, ptr %4, align 8
  br label %95

72:                                               ; preds = %64
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = icmp ule ptr %73, %74
  br i1 %75, label %78, label %76

76:                                               ; preds = %72
  call void @LogAssertFailure(i64 noundef 125, ptr noundef @.str, ptr noundef @__func__.CheckRegistrationName, ptr noundef @.str.19)
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str, i32 noundef 125, ptr noundef @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

77:                                               ; No predecessors!
  br label %78

78:                                               ; preds = %77, %72
  %79 = phi i1 [ true, %72 ], [ false, %77 ]
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = icmp ne ptr %80, %81
  br i1 %82, label %83, label %93

83:                                               ; preds = %78
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = icmp ne i32 58, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %83
  store ptr null, ptr %4, align 8
  br label %95

89:                                               ; preds = %83
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 1
  %92 = call ptr @SkipWhitespace(ptr noundef %91)
  store ptr %92, ptr %5, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %89, %78
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %94, ptr %4, align 8
  br label %95

95:                                               ; preds = %93, %88, %71
  %96 = load ptr, ptr %4, align 8
  ret ptr %96
}

attributes #0 = { 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 #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 = { 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 }

!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 = !{!7, !7, 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"

@.str = external hidden unnamed_addr constant [89 x i8], align 1
@__func__.CheckRegistrationName = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@__PRETTY_FUNCTION__.CheckRegistrationName = external hidden unnamed_addr constant [86 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @SkipWhitespace(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @IsStringEqualsCaseInsensitive(ptr noundef, ptr noundef) local_unnamed_addr #3

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

4:                                                ; preds = %3
  tail call void @LogAssertFailure(i64 noundef 113, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.7)
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str, i32 noundef 113, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

5:                                                ; preds = %3
  %.not27 = icmp eq ptr %1, null
  br i1 %.not27, label %6, label %7

6:                                                ; preds = %5
  tail call void @LogAssertFailure(i64 noundef 114, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.9)
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str, i32 noundef 114, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

7:                                                ; preds = %5
  %8 = icmp ult ptr %0, %1
  br i1 %8, label %10, label %9

9:                                                ; preds = %7
  tail call void @LogAssertFailure(i64 noundef 115, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.11)
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str, i32 noundef 115, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

10:                                               ; preds = %7
  %11 = load i8, ptr %0, align 1, !tbaa !5
  switch i8 %11, label %13 [
    i8 0, label %12
    i8 32, label %15
  ]

12:                                               ; preds = %10
  tail call void @LogAssertFailure(i64 noundef 116, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.13)
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str, i32 noundef 116, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

13:                                               ; preds = %10
  %14 = add i8 %11, -9
  %or.cond = icmp ult i8 %14, 5
  br i1 %or.cond, label %15, label %16

15:                                               ; preds = %13, %10
  tail call void @LogAssertFailure(i64 noundef 117, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.15)
  tail call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str, i32 noundef 117, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

16:                                               ; preds = %13
  %17 = load i8, ptr %1, align 1, !tbaa !5
  switch i8 %17, label %18 [
    i8 0, label %19
    i8 44, label %19
  ]

18:                                               ; preds = %16
  tail call void @LogAssertFailure(i64 noundef 118, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.17)
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str, i32 noundef 118, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

19:                                               ; preds = %16, %16
  %20 = tail call ptr @IsStringEqualsCaseInsensitive(ptr noundef nonnull %0, ptr noundef %2)
  %21 = icmp eq ptr %20, null
  br i1 %21, label %30, label %22

22:                                               ; preds = %19
  %.not29 = icmp ugt ptr %20, %1
  br i1 %.not29, label %23, label %24

23:                                               ; preds = %22
  tail call void @LogAssertFailure(i64 noundef 125, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.CheckRegistrationName, ptr noundef nonnull @.str.19)
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str, i32 noundef 125, ptr noundef nonnull @__PRETTY_FUNCTION__.CheckRegistrationName) #4
  unreachable

24:                                               ; preds = %22
  %.not30 = icmp eq ptr %20, %1
  br i1 %.not30, label %30, label %25

25:                                               ; preds = %24
  %26 = load i8, ptr %20, align 1, !tbaa !5
  %.not31 = icmp eq i8 %26, 58
  br i1 %.not31, label %27, label %30

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %20, i64 1
  %29 = tail call ptr @SkipWhitespace(ptr noundef nonnull %28)
  br label %30

30:                                               ; preds = %24, %27, %25, %19
  %.0 = phi ptr [ null, %19 ], [ null, %25 ], [ %29, %27 ], [ %20, %24 ]
  ret ptr %.0
}

attributes #0 = { 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 #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 = { 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 }

!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"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass