; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/datatypes/int/sc_nbutils.ll (ZN5sc_dt17parse_binary_bitsEPKciPjS2_)

; 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.13 = external hidden unnamed_addr constant [93 x i8], align 1
@_ZN7sc_core24SC_ID_CONVERSION_FAILED_E = external constant [0 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #1

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt17parse_binary_bitsEPKciPjS2_(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [8192 x i8], align 16
  %17 = alloca [8192 x i8], align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %4
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef @.str.15, ptr noundef @.str.13, i32 noundef 257)
  br label %21

21:                                               ; preds = %20, %4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = sext i8 %23 to i32
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %21
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef @.str.16, ptr noundef @.str.13, i32 noundef 261)
  br label %27

27:                                               ; preds = %26, %21
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call i64 @strlen(ptr noundef %28) #6
  %30 = trunc i64 %29 to i32
  store i32 %30, ptr %14, align 4, !tbaa !9
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = mul nsw i32 %32, 30
  %34 = sub nsw i32 %31, %33
  store i32 %34, ptr %12, align 4, !tbaa !9
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %37, label %45

37:                                               ; preds = %27
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  store ptr %41, ptr %5, align 8, !tbaa !5
  %42 = load i32, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = sub nsw i32 %43, %42
  store i32 %44, ptr %14, align 4, !tbaa !9
  br label %76

45:                                               ; preds = %27
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %55, %45
  %47 = load i32, ptr %15, align 4, !tbaa !9
  %48 = load i32, ptr %6, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %50, label %58

50:                                               ; preds = %46
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = load i32, ptr %15, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  store i32 0, ptr %54, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %50
  %56 = load i32, ptr %15, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %15, align 4, !tbaa !9
  br label %46, !llvm.loop !12

58:                                               ; preds = %46
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %75

61:                                               ; preds = %58
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %71, %61
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %66, label %74

66:                                               ; preds = %62
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load i32, ptr %15, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %67, i64 %69
  store i32 0, ptr %70, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %66
  %72 = load i32, ptr %15, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %15, align 4, !tbaa !9
  br label %62, !llvm.loop !14

74:                                               ; preds = %62
  br label %75

75:                                               ; preds = %74, %58
  br label %76

76:                                               ; preds = %75, %37
  %77 = load i32, ptr %14, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 30
  store i32 %78, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %193, %76
  %80 = load i32, ptr %15, align 4, !tbaa !9
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %83, label %196

83:                                               ; preds = %79
  %84 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %84, ptr %13, align 4, !tbaa !9
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = icmp slt i32 %85, 0
  br i1 %86, label %87, label %140

87:                                               ; preds = %83
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = add nsw i32 %88, 30
  store i32 %89, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %122, %87
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %94, label %125

94:                                               ; preds = %90
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = shl i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !9
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = shl i32 %97, 1
  store i32 %98, ptr %11, align 4, !tbaa !9
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %99, i64 %101
  %103 = load i8, ptr %102, align 1, !tbaa !11
  %104 = sext i8 %103 to i32
  switch i32 %104, label %116 [
    i32 88, label %105
    i32 120, label %105
    i32 49, label %110
    i32 90, label %113
    i32 122, label %113
    i32 48, label %121
  ]

105:                                              ; preds = %94, %94
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = or i32 %106, 1
  store i32 %107, ptr %10, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = or i32 %108, 1
  store i32 %109, ptr %11, align 4, !tbaa !9
  br label %121

110:                                              ; preds = %94
  %111 = load i32, ptr %11, align 4, !tbaa !9
  %112 = or i32 %111, 1
  store i32 %112, ptr %11, align 4, !tbaa !9
  br label %121

113:                                              ; preds = %94, %94
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = or i32 %114, 1
  store i32 %115, ptr %10, align 4, !tbaa !9
  br label %121

116:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8192, ptr %16) #5
  %117 = getelementptr inbounds [8192 x i8], ptr %16, i64 0, i64 0
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %117, ptr noundef @.str.17, ptr noundef %118) #5
  %120 = getelementptr inbounds [8192 x i8], ptr %16, i64 0, i64 0
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %120, ptr noundef @.str.13, i32 noundef 321)
  call void @llvm.lifetime.end.p0(i64 8192, ptr %16) #5
  br label %121

121:                                              ; preds = %116, %113, %110, %105, %94
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %13, align 4, !tbaa !9
  br label %90, !llvm.loop !15

125:                                              ; preds = %90
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %134

128:                                              ; preds = %125
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %15, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  store i32 %129, ptr %133, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %128, %125
  %135 = load i32, ptr %11, align 4, !tbaa !9
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = load i32, ptr %15, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  store i32 %135, ptr %139, align 4, !tbaa !9
  br label %196

140:                                              ; preds = %83
  store i32 0, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %173, %140
  %142 = load i32, ptr %9, align 4, !tbaa !9
  %143 = icmp slt i32 %142, 30
  br i1 %143, label %144, label %176

144:                                              ; preds = %141
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = shl i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !9
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = shl i32 %147, 1
  store i32 %148, ptr %11, align 4, !tbaa !9
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = load i32, ptr %13, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %13, align 4, !tbaa !9
  %152 = sext i32 %150 to i64
  %153 = getelementptr inbounds i8, ptr %149, i64 %152
  %154 = load i8, ptr %153, align 1, !tbaa !11
  %155 = sext i8 %154 to i32
  switch i32 %155, label %167 [
    i32 88, label %156
    i32 120, label %156
    i32 49, label %161
    i32 90, label %164
    i32 122, label %164
    i32 48, label %172
  ]

156:                                              ; preds = %144, %144
  %157 = load i32, ptr %10, align 4, !tbaa !9
  %158 = or i32 %157, 1
  store i32 %158, ptr %10, align 4, !tbaa !9
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = or i32 %159, 1
  store i32 %160, ptr %11, align 4, !tbaa !9
  br label %172

161:                                              ; preds = %144
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = or i32 %162, 1
  store i32 %163, ptr %11, align 4, !tbaa !9
  br label %172

164:                                              ; preds = %144, %144
  %165 = load i32, ptr %10, align 4, !tbaa !9
  %166 = or i32 %165, 1
  store i32 %166, ptr %10, align 4, !tbaa !9
  br label %172

167:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8192, ptr %17) #5
  %168 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %168, ptr noundef @.str.17, ptr noundef %169) #5
  %171 = getelementptr inbounds [8192 x i8], ptr %17, i64 0, i64 0
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %171, ptr noundef @.str.13, i32 noundef 353)
  call void @llvm.lifetime.end.p0(i64 8192, ptr %17) #5
  br label %172

172:                                              ; preds = %167, %164, %161, %156, %144
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %9, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %9, align 4, !tbaa !9
  br label %141, !llvm.loop !16

176:                                              ; preds = %141
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %185

179:                                              ; preds = %176
  %180 = load i32, ptr %10, align 4, !tbaa !9
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %181, i64 %183
  store i32 %180, ptr %184, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %179, %176
  %186 = load i32, ptr %11, align 4, !tbaa !9
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = load i32, ptr %15, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i32, ptr %187, i64 %189
  store i32 %186, ptr %190, align 4, !tbaa !9
  %191 = load i32, ptr %14, align 4, !tbaa !9
  %192 = sub nsw i32 %191, 30
  store i32 %192, ptr %14, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %185
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %15, align 4, !tbaa !9
  br label %79, !llvm.loop !17

196:                                              ; preds = %134, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; 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.13 = external hidden unnamed_addr constant [93 x i8], align 1
@_ZN7sc_core24SC_ID_CONVERSION_FAILED_E = external constant [0 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt17parse_binary_bitsEPKciPjS2_(ptr noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2, ptr noundef writeonly %3) local_unnamed_addr #3 {
  %5 = alloca [8192 x i8], align 16
  %6 = alloca [8192 x i8], align 16
  %7 = icmp eq ptr %0, null
  br i1 %7, label %8, label %9

8:                                                ; preds = %4
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.13, i32 noundef 257)
  br label %9

9:                                                ; preds = %8, %4
  %10 = load i8, ptr %0, align 1, !tbaa !5
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %9
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.13, i32 noundef 261)
  br label %13

13:                                               ; preds = %12, %9
  %14 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #6
  %15 = trunc i64 %14 to i32
  %16 = mul nsw i32 %1, 30
  %17 = sub nsw i32 %15, %16
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.loopexit87, label %.preheader88

.preheader88:                                     ; preds = %13
  %19 = icmp sgt i32 %1, 0
  br i1 %19, label %._crit_edge, label %.loopexit

._crit_edge:                                      ; preds = %.preheader88
  %20 = zext nneg i32 %1 to i64
  %21 = shl nuw nsw i64 %20, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %2, i8 0, i64 %21, i1 false), !tbaa !8
  %.not = icmp ne ptr %3, null
  %or.cond = and i1 %.not, %19
  br i1 %or.cond, label %.lr.ph93.preheader, label %.lr.ph103

.lr.ph93.preheader:                               ; preds = %._crit_edge
  %22 = zext nneg i32 %1 to i64
  %23 = shl nuw nsw i64 %22, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %3, i8 0, i64 %23, i1 false), !tbaa !8
  br label %.lr.ph103

.loopexit87:                                      ; preds = %13
  %24 = zext nneg i32 %17 to i64
  %25 = getelementptr inbounds i8, ptr %0, i64 %24
  %26 = icmp sgt i32 %1, 0
  br i1 %26, label %.lr.ph103, label %.loopexit

.lr.ph103:                                        ; preds = %._crit_edge, %.lr.ph93.preheader, %.loopexit87
  %.065129 = phi i32 [ %16, %.loopexit87 ], [ %15, %.lr.ph93.preheader ], [ %15, %._crit_edge ]
  %.069128 = phi ptr [ %25, %.loopexit87 ], [ %0, %.lr.ph93.preheader ], [ %0, %._crit_edge ]
  %.not83 = icmp eq ptr %3, null
  %27 = add i32 %.065129, -30
  %28 = sext i32 %27 to i64
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %29

29:                                               ; preds = %.lr.ph103, %69
  %indvars.iv117 = phi i64 [ 0, %.lr.ph103 ], [ %indvars.iv.next118, %69 ]
  %indvars.iv = phi i64 [ %28, %.lr.ph103 ], [ %indvars.iv.next, %69 ]
  %.166.in99 = phi i32 [ %.065129, %.lr.ph103 ], [ %.166101, %69 ]
  %.166101 = add nsw i32 %.166.in99, -30
  %30 = icmp slt i32 %.166.in99, 30
  br i1 %30, label %.preheader, label %.preheader85

.preheader:                                       ; preds = %29
  %31 = icmp sgt i32 %.166.in99, 0
  br i1 %31, label %.lr.ph107.preheader, label %._crit_edge108

.lr.ph107.preheader:                              ; preds = %.preheader
  %32 = zext nneg i32 %.166.in99 to i64
  br label %.lr.ph107

.lr.ph107:                                        ; preds = %.lr.ph107.preheader, %46
  %indvars.iv121 = phi i64 [ 0, %.lr.ph107.preheader ], [ %indvars.iv.next122, %46 ]
  %.070105 = phi i32 [ 0, %.lr.ph107.preheader ], [ %.171, %46 ]
  %.073104 = phi i32 [ 0, %.lr.ph107.preheader ], [ %.174, %46 ]
  %33 = shl i32 %.073104, 1
  %34 = shl i32 %.070105, 1
  %35 = getelementptr inbounds i8, ptr %.069128, i64 %indvars.iv121
  %36 = load i8, ptr %35, align 1, !tbaa !5
  switch i8 %36, label %44 [
    i8 88, label %37
    i8 120, label %37
    i8 49, label %40
    i8 90, label %42
    i8 122, label %42
    i8 48, label %46
  ]

37:                                               ; preds = %.lr.ph107, %.lr.ph107
  %38 = or disjoint i32 %33, 1
  %39 = or disjoint i32 %34, 1
  br label %46

40:                                               ; preds = %.lr.ph107
  %41 = or disjoint i32 %34, 1
  br label %46

42:                                               ; preds = %.lr.ph107, %.lr.ph107
  %43 = or disjoint i32 %33, 1
  br label %46

44:                                               ; preds = %.lr.ph107
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %5) #7
  %45 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull %.069128) #7
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef nonnull %5, ptr noundef nonnull @.str.13, i32 noundef 321)
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %5) #7
  br label %46

46:                                               ; preds = %.lr.ph107, %37, %40, %42, %44
  %.174 = phi i32 [ %33, %44 ], [ %33, %.lr.ph107 ], [ %43, %42 ], [ %33, %40 ], [ %38, %37 ]
  %.171 = phi i32 [ %34, %44 ], [ %34, %.lr.ph107 ], [ %34, %42 ], [ %41, %40 ], [ %39, %37 ]
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %47 = icmp ult i64 %indvars.iv.next122, %32
  br i1 %47, label %.lr.ph107, label %._crit_edge108, !llvm.loop !10

._crit_edge108:                                   ; preds = %46, %.preheader
  %.073.lcssa = phi i32 [ 0, %.preheader ], [ %.174, %46 ]
  %.070.lcssa = phi i32 [ 0, %.preheader ], [ %.171, %46 ]
  %.pre = and i64 %indvars.iv117, 4294967295
  br i1 %.not83, label %._crit_edge108._crit_edge, label %48

48:                                               ; preds = %._crit_edge108
  %49 = getelementptr inbounds i32, ptr %3, i64 %.pre
  store i32 %.073.lcssa, ptr %49, align 4, !tbaa !8
  br label %._crit_edge108._crit_edge

._crit_edge108._crit_edge:                        ; preds = %._crit_edge108, %48
  %50 = getelementptr inbounds i32, ptr %2, i64 %.pre
  store i32 %.070.lcssa, ptr %50, align 4, !tbaa !8
  br label %.loopexit

.preheader85:                                     ; preds = %29, %64
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %64 ], [ %indvars.iv, %29 ]
  %.27296 = phi i32 [ %.3, %64 ], [ 0, %29 ]
  %.27595 = phi i32 [ %.376, %64 ], [ 0, %29 ]
  %.07794 = phi i32 [ %65, %64 ], [ 0, %29 ]
  %51 = shl i32 %.27595, 1
  %52 = shl i32 %.27296, 1
  %indvars.iv.next115 = add nsw i64 %indvars.iv114, 1
  %53 = getelementptr inbounds i8, ptr %.069128, i64 %indvars.iv114
  %54 = load i8, ptr %53, align 1, !tbaa !5
  switch i8 %54, label %62 [
    i8 88, label %55
    i8 120, label %55
    i8 49, label %58
    i8 90, label %60
    i8 122, label %60
    i8 48, label %64
  ]

55:                                               ; preds = %.preheader85, %.preheader85
  %56 = or disjoint i32 %51, 1
  %57 = or disjoint i32 %52, 1
  br label %64

58:                                               ; preds = %.preheader85
  %59 = or disjoint i32 %52, 1
  br label %64

60:                                               ; preds = %.preheader85, %.preheader85
  %61 = or disjoint i32 %51, 1
  br label %64

62:                                               ; preds = %.preheader85
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %6) #7
  %63 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull %.069128) #7
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef nonnull %6, ptr noundef nonnull @.str.13, i32 noundef 353)
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %6) #7
  br label %64

64:                                               ; preds = %.preheader85, %55, %58, %60, %62
  %.376 = phi i32 [ %51, %62 ], [ %51, %.preheader85 ], [ %61, %60 ], [ %51, %58 ], [ %56, %55 ]
  %.3 = phi i32 [ %52, %62 ], [ %52, %.preheader85 ], [ %52, %60 ], [ %59, %58 ], [ %57, %55 ]
  %65 = add nuw nsw i32 %.07794, 1
  %exitcond.not = icmp eq i32 %65, 30
  br i1 %exitcond.not, label %66, label %.preheader85, !llvm.loop !12

66:                                               ; preds = %64
  br i1 %.not83, label %69, label %67

67:                                               ; preds = %66
  %68 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv117
  store i32 %.376, ptr %68, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %67, %66
  %70 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv117
  store i32 %.3, ptr %70, align 4, !tbaa !8
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %indvars.iv.next = add nsw i64 %indvars.iv, -30
  %exitcond120.not = icmp eq i64 %indvars.iv.next118, %wide.trip.count
  br i1 %exitcond120.not, label %.loopexit, label %29, !llvm.loop !13

.loopexit:                                        ; preds = %69, %.preheader88, %.loopexit87, %._crit_edge108._crit_edge
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree 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 #2 = { "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

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

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


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