; LLVM IR from tangjz/acm-icpc :: projecteuler (89)

; 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"

@buf = external dso_local global [101 x i8], align 16
@trans = external dso_local global [255 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  store i8 86, ptr getelementptr inbounds ([255 x i8], ptr @trans, i64 0, i64 73), align 1, !tbaa !9
  store i8 88, ptr getelementptr inbounds ([255 x i8], ptr @trans, i64 0, i64 86), align 2, !tbaa !9
  store i8 76, ptr getelementptr inbounds ([255 x i8], ptr @trans, i64 0, i64 88), align 8, !tbaa !9
  store i8 67, ptr getelementptr inbounds ([255 x i8], ptr @trans, i64 0, i64 76), align 4, !tbaa !9
  store i8 68, ptr getelementptr inbounds ([255 x i8], ptr @trans, i64 0, i64 67), align 1, !tbaa !9
  store i8 77, ptr getelementptr inbounds ([255 x i8], ptr @trans, i64 0, i64 68), align 4, !tbaa !9
  br label %5

5:                                                ; preds = %197, %0
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @buf)
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %8, label %202

8:                                                ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %194, %8
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %11
  %13 = load i8, ptr %12, align 1, !tbaa !9
  %14 = icmp ne i8 %13, 0
  br i1 %14, label %16, label %15

15:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %197

16:                                               ; preds = %9
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %18
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %21 to i64
  %24 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %23
  store i8 %20, ptr %24, align 1, !tbaa !9
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = icmp sge i32 %25, 4
  br i1 %26, label %27, label %110

27:                                               ; preds = %16
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sub nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 73
  br i1 %34, label %51, label %35

35:                                               ; preds = %27
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !9
  %41 = sext i8 %40 to i32
  %42 = icmp eq i32 %41, 88
  br i1 %42, label %51, label %43

43:                                               ; preds = %35
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sub nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 67
  br i1 %50, label %51, label %110

51:                                               ; preds = %43, %35, %27
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 2
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !9
  %63 = sext i8 %62 to i32
  %64 = icmp eq i32 %57, %63
  br i1 %64, label %65, label %110

65:                                               ; preds = %51
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = sub nsw i32 %66, 2
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = sext i8 %70 to i32
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 3
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !9
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %71, %77
  br i1 %78, label %79, label %110

79:                                               ; preds = %65
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = sub nsw i32 %80, 3
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = sext i8 %84 to i32
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = sub nsw i32 %86, 4
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %91 = sext i8 %90 to i32
  %92 = icmp eq i32 %85, %91
  br i1 %92, label %93, label %110

93:                                               ; preds = %79
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = add nsw i32 %94, 2
  store i32 %95, ptr %2, align 4, !tbaa !5
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 2
  store i32 %97, ptr %3, align 4, !tbaa !5
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = sub nsw i32 %98, 1
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !9
  %103 = sext i8 %102 to i64
  %104 = getelementptr inbounds [255 x i8], ptr @trans, i64 0, i64 %103
  %105 = load i8, ptr %104, align 1, !tbaa !9
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %108
  store i8 %105, ptr %109, align 1, !tbaa !9
  br label %110

110:                                              ; preds = %93, %79, %65, %51, %43, %16
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = icmp sge i32 %111, 3
  br i1 %112, label %113, label %193

113:                                              ; preds = %110
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 2
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %116
  %118 = load i8, ptr %117, align 1, !tbaa !9
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 73
  br i1 %120, label %137, label %121

121:                                              ; preds = %113
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = sub nsw i32 %122, 2
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %124
  %126 = load i8, ptr %125, align 1, !tbaa !9
  %127 = sext i8 %126 to i32
  %128 = icmp eq i32 %127, 88
  br i1 %128, label %137, label %129

129:                                              ; preds = %121
  %130 = load i32, ptr %3, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 2
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !9
  %135 = sext i8 %134 to i32
  %136 = icmp eq i32 %135, 67
  br i1 %136, label %137, label %193

137:                                              ; preds = %129, %121, %113
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %140
  %142 = load i8, ptr %141, align 1, !tbaa !9
  %143 = sext i8 %142 to i32
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = sub nsw i32 %144, 2
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %146
  %148 = load i8, ptr %147, align 1, !tbaa !9
  %149 = sext i8 %148 to i64
  %150 = getelementptr inbounds [255 x i8], ptr @trans, i64 0, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !9
  %152 = sext i8 %151 to i32
  %153 = icmp eq i32 %143, %152
  br i1 %153, label %154, label %193

154:                                              ; preds = %137
  %155 = load i32, ptr %3, align 4, !tbaa !5
  %156 = sub nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %157
  %159 = load i8, ptr %158, align 1, !tbaa !9
  %160 = sext i8 %159 to i32
  %161 = load i32, ptr %3, align 4, !tbaa !5
  %162 = sub nsw i32 %161, 3
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %163
  %165 = load i8, ptr %164, align 1, !tbaa !9
  %166 = sext i8 %165 to i32
  %167 = icmp eq i32 %160, %166
  br i1 %167, label %168, label %193

168:                                              ; preds = %154
  %169 = load i32, ptr %2, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %2, align 4, !tbaa !5
  %171 = load i32, ptr %3, align 4, !tbaa !5
  %172 = add nsw i32 %171, -1
  store i32 %172, ptr %3, align 4, !tbaa !5
  %173 = load i32, ptr %3, align 4, !tbaa !5
  %174 = sub nsw i32 %173, 1
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %175
  %177 = load i32, ptr %3, align 4, !tbaa !5
  %178 = sub nsw i32 %177, 2
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %179
  call void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1) %176, ptr noundef nonnull align 1 dereferenceable(1) %180) #4
  %181 = load i32, ptr %3, align 4, !tbaa !5
  %182 = sub nsw i32 %181, 1
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %183
  %185 = load i8, ptr %184, align 1, !tbaa !9
  %186 = sext i8 %185 to i64
  %187 = getelementptr inbounds [255 x i8], ptr @trans, i64 0, i64 %186
  %188 = load i8, ptr %187, align 1, !tbaa !9
  %189 = load i32, ptr %3, align 4, !tbaa !5
  %190 = sub nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %191
  store i8 %188, ptr %192, align 1, !tbaa !9
  br label %193

193:                                              ; preds = %168, %154, %137, %129, %110
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %4, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %4, align 4, !tbaa !5
  br label %9, !llvm.loop !10

197:                                              ; preds = %15
  %198 = load i32, ptr %3, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %199
  store i8 0, ptr %200, align 1, !tbaa !9
  %201 = call i32 @puts(ptr noundef @buf)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %5, !llvm.loop !12

202:                                              ; preds = %5
  %203 = load i32, ptr %2, align 4, !tbaa !5
  %204 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %203)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3

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

declare i32 @puts(ptr noundef) #2

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

attributes #0 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


; 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"

@buf = external dso_local global [101 x i8], align 16
@trans = external dso_local local_unnamed_addr global [255 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  store i8 86, ptr getelementptr inbounds (i8, ptr @trans, i64 73), align 1, !tbaa !5
  store i8 88, ptr getelementptr inbounds (i8, ptr @trans, i64 86), align 2, !tbaa !5
  store i8 76, ptr getelementptr inbounds (i8, ptr @trans, i64 88), align 8, !tbaa !5
  store i8 67, ptr getelementptr inbounds (i8, ptr @trans, i64 76), align 4, !tbaa !5
  store i8 68, ptr getelementptr inbounds (i8, ptr @trans, i64 67), align 1, !tbaa !5
  store i8 77, ptr getelementptr inbounds (i8, ptr @trans, i64 68), align 4, !tbaa !5
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %2 = icmp eq i32 %1, 1
  br i1 %2, label %.preheader, label %._crit_edge56

.preheader:                                       ; preds = %0, %._crit_edge
  %.03555 = phi i32 [ %.136.lcssa, %._crit_edge ], [ 0, %0 ]
  %3 = load i8, ptr @buf, align 16, !tbaa !5
  %.not50 = icmp eq i8 %3, 0
  br i1 %.not50, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %65, %.preheader
  %.136.lcssa = phi i32 [ %.03555, %.preheader ], [ %.3, %65 ]
  %.034.lcssa = phi i32 [ 0, %.preheader ], [ %.2, %65 ]
  %4 = sext i32 %.034.lcssa to i64
  %5 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %4
  store i8 0, ptr %5, align 1, !tbaa !5
  %6 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @buf)
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %.preheader, label %._crit_edge56, !llvm.loop !8

.lr.ph:                                           ; preds = %.preheader, %65
  %indvars.iv = phi i64 [ %indvars.iv.next, %65 ], [ 0, %.preheader ]
  %9 = phi i8 [ %67, %65 ], [ %3, %.preheader ]
  %.03452 = phi i32 [ %.2, %65 ], [ 0, %.preheader ]
  %.13651 = phi i32 [ %.3, %65 ], [ %.03555, %.preheader ]
  %10 = add nsw i32 %.03452, 1
  %11 = sext i32 %.03452 to i64
  %12 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %11
  store i8 %9, ptr %12, align 1, !tbaa !5
  %13 = icmp sgt i32 %.03452, 2
  br i1 %13, label %14, label %38

14:                                               ; preds = %.lr.ph
  switch i8 %9, label %.thread [
    i8 73, label %15
    i8 88, label %15
    i8 67, label %15
  ]

15:                                               ; preds = %14, %14, %14
  %16 = add nsw i32 %.03452, -1
  %17 = zext nneg i32 %16 to i64
  %18 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = icmp eq i8 %9, %19
  br i1 %20, label %21, label %.thread

21:                                               ; preds = %15
  %22 = add nsw i32 %.03452, -2
  %23 = zext nneg i32 %22 to i64
  %24 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = icmp eq i8 %9, %25
  br i1 %26, label %27, label %.thread

27:                                               ; preds = %21
  %28 = add nsw i32 %.03452, -3
  %29 = zext nneg i32 %28 to i64
  %30 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %32 = icmp eq i8 %9, %31
  br i1 %32, label %33, label %.thread

33:                                               ; preds = %27
  %34 = add nsw i32 %.13651, 2
  %35 = zext nneg i8 %9 to i64
  %36 = getelementptr inbounds [255 x i8], ptr @trans, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !5
  store i8 %37, ptr %24, align 1, !tbaa !5
  br label %38

38:                                               ; preds = %33, %.lr.ph
  %.237 = phi i32 [ %34, %33 ], [ %.13651, %.lr.ph ]
  %.1 = phi i32 [ %16, %33 ], [ %10, %.lr.ph ]
  %39 = icmp sgt i32 %.1, 2
  br i1 %39, label %.thread, label %65

.thread:                                          ; preds = %14, %15, %21, %27, %38
  %.149 = phi i32 [ %.1, %38 ], [ %10, %27 ], [ %10, %21 ], [ %10, %15 ], [ %10, %14 ]
  %.23748 = phi i32 [ %.237, %38 ], [ %.13651, %27 ], [ %.13651, %21 ], [ %.13651, %15 ], [ %.13651, %14 ]
  %40 = add nsw i32 %.149, -2
  %41 = zext nneg i32 %40 to i64
  %42 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !5
  switch i8 %43, label %65 [
    i8 73, label %44
    i8 88, label %44
    i8 67, label %44
  ]

44:                                               ; preds = %.thread, %.thread, %.thread
  %45 = add nsw i32 %.149, -1
  %46 = zext nneg i32 %45 to i64
  %47 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %49 = zext nneg i8 %43 to i64
  %50 = getelementptr inbounds [255 x i8], ptr @trans, i64 0, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !5
  %52 = icmp eq i8 %48, %51
  br i1 %52, label %53, label %65

53:                                               ; preds = %44
  %54 = add nsw i32 %.149, -3
  %55 = zext nneg i32 %54 to i64
  %56 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %58 = icmp eq i8 %48, %57
  br i1 %58, label %59, label %65

59:                                               ; preds = %53
  %60 = add nsw i32 %.23748, 1
  tail call void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1) %42, ptr noundef nonnull align 1 dereferenceable(1) %56) #3
  %61 = load i8, ptr %42, align 1, !tbaa !5
  %62 = sext i8 %61 to i64
  %63 = getelementptr inbounds [255 x i8], ptr @trans, i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !5
  store i8 %64, ptr %42, align 1, !tbaa !5
  br label %65

65:                                               ; preds = %.thread, %38, %44, %53, %59
  %.3 = phi i32 [ %60, %59 ], [ %.23748, %53 ], [ %.23748, %44 ], [ %.237, %38 ], [ %.23748, %.thread ]
  %.2 = phi i32 [ %45, %59 ], [ %.149, %53 ], [ %.149, %44 ], [ %.1, %38 ], [ %.149, %.thread ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %66 = getelementptr inbounds [101 x i8], ptr @buf, i64 0, i64 %indvars.iv.next
  %67 = load i8, ptr %66, align 1, !tbaa !5
  %.not = icmp eq i8 %67, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !10

._crit_edge56:                                    ; preds = %._crit_edge, %0
  %.035.lcssa = phi i32 [ 0, %0 ], [ %.136.lcssa, %._crit_edge ]
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.035.lcssa)
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

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

attributes #0 = { mustprogress norecurse 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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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