; LLVM IR from ARMmbed/mbed-crypto :: programs/psa (key_ladder_demo)

; 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 [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [10 x ptr], align 16
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr @.str, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp sle i32 %16, 1
  br i1 %17, label %36, label %18

18:                                               ; preds = %2
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = call i32 @strcmp(ptr noundef %21, ptr noundef @.str.1) #5
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %36, label %24

24:                                               ; preds = %18
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 1
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = call i32 @strcmp(ptr noundef %27, ptr noundef @.str.2) #5
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %36, label %30

30:                                               ; preds = %24
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 1
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = call i32 @strcmp(ptr noundef %33, ptr noundef @.str.3) #5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %30, %24, %18, %2
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %201

37:                                               ; preds = %30
  store i32 2, ptr %11, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %124, %37
  %39 = load i32, ptr %11, align 4, !tbaa !5
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %127

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds ptr, ptr %43, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = call ptr @strchr(ptr noundef %47, i32 noundef 61) #5
  store ptr %48, ptr %15, align 8, !tbaa !9
  %49 = load ptr, ptr %15, align 8, !tbaa !9
  %50 = icmp eq ptr %49, null
  br i1 %50, label %51, label %58

51:                                               ; preds = %42
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = load i32, ptr %11, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %56)
  store i32 5, ptr %14, align 4
  br label %121

58:                                               ; preds = %42
  %59 = load ptr, ptr %15, align 8, !tbaa !9
  store i8 0, ptr %59, align 1, !tbaa !13
  %60 = load ptr, ptr %15, align 8, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %60, i32 1
  store ptr %61, ptr %15, align 8, !tbaa !9
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = load i32, ptr %11, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds ptr, ptr %62, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = call i32 @strcmp(ptr noundef %66, ptr noundef @.str.5) #5
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %58
  %70 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %70, ptr %7, align 8, !tbaa !9
  br label %120

71:                                               ; preds = %58
  %72 = load ptr, ptr %5, align 8, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = call i32 @strcmp(ptr noundef %76, ptr noundef @.str.6) #5
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %90

79:                                               ; preds = %71
  %80 = load i64, ptr %10, align 8, !tbaa !11
  %81 = icmp eq i64 %80, 10
  br i1 %81, label %82, label %84

82:                                               ; preds = %79
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef 10)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %121

84:                                               ; preds = %79
  %85 = load ptr, ptr %15, align 8, !tbaa !9
  %86 = load i64, ptr %10, align 8, !tbaa !11
  %87 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %86
  store ptr %85, ptr %87, align 8, !tbaa !9
  %88 = load i64, ptr %10, align 8, !tbaa !11
  %89 = add i64 %88, 1
  store i64 %89, ptr %10, align 8, !tbaa !11
  br label %119

90:                                               ; preds = %71
  %91 = load ptr, ptr %5, align 8, !tbaa !9
  %92 = load i32, ptr %11, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds ptr, ptr %91, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = call i32 @strcmp(ptr noundef %95, ptr noundef @.str.8) #5
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %90
  %99 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %99, ptr %6, align 8, !tbaa !9
  br label %118

100:                                              ; preds = %90
  %101 = load ptr, ptr %5, align 8, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = call i32 @strcmp(ptr noundef %105, ptr noundef @.str.9) #5
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %100
  %109 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %109, ptr %8, align 8, !tbaa !9
  br label %117

110:                                              ; preds = %100
  %111 = load ptr, ptr %5, align 8, !tbaa !9
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds ptr, ptr %111, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef %115)
  store i32 5, ptr %14, align 4
  br label %121

117:                                              ; preds = %108
  br label %118

118:                                              ; preds = %117, %98
  br label %119

119:                                              ; preds = %118, %84
  br label %120

120:                                              ; preds = %119, %69
  store i32 0, ptr %14, align 4
  br label %121

121:                                              ; preds = %120, %110, %82, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  %122 = load i32, ptr %14, align 4
  switch i32 %122, label %201 [
    i32 0, label %123
    i32 5, label %200
  ]

123:                                              ; preds = %121
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %11, align 4, !tbaa !5
  br label %38, !llvm.loop !14

127:                                              ; preds = %38
  %128 = load ptr, ptr %5, align 8, !tbaa !9
  %129 = getelementptr inbounds ptr, ptr %128, i64 1
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = call i32 @strcmp(ptr noundef %130, ptr noundef @.str.11) #5
  %132 = icmp eq i32 %131, 0
  br i1 %132, label %133, label %134

133:                                              ; preds = %127
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %163

134:                                              ; preds = %127
  %135 = load ptr, ptr %5, align 8, !tbaa !9
  %136 = getelementptr inbounds ptr, ptr %135, i64 1
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = call i32 @strcmp(ptr noundef %137, ptr noundef @.str.12) #5
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %140, label %141

140:                                              ; preds = %134
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %162

141:                                              ; preds = %134
  %142 = load ptr, ptr %5, align 8, !tbaa !9
  %143 = getelementptr inbounds ptr, ptr %142, i64 1
  %144 = load ptr, ptr %143, align 8, !tbaa !9
  %145 = call i32 @strcmp(ptr noundef %144, ptr noundef @.str.13) #5
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %141
  store i32 2, ptr %12, align 4, !tbaa !5
  br label %161

148:                                              ; preds = %141
  %149 = load ptr, ptr %5, align 8, !tbaa !9
  %150 = getelementptr inbounds ptr, ptr %149, i64 1
  %151 = load ptr, ptr %150, align 8, !tbaa !9
  %152 = call i32 @strcmp(ptr noundef %151, ptr noundef @.str.14) #5
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %155

154:                                              ; preds = %148
  store i32 3, ptr %12, align 4, !tbaa !5
  br label %160

155:                                              ; preds = %148
  %156 = load ptr, ptr %5, align 8, !tbaa !9
  %157 = getelementptr inbounds ptr, ptr %156, i64 1
  %158 = load ptr, ptr %157, align 8, !tbaa !9
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, ptr noundef %158)
  br label %200

160:                                              ; preds = %154
  br label %161

161:                                              ; preds = %160, %147
  br label %162

162:                                              ; preds = %161, %140
  br label %163

163:                                              ; preds = %162, %133
  %164 = load ptr, ptr %7, align 8, !tbaa !9
  %165 = icmp eq ptr %164, null
  br i1 %165, label %166, label %174

166:                                              ; preds = %163
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = icmp eq i32 %167, 3
  br i1 %168, label %172, label %169

169:                                              ; preds = %166
  %170 = load i32, ptr %12, align 4, !tbaa !5
  %171 = icmp eq i32 %170, 2
  br i1 %171, label %172, label %174

172:                                              ; preds = %169, %166
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  store i32 120, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %201

174:                                              ; preds = %169, %163
  %175 = load ptr, ptr %8, align 8, !tbaa !9
  %176 = icmp eq ptr %175, null
  br i1 %176, label %177, label %188

177:                                              ; preds = %174
  %178 = load i32, ptr %12, align 4, !tbaa !5
  %179 = icmp eq i32 %178, 1
  br i1 %179, label %186, label %180

180:                                              ; preds = %177
  %181 = load i32, ptr %12, align 4, !tbaa !5
  %182 = icmp eq i32 %181, 3
  br i1 %182, label %186, label %183

183:                                              ; preds = %180
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = icmp eq i32 %184, 2
  br i1 %185, label %186, label %188

186:                                              ; preds = %183, %180, %177
  %187 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  store i32 120, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %201

188:                                              ; preds = %183, %174
  %189 = load i32, ptr %12, align 4, !tbaa !5
  %190 = load ptr, ptr %6, align 8, !tbaa !9
  %191 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 0
  %192 = load i64, ptr %10, align 8, !tbaa !11
  %193 = load ptr, ptr %7, align 8, !tbaa !9
  %194 = load ptr, ptr %8, align 8, !tbaa !9
  %195 = call i32 @run(i32 noundef %189, ptr noundef %190, ptr noundef %191, i64 noundef %192, ptr noundef %193, ptr noundef %194)
  store i32 %195, ptr %13, align 4, !tbaa !5
  %196 = load i32, ptr %13, align 4, !tbaa !5
  %197 = icmp eq i32 %196, 0
  %198 = zext i1 %197 to i64
  %199 = select i1 %197, i32 0, i32 1
  store i32 %199, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %201

200:                                              ; preds = %155, %121
  call void @usage()
  store i32 1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %201

201:                                              ; preds = %200, %188, %186, %172, %121, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %202 = load i32, ptr %3, align 4
  ret i32 %202
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @usage() #0

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strchr(ptr noundef, i32 noundef) #2

declare i32 @printf(ptr noundef, ...) #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @run(i32 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #0

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { nounwind }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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"

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 121) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [10 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #4
  %4 = icmp slt i32 %0, 2
  br i1 %4, label %16, label %5

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.1) #5
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %16, label %10

10:                                               ; preds = %5
  %11 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.2) #5
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %16, label %13

13:                                               ; preds = %10
  %14 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.3) #5
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %.preheader

.preheader:                                       ; preds = %13
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

16:                                               ; preds = %13, %10, %5, %2
  tail call void @usage()
  br label %76

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %46 ]
  %.058112 = phi i64 [ 0, %.lr.ph.preheader ], [ %.260.ph, %46 ]
  %.061111 = phi ptr [ null, %.lr.ph.preheader ], [ %.263.ph, %46 ]
  %.064110 = phi ptr [ null, %.lr.ph.preheader ], [ %.266.ph, %46 ]
  %.067109 = phi ptr [ @.str, %.lr.ph.preheader ], [ %.269.ph, %46 ]
  %17 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %18, i32 noundef 61) #5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %23

21:                                               ; preds = %.lr.ph
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %18)
  br label %.thread86

23:                                               ; preds = %.lr.ph
  store i8 0, ptr %19, align 1, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %19, i64 1
  %25 = load ptr, ptr %17, align 8, !tbaa !5
  %26 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.5) #5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %46, label %28

28:                                               ; preds = %23
  %29 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.6) #5
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %36

31:                                               ; preds = %28
  %32 = icmp eq i64 %.058112, 10
  br i1 %32, label %44, label %33

33:                                               ; preds = %31
  %34 = getelementptr inbounds [10 x ptr], ptr %3, i64 0, i64 %.058112
  store ptr %24, ptr %34, align 8, !tbaa !5
  %35 = add i64 %.058112, 1
  br label %46

36:                                               ; preds = %28
  %37 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.8) #5
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %46, label %39

39:                                               ; preds = %36
  %40 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.9) #5
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %46, label %42

42:                                               ; preds = %39
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef %25)
  br label %.thread86

44:                                               ; preds = %31
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10)
  br label %76

46:                                               ; preds = %39, %36, %23, %33
  %.269.ph = phi ptr [ %.067109, %39 ], [ %24, %36 ], [ %.067109, %23 ], [ %.067109, %33 ]
  %.266.ph = phi ptr [ %.064110, %39 ], [ %.064110, %36 ], [ %24, %23 ], [ %.064110, %33 ]
  %.263.ph = phi ptr [ %24, %39 ], [ %.061111, %36 ], [ %.061111, %23 ], [ %.061111, %33 ]
  %.260.ph = phi i64 [ %.058112, %39 ], [ %.058112, %36 ], [ %.058112, %23 ], [ %35, %33 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !10

._crit_edge.loopexit:                             ; preds = %46
  %.pre = load ptr, ptr %6, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %47 = phi ptr [ %7, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %.067.lcssa = phi ptr [ @.str, %.preheader ], [ %.269.ph, %._crit_edge.loopexit ]
  %.064.lcssa = phi ptr [ null, %.preheader ], [ %.266.ph, %._crit_edge.loopexit ]
  %.061.lcssa = phi ptr [ null, %.preheader ], [ %.263.ph, %._crit_edge.loopexit ]
  %.058.lcssa = phi i64 [ 0, %.preheader ], [ %.260.ph, %._crit_edge.loopexit ]
  %48 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.11) #5
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %61, label %50

50:                                               ; preds = %._crit_edge
  %51 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.12) #5
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %61, label %53

53:                                               ; preds = %50
  %54 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.13) #5
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %61, label %56

56:                                               ; preds = %53
  %57 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.14) #5
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %61, label %59

59:                                               ; preds = %56
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef %47)
  br label %.thread86

61:                                               ; preds = %56, %53, %50, %._crit_edge
  %62 = phi i1 [ false, %._crit_edge ], [ false, %50 ], [ false, %53 ], [ true, %56 ]
  %63 = phi i1 [ false, %._crit_edge ], [ false, %50 ], [ true, %53 ], [ false, %56 ]
  %64 = phi i1 [ false, %._crit_edge ], [ true, %50 ], [ false, %53 ], [ false, %56 ]
  %.056 = phi i32 [ 0, %._crit_edge ], [ 1, %50 ], [ 2, %53 ], [ 3, %56 ]
  %65 = icmp eq ptr %.064.lcssa, null
  %or.cond = or i1 %62, %63
  %or.cond72 = and i1 %65, %or.cond
  br i1 %or.cond72, label %66, label %68

66:                                               ; preds = %61
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  br label %76

68:                                               ; preds = %61
  %69 = icmp eq ptr %.061.lcssa, null
  %or.cond3 = or i1 %62, %64
  %or.cond5 = or i1 %63, %or.cond3
  %or.cond73 = and i1 %69, %or.cond5
  br i1 %or.cond73, label %70, label %72

70:                                               ; preds = %68
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  br label %76

72:                                               ; preds = %68
  %73 = call i32 @run(i32 noundef %.056, ptr noundef %.067.lcssa, ptr noundef nonnull %3, i64 noundef %.058.lcssa, ptr noundef %.064.lcssa, ptr noundef %.061.lcssa)
  %74 = icmp ne i32 %73, 0
  %75 = zext i1 %74 to i32
  br label %76

.thread86:                                        ; preds = %42, %21, %59
  tail call void @usage()
  br label %76

76:                                               ; preds = %44, %.thread86, %72, %70, %66, %16
  %.2 = phi i32 [ 0, %16 ], [ 1, %44 ], [ 1, %.thread86 ], [ 120, %66 ], [ 120, %70 ], [ %75, %72 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  ret i32 %.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 nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @usage() local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strchr(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @run(i32 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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