; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/datatypes/fx (scfx_rep)

; 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.sc_dt::scfx_index" = type { i32, i32 }

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZNK5sc_dt8scfx_rep12calc_indicesEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt11scfx_params3iwlEv(ptr noundef nonnull align 4 dereferenceable(28)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt11scfx_params2wlEv(ptr noundef nonnull align 4 dereferenceable(28)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt8scfx_rep12quantizationERKNS_11scfx_paramsERb(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(28) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.sc_dt::scfx_index", align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = call noundef i32 @_ZNK5sc_dt11scfx_params3iwlEv(ptr noundef nonnull align 4 dereferenceable(28) %12)
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call noundef i32 @_ZNK5sc_dt11scfx_params2wlEv(ptr noundef nonnull align 4 dereferenceable(28) %14)
  %16 = sub nsw i32 %13, %15
  %17 = call i64 @_ZNK5sc_dt8scfx_rep12calc_indicesEi(ptr noundef nonnull align 8 dereferenceable(37) %11, i32 noundef %16)
  store i64 %17, ptr %7, align 4
  %18 = call noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %19 = icmp slt i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %3
  store i32 1, ptr %8, align 4
  br label %118

21:                                               ; preds = %3
  %22 = call noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %23 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %11)
  %24 = icmp sge i32 %22, %23
  br i1 %24, label %25, label %28

25:                                               ; preds = %21
  %26 = call noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %27 = add nsw i32 %26, 1
  call void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37) %11, i32 noundef %27, i32 noundef 1)
  br label %28

28:                                               ; preds = %25, %21
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %29 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_bitERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %30 = zext i1 %29 to i8
  store i8 %30, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  %31 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6q_zeroERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %32 = zext i1 %31 to i8
  store i8 %32, ptr %10, align 1, !tbaa !9
  %33 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %34 = trunc i8 %33 to i1
  br i1 %34, label %39, label %35

35:                                               ; preds = %28
  %36 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %37 = trunc i8 %36 to i1
  %38 = xor i1 %37, true
  br label %39

39:                                               ; preds = %35, %28
  %40 = phi i1 [ true, %28 ], [ %38, %35 ]
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = zext i1 %40 to i8
  store i8 %42, ptr %41, align 1, !tbaa !9
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load i8, ptr %43, align 1, !tbaa !9, !range !11, !noundef !12
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %117

46:                                               ; preds = %39
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = call noundef i32 @_ZNK5sc_dt11scfx_params6q_modeEv(ptr noundef nonnull align 4 dereferenceable(28) %47)
  switch i32 %48, label %115 [
    i32 5, label %49
    i32 0, label %53
    i32 6, label %69
    i32 3, label %70
    i32 4, label %75
    i32 1, label %91
    i32 2, label %99
  ]

49:                                               ; preds = %46
  %50 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37) %11)
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %52

52:                                               ; preds = %51, %49
  br label %116

53:                                               ; preds = %46
  %54 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37) %11)
  br i1 %54, label %60, label %55

55:                                               ; preds = %53
  %56 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %59

58:                                               ; preds = %55
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %59

59:                                               ; preds = %58, %55
  br label %68

60:                                               ; preds = %53
  %61 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %67

63:                                               ; preds = %60
  %64 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %65 = trunc i8 %64 to i1
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %67

67:                                               ; preds = %66, %63, %60
  br label %68

68:                                               ; preds = %67, %59
  br label %116

69:                                               ; preds = %46
  br label %116

70:                                               ; preds = %46
  %71 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %74

74:                                               ; preds = %73, %70
  br label %116

75:                                               ; preds = %46
  %76 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %77 = trunc i8 %76 to i1
  br i1 %77, label %78, label %81

78:                                               ; preds = %75
  %79 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %80 = trunc i8 %79 to i1
  br i1 %80, label %81, label %89

81:                                               ; preds = %78, %75
  %82 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %90

84:                                               ; preds = %81
  %85 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %86 = trunc i8 %85 to i1
  br i1 %86, label %87, label %90

87:                                               ; preds = %84
  %88 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_oddERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br i1 %88, label %89, label %90

89:                                               ; preds = %87, %78
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %90

90:                                               ; preds = %89, %87, %84, %81
  br label %116

91:                                               ; preds = %46
  %92 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %93 = trunc i8 %92 to i1
  br i1 %93, label %94, label %98

94:                                               ; preds = %91
  %95 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %96 = trunc i8 %95 to i1
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %98

98:                                               ; preds = %97, %94, %91
  br label %116

99:                                               ; preds = %46
  %100 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37) %11)
  br i1 %100, label %109, label %101

101:                                              ; preds = %99
  %102 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %108

104:                                              ; preds = %101
  %105 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %106 = trunc i8 %105 to i1
  br i1 %106, label %108, label %107

107:                                              ; preds = %104
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %108

108:                                              ; preds = %107, %104, %101
  br label %114

109:                                              ; preds = %99
  %110 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %113

112:                                              ; preds = %109
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %113

113:                                              ; preds = %112, %109
  br label %114

114:                                              ; preds = %113, %108
  br label %116

115:                                              ; preds = %46
  br label %116

116:                                              ; preds = %115, %114, %98, %90, %74, %69, %68, %52
  call void @_ZN5sc_dt8scfx_rep7q_clearERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37) %11)
  br label %117

117:                                              ; preds = %116, %39
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  store i32 0, ptr %8, align 4
  br label %118

118:                                              ; preds = %117, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %119 = load i32, ptr %8, align 4
  switch i32 %119, label %121 [
    i32 0, label %120
    i32 1, label %120
  ]

120:                                              ; preds = %118, %118
  ret void

121:                                              ; preds = %118
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_bitERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6q_zeroERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt11scfx_params6q_modeEv(ptr noundef nonnull align 4 dereferenceable(28)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_oddERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7q_clearERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 }

!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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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.sc_dt::scfx_index" = type { i32, i32 }

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZNK5sc_dt8scfx_rep12calc_indicesEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt11scfx_params3iwlEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt11scfx_params2wlEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt8scfx_rep12quantizationERKNS_11scfx_paramsERb(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(28) %1, ptr nocapture noundef nonnull writeonly align 1 dereferenceable(1) %2) local_unnamed_addr #4 align 2 {
  %4 = alloca %"class.sc_dt::scfx_index", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %5 = tail call noundef i32 @_ZNK5sc_dt11scfx_params3iwlEv(ptr noundef nonnull align 4 dereferenceable(28) %1)
  %6 = tail call noundef i32 @_ZNK5sc_dt11scfx_params2wlEv(ptr noundef nonnull align 4 dereferenceable(28) %1)
  %7 = sub nsw i32 %5, %6
  %8 = tail call i64 @_ZNK5sc_dt8scfx_rep12calc_indicesEi(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %7)
  store i64 %8, ptr %4, align 8
  %9 = call noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %42, label %11

11:                                               ; preds = %3
  %12 = call noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %13 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  %.not = icmp slt i32 %12, %13
  br i1 %.not, label %17, label %14

14:                                               ; preds = %11
  %15 = call noundef i32 @_ZNK5sc_dt10scfx_index2wiEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %16 = add nsw i32 %15, 1
  call void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %16, i32 noundef 1)
  br label %17

17:                                               ; preds = %14, %11
  %18 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_bitERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %19 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6q_zeroERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %20 = xor i1 %19, true
  %21 = or i1 %18, %20
  %22 = zext i1 %21 to i8
  store i8 %22, ptr %2, align 1, !tbaa !5
  br i1 %21, label %23, label %42

23:                                               ; preds = %17
  %24 = call noundef i32 @_ZNK5sc_dt11scfx_params6q_modeEv(ptr noundef nonnull align 4 dereferenceable(28) %1)
  switch i32 %24, label %41 [
    i32 5, label %25
    i32 0, label %27
    i32 2, label %37
    i32 3, label %31
    i32 4, label %32
    i32 1, label %36
  ]

25:                                               ; preds = %23
  %26 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  br i1 %26, label %.sink.split, label %41

27:                                               ; preds = %23
  %28 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  br i1 %18, label %.sink.split, label %41

30:                                               ; preds = %27
  %.not20 = xor i1 %18, true
  %brmerge = or i1 %19, %.not20
  br i1 %brmerge, label %41, label %.sink.split

31:                                               ; preds = %23
  br i1 %18, label %.sink.split, label %41

32:                                               ; preds = %23
  %.not21 = xor i1 %18, true
  %brmerge22 = or i1 %19, %.not21
  br i1 %brmerge22, label %33, label %.sink.split

33:                                               ; preds = %32
  %brmerge25 = or i1 %.not21, %20
  br i1 %brmerge25, label %41, label %34

34:                                               ; preds = %33
  %35 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_oddERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(8) %4)
  br i1 %35, label %.sink.split, label %41

36:                                               ; preds = %23
  %.not26 = xor i1 %18, true
  %brmerge27 = or i1 %19, %.not26
  br i1 %brmerge27, label %41, label %.sink.split

37:                                               ; preds = %23
  %38 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_negEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  br i1 %38, label %40, label %39

39:                                               ; preds = %37
  %.not28 = xor i1 %18, true
  %brmerge29 = or i1 %19, %.not28
  br i1 %brmerge29, label %41, label %.sink.split

40:                                               ; preds = %37
  br i1 %18, label %.sink.split, label %41

.sink.split:                                      ; preds = %40, %39, %36, %34, %32, %31, %30, %29, %25
  call void @_ZN5sc_dt8scfx_rep6q_incrERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(8) %4)
  br label %41

41:                                               ; preds = %.sink.split, %39, %36, %33, %30, %23, %40, %34, %31, %29, %25
  call void @_ZN5sc_dt8scfx_rep7q_clearERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  br label %42

42:                                               ; preds = %17, %41, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_bitERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6q_zeroERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt11scfx_params6q_modeEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep5q_oddERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7q_clearERKNS_10scfx_indexE(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 }

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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