; LLVM IR from snowballstem/snowball :: examples (stemwords)

; 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 [8 x i8], align 1
@pretty = external hidden global i32, align 4
@progname = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@stdin = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@stdout = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [59 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 ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = 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) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr @.str, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  store i32 0, ptr @pretty, align 4, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !9
  %16 = getelementptr inbounds ptr, ptr %15, i64 0
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %17, ptr @progname, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %140, %2
  %19 = load i32, ptr %13, align 4, !tbaa !5
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %22, label %141

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = load i32, ptr %13, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %13, align 4, !tbaa !5
  %26 = sext i32 %24 to i64
  %27 = getelementptr inbounds ptr, ptr %23, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  store ptr %28, ptr %14, align 8, !tbaa !9
  %29 = load ptr, ptr %14, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %29, i64 0
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 45
  br i1 %33, label %34, label %136

34:                                               ; preds = %22
  %35 = load ptr, ptr %14, align 8, !tbaa !9
  %36 = call i32 @strcmp(ptr noundef %35, ptr noundef @.str.1) #7
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %53

38:                                               ; preds = %34
  %39 = load i32, ptr %13, align 4, !tbaa !5
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp sge i32 %39, %40
  br i1 %41, label %42, label %46

42:                                               ; preds = %38
  %43 = load ptr, ptr @stderr, align 8, !tbaa !9
  %44 = load ptr, ptr %14, align 8, !tbaa !9
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.2, ptr noundef %44) #6
  call void @exit(i32 noundef 1) #8
  unreachable

46:                                               ; preds = %38
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = load i32, ptr %13, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %13, align 4, !tbaa !5
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds ptr, ptr %47, i64 %50
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  store ptr %52, ptr %7, align 8, !tbaa !9
  br label %135

53:                                               ; preds = %34
  %54 = load ptr, ptr %14, align 8, !tbaa !9
  %55 = call i32 @strcmp(ptr noundef %54, ptr noundef @.str.3) #7
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %72

57:                                               ; preds = %53
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = icmp sge i32 %58, %59
  br i1 %60, label %61, label %65

61:                                               ; preds = %57
  %62 = load ptr, ptr @stderr, align 8, !tbaa !9
  %63 = load ptr, ptr %14, align 8, !tbaa !9
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.2, ptr noundef %63) #6
  call void @exit(i32 noundef 1) #8
  unreachable

65:                                               ; preds = %57
  %66 = load ptr, ptr %5, align 8, !tbaa !9
  %67 = load i32, ptr %13, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %13, align 4, !tbaa !5
  %69 = sext i32 %67 to i64
  %70 = getelementptr inbounds ptr, ptr %66, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  store ptr %71, ptr %6, align 8, !tbaa !9
  br label %134

72:                                               ; preds = %53
  %73 = load ptr, ptr %14, align 8, !tbaa !9
  %74 = call i32 @strcmp(ptr noundef %73, ptr noundef @.str.4) #7
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %91

76:                                               ; preds = %72
  %77 = load i32, ptr %13, align 4, !tbaa !5
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = icmp sge i32 %77, %78
  br i1 %79, label %80, label %84

80:                                               ; preds = %76
  %81 = load ptr, ptr @stderr, align 8, !tbaa !9
  %82 = load ptr, ptr %14, align 8, !tbaa !9
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.2, ptr noundef %82) #6
  call void @exit(i32 noundef 1) #8
  unreachable

84:                                               ; preds = %76
  %85 = load ptr, ptr %5, align 8, !tbaa !9
  %86 = load i32, ptr %13, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %13, align 4, !tbaa !5
  %88 = sext i32 %86 to i64
  %89 = getelementptr inbounds ptr, ptr %85, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  store ptr %90, ptr %11, align 8, !tbaa !9
  br label %133

91:                                               ; preds = %72
  %92 = load ptr, ptr %14, align 8, !tbaa !9
  %93 = call i32 @strcmp(ptr noundef %92, ptr noundef @.str.5) #7
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %110

95:                                               ; preds = %91
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = icmp sge i32 %96, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %95
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = load ptr, ptr %14, align 8, !tbaa !9
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str.2, ptr noundef %101) #6
  call void @exit(i32 noundef 1) #8
  unreachable

103:                                              ; preds = %95
  %104 = load ptr, ptr %5, align 8, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !5
  %107 = sext i32 %105 to i64
  %108 = getelementptr inbounds ptr, ptr %104, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  store ptr %109, ptr %12, align 8, !tbaa !9
  br label %132

110:                                              ; preds = %91
  %111 = load ptr, ptr %14, align 8, !tbaa !9
  %112 = call i32 @strcmp(ptr noundef %111, ptr noundef @.str.6) #7
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %110
  store i32 2, ptr @pretty, align 4, !tbaa !5
  br label %131

115:                                              ; preds = %110
  %116 = load ptr, ptr %14, align 8, !tbaa !9
  %117 = call i32 @strcmp(ptr noundef %116, ptr noundef @.str.7) #7
  %118 = icmp eq i32 %117, 0
  br i1 %118, label %119, label %120

119:                                              ; preds = %115
  store i32 1, ptr @pretty, align 4, !tbaa !5
  br label %130

120:                                              ; preds = %115
  %121 = load ptr, ptr %14, align 8, !tbaa !9
  %122 = call i32 @strcmp(ptr noundef %121, ptr noundef @.str.8) #7
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %120
  call void @usage(i32 noundef 0)
  br label %129

125:                                              ; preds = %120
  %126 = load ptr, ptr @stderr, align 8, !tbaa !9
  %127 = load ptr, ptr %14, align 8, !tbaa !9
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.9, ptr noundef %127) #6
  call void @usage(i32 noundef 1)
  br label %129

129:                                              ; preds = %125, %124
  br label %130

130:                                              ; preds = %129, %119
  br label %131

131:                                              ; preds = %130, %114
  br label %132

132:                                              ; preds = %131, %103
  br label %133

133:                                              ; preds = %132, %84
  br label %134

134:                                              ; preds = %133, %65
  br label %135

135:                                              ; preds = %134, %46
  br label %140

136:                                              ; preds = %22
  %137 = load ptr, ptr @stderr, align 8, !tbaa !9
  %138 = load ptr, ptr %14, align 8, !tbaa !9
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.10, ptr noundef %138) #6
  call void @usage(i32 noundef 1)
  br label %140

140:                                              ; preds = %136, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %18, !llvm.loop !12

141:                                              ; preds = %18
  %142 = load ptr, ptr %6, align 8, !tbaa !9
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %146

144:                                              ; preds = %141
  %145 = load ptr, ptr @stdin, align 8, !tbaa !9
  br label %149

146:                                              ; preds = %141
  %147 = load ptr, ptr %6, align 8, !tbaa !9
  %148 = call noalias ptr @fopen(ptr noundef %147, ptr noundef @.str.11)
  br label %149

149:                                              ; preds = %146, %144
  %150 = phi ptr [ %145, %144 ], [ %148, %146 ]
  store ptr %150, ptr %8, align 8, !tbaa !9
  %151 = load ptr, ptr %8, align 8, !tbaa !9
  %152 = icmp eq ptr %151, null
  br i1 %152, label %153, label %157

153:                                              ; preds = %149
  %154 = load ptr, ptr @stderr, align 8, !tbaa !9
  %155 = load ptr, ptr %6, align 8, !tbaa !9
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.12, ptr noundef %155) #6
  call void @exit(i32 noundef 1) #8
  unreachable

157:                                              ; preds = %149
  %158 = load ptr, ptr %7, align 8, !tbaa !9
  %159 = icmp eq ptr %158, null
  br i1 %159, label %160, label %162

160:                                              ; preds = %157
  %161 = load ptr, ptr @stdout, align 8, !tbaa !9
  br label %165

162:                                              ; preds = %157
  %163 = load ptr, ptr %7, align 8, !tbaa !9
  %164 = call noalias ptr @fopen(ptr noundef %163, ptr noundef @.str.13)
  br label %165

165:                                              ; preds = %162, %160
  %166 = phi ptr [ %161, %160 ], [ %164, %162 ]
  store ptr %166, ptr %9, align 8, !tbaa !9
  %167 = load ptr, ptr %9, align 8, !tbaa !9
  %168 = icmp eq ptr %167, null
  br i1 %168, label %169, label %173

169:                                              ; preds = %165
  %170 = load ptr, ptr @stderr, align 8, !tbaa !9
  %171 = load ptr, ptr %7, align 8, !tbaa !9
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.14, ptr noundef %171) #6
  call void @exit(i32 noundef 1) #8
  unreachable

173:                                              ; preds = %165
  %174 = load ptr, ptr %11, align 8, !tbaa !9
  %175 = load ptr, ptr %12, align 8, !tbaa !9
  %176 = call ptr @sb_stemmer_new(ptr noundef %174, ptr noundef %175)
  store ptr %176, ptr %10, align 8, !tbaa !9
  %177 = load ptr, ptr %10, align 8, !tbaa !9
  %178 = icmp eq ptr %177, null
  br i1 %178, label %179, label %191

179:                                              ; preds = %173
  %180 = load ptr, ptr %12, align 8, !tbaa !9
  %181 = icmp eq ptr %180, null
  br i1 %181, label %182, label %186

182:                                              ; preds = %179
  %183 = load ptr, ptr @stderr, align 8, !tbaa !9
  %184 = load ptr, ptr %11, align 8, !tbaa !9
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str.15, ptr noundef %184) #6
  call void @exit(i32 noundef 1) #8
  unreachable

186:                                              ; preds = %179
  %187 = load ptr, ptr @stderr, align 8, !tbaa !9
  %188 = load ptr, ptr %11, align 8, !tbaa !9
  %189 = load ptr, ptr %12, align 8, !tbaa !9
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef @.str.16, ptr noundef %188, ptr noundef %189) #6
  call void @exit(i32 noundef 1) #8
  unreachable

191:                                              ; preds = %173
  %192 = load ptr, ptr %10, align 8, !tbaa !9
  %193 = load ptr, ptr %8, align 8, !tbaa !9
  %194 = load ptr, ptr %9, align 8, !tbaa !9
  call void @stem_file(ptr noundef %192, ptr noundef %193, ptr noundef %194)
  %195 = load ptr, ptr %10, align 8, !tbaa !9
  call void @sb_stemmer_delete(ptr noundef %195)
  %196 = load ptr, ptr %6, align 8, !tbaa !9
  %197 = icmp ne ptr %196, null
  br i1 %197, label %198, label %201

198:                                              ; preds = %191
  %199 = load ptr, ptr %8, align 8, !tbaa !9
  %200 = call i32 @fclose(ptr noundef %199)
  br label %201

201:                                              ; preds = %198, %191
  %202 = load ptr, ptr %7, align 8, !tbaa !9
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %207

204:                                              ; preds = %201
  %205 = load ptr, ptr %9, align 8, !tbaa !9
  %206 = call i32 @fclose(ptr noundef %205)
  br label %207

207:                                              ; preds = %204, %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  ret i32 0
}

; 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
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare ptr @sb_stemmer_new(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @stem_file(ptr noundef, ptr noundef, ptr noundef) #0

declare void @sb_stemmer_delete(ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

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 = { 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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 [8 x i8], align 1
@pretty = external hidden local_unnamed_addr global i32, align 4
@progname = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [59 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  store i32 0, ptr @pretty, align 4, !tbaa !5
  %3 = load ptr, ptr %1, align 8, !tbaa !9
  store ptr %3, ptr @progname, align 8, !tbaa !9
  %4 = icmp sgt i32 %0, 1
  br i1 %4, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %2, %77
  %.099 = phi ptr [ %.1, %77 ], [ null, %2 ]
  %.05798 = phi i32 [ %.158, %77 ], [ 1, %2 ]
  %.05997 = phi ptr [ %.160, %77 ], [ null, %2 ]
  %.06196 = phi ptr [ %.162, %77 ], [ @.str, %2 ]
  %.06395 = phi ptr [ %.164, %77 ], [ null, %2 ]
  %5 = add nsw i32 %.05798, 1
  %6 = sext i32 %.05798 to i64
  %7 = getelementptr inbounds ptr, ptr %1, i64 %6
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = load i8, ptr %8, align 1, !tbaa !11
  %10 = icmp eq i8 %9, 45
  br i1 %10, label %11, label %74

11:                                               ; preds = %.lr.ph
  %12 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.1) #5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %23

14:                                               ; preds = %11
  %.not75 = icmp slt i32 %5, %0
  br i1 %.not75, label %18, label %15

15:                                               ; preds = %14
  %16 = load ptr, ptr @stderr, align 8, !tbaa !9
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

18:                                               ; preds = %14
  %19 = add nsw i32 %.05798, 2
  %20 = sext i32 %5 to i64
  %21 = getelementptr inbounds ptr, ptr %1, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  br label %77

23:                                               ; preds = %11
  %24 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.3) #5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %35

26:                                               ; preds = %23
  %.not74 = icmp slt i32 %5, %0
  br i1 %.not74, label %30, label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

30:                                               ; preds = %26
  %31 = add nsw i32 %.05798, 2
  %32 = sext i32 %5 to i64
  %33 = getelementptr inbounds ptr, ptr %1, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  br label %77

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

38:                                               ; preds = %35
  %.not73 = icmp slt i32 %5, %0
  br i1 %.not73, label %42, label %39

39:                                               ; preds = %38
  %40 = load ptr, ptr @stderr, align 8, !tbaa !9
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

42:                                               ; preds = %38
  %43 = add nsw i32 %.05798, 2
  %44 = sext i32 %5 to i64
  %45 = getelementptr inbounds ptr, ptr %1, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  br label %77

47:                                               ; preds = %35
  %48 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.5) #5
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  %.not72 = icmp slt i32 %5, %0
  br i1 %.not72, label %54, label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr @stderr, align 8, !tbaa !9
  %53 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

54:                                               ; preds = %50
  %55 = add nsw i32 %.05798, 2
  %56 = sext i32 %5 to i64
  %57 = getelementptr inbounds ptr, ptr %1, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  br label %77

59:                                               ; preds = %47
  %60 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.6) #5
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  store i32 2, ptr @pretty, align 4, !tbaa !5
  br label %77

63:                                               ; preds = %59
  %64 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.7) #5
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 1, ptr @pretty, align 4, !tbaa !5
  br label %77

67:                                               ; preds = %63
  %68 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.8) #5
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  tail call void @usage(i32 noundef 0)
  br label %77

71:                                               ; preds = %67
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.9, ptr noundef nonnull %8) #6
  tail call void @usage(i32 noundef 1)
  br label %77

74:                                               ; preds = %.lr.ph
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.10, ptr noundef nonnull %8) #6
  tail call void @usage(i32 noundef 1)
  br label %77

77:                                               ; preds = %18, %42, %62, %70, %71, %66, %54, %30, %74
  %.164 = phi ptr [ %22, %18 ], [ %.06395, %30 ], [ %.06395, %42 ], [ %.06395, %54 ], [ %.06395, %62 ], [ %.06395, %66 ], [ %.06395, %70 ], [ %.06395, %71 ], [ %.06395, %74 ]
  %.162 = phi ptr [ %.06196, %18 ], [ %.06196, %30 ], [ %46, %42 ], [ %.06196, %54 ], [ %.06196, %62 ], [ %.06196, %66 ], [ %.06196, %70 ], [ %.06196, %71 ], [ %.06196, %74 ]
  %.160 = phi ptr [ %.05997, %18 ], [ %.05997, %30 ], [ %.05997, %42 ], [ %58, %54 ], [ %.05997, %62 ], [ %.05997, %66 ], [ %.05997, %70 ], [ %.05997, %71 ], [ %.05997, %74 ]
  %.158 = phi i32 [ %19, %18 ], [ %31, %30 ], [ %43, %42 ], [ %55, %54 ], [ %5, %62 ], [ %5, %66 ], [ %5, %70 ], [ %5, %71 ], [ %5, %74 ]
  %.1 = phi ptr [ %.099, %18 ], [ %34, %30 ], [ %.099, %42 ], [ %.099, %54 ], [ %.099, %62 ], [ %.099, %66 ], [ %.099, %70 ], [ %.099, %71 ], [ %.099, %74 ]
  %78 = icmp slt i32 %.158, %0
  br i1 %78, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %77
  %79 = icmp eq ptr %.1, null
  br i1 %79, label %._crit_edge.thread, label %81

._crit_edge.thread:                               ; preds = %2, %._crit_edge
  %.059.lcssa116 = phi ptr [ %.160, %._crit_edge ], [ null, %2 ]
  %.061.lcssa114 = phi ptr [ %.162, %._crit_edge ], [ @.str, %2 ]
  %.063.lcssa112 = phi ptr [ %.164, %._crit_edge ], [ null, %2 ]
  %80 = load ptr, ptr @stdin, align 8, !tbaa !9
  br label %83

81:                                               ; preds = %._crit_edge
  %82 = tail call noalias ptr @fopen(ptr noundef nonnull %.1, ptr noundef nonnull @.str.11)
  br label %83

83:                                               ; preds = %81, %._crit_edge.thread
  %84 = phi i1 [ true, %._crit_edge.thread ], [ false, %81 ]
  %.0.lcssa117 = phi ptr [ null, %._crit_edge.thread ], [ %.1, %81 ]
  %.059.lcssa115 = phi ptr [ %.059.lcssa116, %._crit_edge.thread ], [ %.160, %81 ]
  %.061.lcssa113 = phi ptr [ %.061.lcssa114, %._crit_edge.thread ], [ %.162, %81 ]
  %.063.lcssa111 = phi ptr [ %.063.lcssa112, %._crit_edge.thread ], [ %.164, %81 ]
  %85 = phi ptr [ %80, %._crit_edge.thread ], [ %82, %81 ]
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %90

87:                                               ; preds = %83
  %88 = load ptr, ptr @stderr, align 8, !tbaa !9
  %89 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.12, ptr noundef %.0.lcssa117) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

90:                                               ; preds = %83
  %91 = icmp eq ptr %.063.lcssa111, null
  br i1 %91, label %92, label %94

92:                                               ; preds = %90
  %93 = load ptr, ptr @stdout, align 8, !tbaa !9
  br label %96

94:                                               ; preds = %90
  %95 = tail call noalias ptr @fopen(ptr noundef nonnull %.063.lcssa111, ptr noundef nonnull @.str.13)
  br label %96

96:                                               ; preds = %94, %92
  %97 = phi ptr [ %93, %92 ], [ %95, %94 ]
  %98 = icmp eq ptr %97, null
  br i1 %98, label %99, label %102

99:                                               ; preds = %96
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.14, ptr noundef %.063.lcssa111) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

102:                                              ; preds = %96
  %103 = tail call ptr @sb_stemmer_new(ptr noundef %.061.lcssa113, ptr noundef %.059.lcssa115) #8
  %104 = icmp eq ptr %103, null
  br i1 %104, label %105, label %112

105:                                              ; preds = %102
  %106 = icmp eq ptr %.059.lcssa115, null
  %107 = load ptr, ptr @stderr, align 8, !tbaa !9
  br i1 %106, label %108, label %110

108:                                              ; preds = %105
  %109 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.15, ptr noundef %.061.lcssa113) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

110:                                              ; preds = %105
  %111 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.16, ptr noundef %.061.lcssa113, ptr noundef nonnull %.059.lcssa115) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

112:                                              ; preds = %102
  tail call void @stem_file(ptr noundef nonnull %103, ptr noundef nonnull %85, ptr noundef nonnull %97)
  tail call void @sb_stemmer_delete(ptr noundef nonnull %103) #8
  br i1 %84, label %115, label %113

113:                                              ; preds = %112
  %114 = tail call i32 @fclose(ptr noundef nonnull %85)
  br label %115

115:                                              ; preds = %113, %112
  br i1 %91, label %118, label %116

116:                                              ; preds = %115
  %117 = tail call i32 @fclose(ptr noundef nonnull %97)
  br label %118

118:                                              ; preds = %116, %115
  ret i32 0
}

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

declare ptr @sb_stemmer_new(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @stem_file(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @sb_stemmer_delete(ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

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 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 #2 = { 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 #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 willreturn memory(read) }
attributes #6 = { cold nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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