; LLVM IR from Lakhankumawat/LearnCPP :: H-HashTable/HashCustomers.ll (Z8insertHT4CUSTPS_)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.CUST = type { i32, [20 x i8], i32, i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12hashFunctioni(i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8insertHT4CUSTPS_(ptr noundef byval(%struct.CUST) align 8 %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %1, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  %8 = getelementptr inbounds %struct.CUST, ptr %0, i32 0, i32 0
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %10 = call noundef i32 @_Z12hashFunctioni(i32 noundef %9)
  store i32 %10, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %77, %2
  %12 = load i32, ptr %6, align 4, !tbaa !9
  %13 = icmp slt i32 %12, 10
  br i1 %13, label %15, label %14

14:                                               ; preds = %11
  store i32 2, ptr %7, align 4
  br label %80

15:                                               ; preds = %11
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds %struct.CUST, ptr %16, i64 %18
  %20 = getelementptr inbounds %struct.CUST, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %62

23:                                               ; preds = %15
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef %28)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %31

31:                                               ; preds = %26, %23
  %32 = getelementptr inbounds %struct.CUST, ptr %0, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !11
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds %struct.CUST, ptr %34, i64 %36
  %38 = getelementptr inbounds %struct.CUST, ptr %37, i32 0, i32 0
  store i32 %33, ptr %38, align 4, !tbaa !11
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = load i32, ptr %4, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %struct.CUST, ptr %39, i64 %41
  %43 = getelementptr inbounds %struct.CUST, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds [20 x i8], ptr %43, i64 0, i64 0
  %45 = getelementptr inbounds %struct.CUST, ptr %0, i32 0, i32 1
  %46 = getelementptr inbounds [20 x i8], ptr %45, i64 0, i64 0
  %47 = call ptr @strcpy(ptr noundef %44, ptr noundef %46) #6
  %48 = getelementptr inbounds %struct.CUST, ptr %0, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !14
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = load i32, ptr %4, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %struct.CUST, ptr %50, i64 %52
  %54 = getelementptr inbounds %struct.CUST, ptr %53, i32 0, i32 2
  store i32 %49, ptr %54, align 4, !tbaa !14
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = load i32, ptr %4, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %struct.CUST, ptr %55, i64 %57
  %59 = getelementptr inbounds %struct.CUST, ptr %58, i32 0, i32 3
  store i32 -1, ptr %59, align 4, !tbaa !13
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 1, ptr %7, align 4
  br label %80

62:                                               ; preds = %15
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds %struct.CUST, ptr %63, i64 %65
  %67 = getelementptr inbounds %struct.CUST, ptr %66, i32 0, i32 3
  %68 = load i32, ptr %67, align 4, !tbaa !13
  %69 = icmp eq i32 %68, -1
  br i1 %69, label %70, label %73

70:                                               ; preds = %62
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %70, %62
  %74 = load i32, ptr %4, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  %76 = srem i32 %75, 10
  store i32 %76, ptr %4, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %73
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %6, align 4, !tbaa !9
  br label %11, !llvm.loop !15

80:                                               ; preds = %31, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %81 = load i32, ptr %7, align 4
  switch i32 %81, label %85 [
    i32 2, label %82
  ]

82:                                               ; preds = %80
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %7, align 4
  br label %85

85:                                               ; preds = %82, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %86 = load i32, ptr %7, align 4
  switch i32 %86, label %88 [
    i32 0, label %87
    i32 1, label %87
  ]

87:                                               ; preds = %85, %85
  ret void

88:                                               ; preds = %85
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS4CUST", !10, i64 0, !7, i64 4, !10, i64 24, !10, i64 28}
!13 = !{!12, !10, i64 28}
!14 = !{!12, !10, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.CUST = type { i32, [20 x i8], i32, i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8insertHT4CUSTPS_(ptr nocapture noundef readonly byval(%struct.CUST) align 8 %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = tail call noundef i32 @_Z12hashFunctioni(i32 noundef %3)
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds %struct.CUST, ptr %1, i64 %5
  %7 = getelementptr inbounds i8, ptr %6, i64 28
  %8 = load i32, ptr %7, align 4, !tbaa !10
  switch i32 %8, label %28 [
    i32 1, label %.thread
    i32 -1, label %25
  ]

.thread:                                          ; preds = %2
  %9 = getelementptr inbounds i8, ptr %6, i64 28
  br label %17

10:                                               ; preds = %102, %93, %84, %75, %66, %57, %48, %38, %28
  %.01826.lcssa = phi i32 [ %.1, %28 ], [ %.1.1, %38 ], [ %.1.2, %48 ], [ %.1.3, %57 ], [ %.1.4, %66 ], [ %.1.5, %75 ], [ %.1.6, %84 ], [ %.1.7, %93 ], [ %.1.8, %102 ]
  %.01925.lcssa = phi i32 [ %30, %28 ], [ %.sext, %38 ], [ %.sext36, %48 ], [ %.sext38, %57 ], [ %.sext40, %66 ], [ %.sext42, %75 ], [ %.sext44, %84 ], [ %.sext46, %93 ], [ %.sext48, %102 ]
  %.lcssa = phi ptr [ %32, %28 ], [ %42, %38 ], [ %51, %48 ], [ %60, %57 ], [ %69, %66 ], [ %78, %75 ], [ %87, %84 ], [ %96, %93 ], [ %105, %102 ]
  %11 = getelementptr inbounds i8, ptr %.lcssa, i64 28
  %12 = icmp eq i32 %.01826.lcssa, 1
  br i1 %12, label %13, label %17

13:                                               ; preds = %10
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %.01925.lcssa)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %17

17:                                               ; preds = %.thread, %13, %10
  %18 = phi ptr [ %9, %.thread ], [ %11, %13 ], [ %11, %10 ]
  %.lcssa34 = phi ptr [ %6, %.thread ], [ %.lcssa, %13 ], [ %.lcssa, %10 ]
  store i32 %3, ptr %.lcssa34, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %.lcssa34, i64 4
  %20 = getelementptr inbounds i8, ptr %0, i64 4
  %21 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) %20) #5
  %22 = getelementptr inbounds i8, ptr %0, i64 24
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %.lcssa34, i64 24
  store i32 %23, ptr %24, align 4, !tbaa !11
  store i32 -1, ptr %18, align 4, !tbaa !10
  br label %.critedge

25:                                               ; preds = %2
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %28

28:                                               ; preds = %2, %25
  %.1 = phi i32 [ 1, %25 ], [ 0, %2 ]
  %29 = add nsw i32 %4, 1
  %30 = srem i32 %29, 10
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.CUST, ptr %1, i64 %31
  %33 = getelementptr inbounds i8, ptr %32, i64 28
  %34 = load i32, ptr %33, align 4, !tbaa !10
  switch i32 %34, label %38 [
    i32 1, label %10
    i32 -1, label %35
  ]

35:                                               ; preds = %28
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %38

38:                                               ; preds = %35, %28
  %.1.1 = phi i32 [ 1, %35 ], [ %.1, %28 ]
  %39 = trunc nsw i32 %30 to i8
  %.lhs.trunc = add nsw i8 %39, 1
  %40 = srem i8 %.lhs.trunc, 10
  %.sext = sext i8 %40 to i32
  %41 = sext i8 %40 to i64
  %42 = getelementptr inbounds %struct.CUST, ptr %1, i64 %41
  %43 = getelementptr inbounds i8, ptr %42, i64 28
  %44 = load i32, ptr %43, align 4, !tbaa !10
  switch i32 %44, label %48 [
    i32 1, label %10
    i32 -1, label %45
  ]

45:                                               ; preds = %38
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %48

48:                                               ; preds = %45, %38
  %.1.2 = phi i32 [ 1, %45 ], [ %.1.1, %38 ]
  %.lhs.trunc35 = add nsw i8 %40, 1
  %49 = srem i8 %.lhs.trunc35, 10
  %.sext36 = sext i8 %49 to i32
  %50 = sext i8 %49 to i64
  %51 = getelementptr inbounds %struct.CUST, ptr %1, i64 %50
  %52 = getelementptr inbounds i8, ptr %51, i64 28
  %53 = load i32, ptr %52, align 4, !tbaa !10
  switch i32 %53, label %57 [
    i32 1, label %10
    i32 -1, label %54
  ]

54:                                               ; preds = %48
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %56 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %57

57:                                               ; preds = %54, %48
  %.1.3 = phi i32 [ 1, %54 ], [ %.1.2, %48 ]
  %.lhs.trunc37 = add nsw i8 %49, 1
  %58 = srem i8 %.lhs.trunc37, 10
  %.sext38 = sext i8 %58 to i32
  %59 = sext i8 %58 to i64
  %60 = getelementptr inbounds %struct.CUST, ptr %1, i64 %59
  %61 = getelementptr inbounds i8, ptr %60, i64 28
  %62 = load i32, ptr %61, align 4, !tbaa !10
  switch i32 %62, label %66 [
    i32 1, label %10
    i32 -1, label %63
  ]

63:                                               ; preds = %57
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %66

66:                                               ; preds = %63, %57
  %.1.4 = phi i32 [ 1, %63 ], [ %.1.3, %57 ]
  %.lhs.trunc39 = add nsw i8 %58, 1
  %67 = srem i8 %.lhs.trunc39, 10
  %.sext40 = sext i8 %67 to i32
  %68 = sext i8 %67 to i64
  %69 = getelementptr inbounds %struct.CUST, ptr %1, i64 %68
  %70 = getelementptr inbounds i8, ptr %69, i64 28
  %71 = load i32, ptr %70, align 4, !tbaa !10
  switch i32 %71, label %75 [
    i32 1, label %10
    i32 -1, label %72
  ]

72:                                               ; preds = %66
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %75

75:                                               ; preds = %72, %66
  %.1.5 = phi i32 [ 1, %72 ], [ %.1.4, %66 ]
  %.lhs.trunc41 = add nsw i8 %67, 1
  %76 = srem i8 %.lhs.trunc41, 10
  %.sext42 = sext i8 %76 to i32
  %77 = sext i8 %76 to i64
  %78 = getelementptr inbounds %struct.CUST, ptr %1, i64 %77
  %79 = getelementptr inbounds i8, ptr %78, i64 28
  %80 = load i32, ptr %79, align 4, !tbaa !10
  switch i32 %80, label %84 [
    i32 1, label %10
    i32 -1, label %81
  ]

81:                                               ; preds = %75
  %82 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %83 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %84

84:                                               ; preds = %81, %75
  %.1.6 = phi i32 [ 1, %81 ], [ %.1.5, %75 ]
  %.lhs.trunc43 = add nsw i8 %76, 1
  %85 = srem i8 %.lhs.trunc43, 10
  %.sext44 = sext i8 %85 to i32
  %86 = sext i8 %85 to i64
  %87 = getelementptr inbounds %struct.CUST, ptr %1, i64 %86
  %88 = getelementptr inbounds i8, ptr %87, i64 28
  %89 = load i32, ptr %88, align 4, !tbaa !10
  switch i32 %89, label %93 [
    i32 1, label %10
    i32 -1, label %90
  ]

90:                                               ; preds = %84
  %91 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %92 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %93

93:                                               ; preds = %90, %84
  %.1.7 = phi i32 [ 1, %90 ], [ %.1.6, %84 ]
  %.lhs.trunc45 = add nsw i8 %85, 1
  %94 = srem i8 %.lhs.trunc45, 10
  %.sext46 = sext i8 %94 to i32
  %95 = sext i8 %94 to i64
  %96 = getelementptr inbounds %struct.CUST, ptr %1, i64 %95
  %97 = getelementptr inbounds i8, ptr %96, i64 28
  %98 = load i32, ptr %97, align 4, !tbaa !10
  switch i32 %98, label %102 [
    i32 1, label %10
    i32 -1, label %99
  ]

99:                                               ; preds = %93
  %100 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %101 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %102

102:                                              ; preds = %99, %93
  %.1.8 = phi i32 [ 1, %99 ], [ %.1.7, %93 ]
  %.lhs.trunc47 = add nsw i8 %94, 1
  %103 = srem i8 %.lhs.trunc47, 10
  %.sext48 = sext i8 %103 to i32
  %104 = sext i8 %103 to i64
  %105 = getelementptr inbounds %struct.CUST, ptr %1, i64 %104
  %106 = getelementptr inbounds i8, ptr %105, i64 28
  %107 = load i32, ptr %106, align 4, !tbaa !10
  switch i32 %107, label %.critedge [
    i32 1, label %10
    i32 -1, label %108
  ]

108:                                              ; preds = %102
  %109 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %110 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.critedge

.critedge:                                        ; preds = %102, %108, %17
  %.str.1.sink = phi ptr [ @.str.1, %17 ], [ @.str.3, %108 ], [ @.str.3, %102 ]
  %111 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.1.sink)
  %112 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #4

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 = { 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 #2 = { inlinehint 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 #3 = { "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 nofree nounwind willreturn memory(argmem: readwrite) "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, !7, i64 0}
!6 = !{!"_ZTS4CUST", !7, i64 0, !8, i64 4, !7, i64 24, !7, i64 28}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 28}
!11 = !{!6, !7, i64 24}


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