; LLVM IR from davidesantangelo/krep :: krep (prepare_bad_char_table)

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

@lower_table = external dso_local global [256 x i8], align 16

; 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 uwtable
define dso_local void @prepare_bad_char_table(ptr noundef %0, i64 noundef %1, ptr noundef %2, i1 noundef zeroext %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %17 = zext i1 %3 to i8
  store i8 %17, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !13
  br label %18

18:                                               ; preds = %29, %4
  %19 = load i32, ptr %9, align 4, !tbaa !13
  %20 = icmp slt i32 %19, 256
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %32

22:                                               ; preds = %18
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = trunc i64 %23 to i32
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load i32, ptr %9, align 4, !tbaa !13
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr %25, i64 %27
  store i32 %24, ptr %28, align 4, !tbaa !13
  br label %29

29:                                               ; preds = %22
  %30 = load i32, ptr %9, align 4, !tbaa !13
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %9, align 4, !tbaa !13
  br label %18, !llvm.loop !15

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

33:                                               ; preds = %117, %32
  %34 = load i64, ptr %10, align 8, !tbaa !9
  %35 = load i64, ptr %6, align 8, !tbaa !9
  %36 = sub i64 %35, 1
  %37 = icmp ult i64 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %120

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load i64, ptr %10, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %40, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !17
  store i8 %43, ptr %11, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %44 = load i64, ptr %6, align 8, !tbaa !9
  %45 = sub i64 %44, 1
  %46 = load i64, ptr %10, align 8, !tbaa !9
  %47 = sub i64 %45, %46
  %48 = trunc i64 %47 to i32
  store i32 %48, ptr %12, align 4, !tbaa !13
  %49 = load i8, ptr %8, align 1, !tbaa !11, !range !18, !noundef !19
  %50 = trunc i8 %49 to i1
  br i1 %50, label %101, label %51

51:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #3
  %52 = load i8, ptr %11, align 1, !tbaa !17
  %53 = zext i8 %52 to i64
  %54 = getelementptr inbounds [256 x i8], ptr @lower_table, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !17
  store i8 %55, ptr %13, align 1, !tbaa !17
  %56 = load i32, ptr %12, align 4, !tbaa !13
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load i8, ptr %13, align 1, !tbaa !17
  %59 = zext i8 %58 to i64
  %60 = getelementptr inbounds i32, ptr %57, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !13
  %62 = icmp slt i32 %56, %61
  br i1 %62, label %63, label %69

63:                                               ; preds = %51
  %64 = load i32, ptr %12, align 4, !tbaa !13
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load i8, ptr %13, align 1, !tbaa !17
  %67 = zext i8 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  store i32 %64, ptr %68, align 4, !tbaa !13
  br label %69

69:                                               ; preds = %63, %51
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %70 = call ptr @__ctype_toupper_loc() #4
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = load i8, ptr %11, align 1, !tbaa !17
  %73 = zext i8 %72 to i32
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %71, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !13
  store i32 %76, ptr %15, align 4, !tbaa !13
  %77 = load i32, ptr %15, align 4, !tbaa !13
  store i32 %77, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  %78 = load i32, ptr %16, align 4, !tbaa !13
  %79 = trunc i32 %78 to i8
  store i8 %79, ptr %14, align 1, !tbaa !17
  %80 = load i8, ptr %14, align 1, !tbaa !17
  %81 = zext i8 %80 to i32
  %82 = load i8, ptr %13, align 1, !tbaa !17
  %83 = zext i8 %82 to i32
  %84 = icmp ne i32 %81, %83
  br i1 %84, label %85, label %100

85:                                               ; preds = %69
  %86 = load i32, ptr %12, align 4, !tbaa !13
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i8, ptr %14, align 1, !tbaa !17
  %89 = zext i8 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !13
  %92 = icmp slt i32 %86, %91
  br i1 %92, label %93, label %99

93:                                               ; preds = %85
  %94 = load i32, ptr %12, align 4, !tbaa !13
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = load i8, ptr %14, align 1, !tbaa !17
  %97 = zext i8 %96 to i64
  %98 = getelementptr inbounds i32, ptr %95, i64 %97
  store i32 %94, ptr %98, align 4, !tbaa !13
  br label %99

99:                                               ; preds = %93, %85
  br label %100

100:                                              ; preds = %99, %69
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  br label %116

101:                                              ; preds = %39
  %102 = load i32, ptr %12, align 4, !tbaa !13
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load i8, ptr %11, align 1, !tbaa !17
  %105 = zext i8 %104 to i64
  %106 = getelementptr inbounds i32, ptr %103, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !13
  %108 = icmp slt i32 %102, %107
  br i1 %108, label %109, label %115

109:                                              ; preds = %101
  %110 = load i32, ptr %12, align 4, !tbaa !13
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load i8, ptr %11, align 1, !tbaa !17
  %113 = zext i8 %112 to i64
  %114 = getelementptr inbounds i32, ptr %111, i64 %113
  store i32 %110, ptr %114, align 4, !tbaa !13
  br label %115

115:                                              ; preds = %109, %101
  br label %116

116:                                              ; preds = %115, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  br label %117

117:                                              ; preds = %116
  %118 = load i64, ptr %10, align 8, !tbaa !9
  %119 = add i64 %118, 1
  store i64 %119, ptr %10, align 8, !tbaa !9
  br label %33, !llvm.loop !20

120:                                              ; preds = %38
  ret void
}

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() #2

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

!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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !16}


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

@lower_table = external dso_local local_unnamed_addr global [256 x i8], align 16

; Function Attrs: nofree nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local void @prepare_bad_char_table(ptr nocapture noundef readonly %0, i64 noundef %1, ptr nocapture noundef %2, i1 noundef zeroext %3) local_unnamed_addr #0 {
vector.ph:
  %4 = trunc i64 %1 to i32
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %4, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %5 = getelementptr inbounds i8, ptr %2, i64 16
  store <4 x i32> %broadcast.splat, ptr %2, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %5, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %2, i64 32
  %7 = getelementptr inbounds i8, ptr %2, i64 48
  store <4 x i32> %broadcast.splat, ptr %6, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %7, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %2, i64 64
  %9 = getelementptr inbounds i8, ptr %2, i64 80
  store <4 x i32> %broadcast.splat, ptr %8, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %2, i64 96
  %11 = getelementptr inbounds i8, ptr %2, i64 112
  store <4 x i32> %broadcast.splat, ptr %10, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %11, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %2, i64 128
  %13 = getelementptr inbounds i8, ptr %2, i64 144
  store <4 x i32> %broadcast.splat, ptr %12, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %13, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %2, i64 160
  %15 = getelementptr inbounds i8, ptr %2, i64 176
  store <4 x i32> %broadcast.splat, ptr %14, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %15, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %2, i64 192
  %17 = getelementptr inbounds i8, ptr %2, i64 208
  store <4 x i32> %broadcast.splat, ptr %16, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %2, i64 224
  %19 = getelementptr inbounds i8, ptr %2, i64 240
  store <4 x i32> %broadcast.splat, ptr %18, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %2, i64 256
  %21 = getelementptr inbounds i8, ptr %2, i64 272
  store <4 x i32> %broadcast.splat, ptr %20, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %21, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %2, i64 288
  %23 = getelementptr inbounds i8, ptr %2, i64 304
  store <4 x i32> %broadcast.splat, ptr %22, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %23, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %2, i64 320
  %25 = getelementptr inbounds i8, ptr %2, i64 336
  store <4 x i32> %broadcast.splat, ptr %24, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %25, align 4, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %2, i64 352
  %27 = getelementptr inbounds i8, ptr %2, i64 368
  store <4 x i32> %broadcast.splat, ptr %26, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %27, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %2, i64 384
  %29 = getelementptr inbounds i8, ptr %2, i64 400
  store <4 x i32> %broadcast.splat, ptr %28, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %29, align 4, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %2, i64 416
  %31 = getelementptr inbounds i8, ptr %2, i64 432
  store <4 x i32> %broadcast.splat, ptr %30, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %2, i64 448
  %33 = getelementptr inbounds i8, ptr %2, i64 464
  store <4 x i32> %broadcast.splat, ptr %32, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %33, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %2, i64 480
  %35 = getelementptr inbounds i8, ptr %2, i64 496
  store <4 x i32> %broadcast.splat, ptr %34, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %35, align 4, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %2, i64 512
  %37 = getelementptr inbounds i8, ptr %2, i64 528
  store <4 x i32> %broadcast.splat, ptr %36, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %37, align 4, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %2, i64 544
  %39 = getelementptr inbounds i8, ptr %2, i64 560
  store <4 x i32> %broadcast.splat, ptr %38, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %39, align 4, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %2, i64 576
  %41 = getelementptr inbounds i8, ptr %2, i64 592
  store <4 x i32> %broadcast.splat, ptr %40, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %41, align 4, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %2, i64 608
  %43 = getelementptr inbounds i8, ptr %2, i64 624
  store <4 x i32> %broadcast.splat, ptr %42, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %2, i64 640
  %45 = getelementptr inbounds i8, ptr %2, i64 656
  store <4 x i32> %broadcast.splat, ptr %44, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %2, i64 672
  %47 = getelementptr inbounds i8, ptr %2, i64 688
  store <4 x i32> %broadcast.splat, ptr %46, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %47, align 4, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %2, i64 704
  %49 = getelementptr inbounds i8, ptr %2, i64 720
  store <4 x i32> %broadcast.splat, ptr %48, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %49, align 4, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %2, i64 736
  %51 = getelementptr inbounds i8, ptr %2, i64 752
  store <4 x i32> %broadcast.splat, ptr %50, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %2, i64 768
  %53 = getelementptr inbounds i8, ptr %2, i64 784
  store <4 x i32> %broadcast.splat, ptr %52, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %53, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %2, i64 800
  %55 = getelementptr inbounds i8, ptr %2, i64 816
  store <4 x i32> %broadcast.splat, ptr %54, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %55, align 4, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %2, i64 832
  %57 = getelementptr inbounds i8, ptr %2, i64 848
  store <4 x i32> %broadcast.splat, ptr %56, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %57, align 4, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %2, i64 864
  %59 = getelementptr inbounds i8, ptr %2, i64 880
  store <4 x i32> %broadcast.splat, ptr %58, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %59, align 4, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %2, i64 896
  %61 = getelementptr inbounds i8, ptr %2, i64 912
  store <4 x i32> %broadcast.splat, ptr %60, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %61, align 4, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %2, i64 928
  %63 = getelementptr inbounds i8, ptr %2, i64 944
  store <4 x i32> %broadcast.splat, ptr %62, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %63, align 4, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %2, i64 960
  %65 = getelementptr inbounds i8, ptr %2, i64 976
  store <4 x i32> %broadcast.splat, ptr %64, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %65, align 4, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %2, i64 992
  %67 = getelementptr inbounds i8, ptr %2, i64 1008
  store <4 x i32> %broadcast.splat, ptr %66, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %67, align 4, !tbaa !5
  %68 = add i64 %1, -1
  %.not41 = icmp eq i64 %68, 0
  br i1 %.not41, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %vector.ph
  br i1 %3, label %.lr.ph.split.us.preheader, label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %xtraiter = and i64 %68, 1
  %69 = icmp eq i64 %1, 2
  br i1 %69, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.split.us.preheader.new

.lr.ph.split.us.preheader.new:                    ; preds = %.lr.ph.split.us.preheader
  %unroll_iter = and i64 %68, -2
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %89, %.lr.ph.split.us.preheader.new
  %.03640.us = phi i64 [ 0, %.lr.ph.split.us.preheader.new ], [ %90, %89 ]
  %niter = phi i64 [ 0, %.lr.ph.split.us.preheader.new ], [ %niter.next.1, %89 ]
  %70 = getelementptr inbounds i8, ptr %0, i64 %.03640.us
  %71 = load i8, ptr %70, align 1, !tbaa !9
  %72 = sub i64 %68, %.03640.us
  %73 = trunc i64 %72 to i32
  %74 = zext i8 %71 to i64
  %75 = getelementptr inbounds i32, ptr %2, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp sgt i32 %76, %73
  br i1 %77, label %78, label %.lr.ph.split.us.1

78:                                               ; preds = %.lr.ph.split.us
  store i32 %73, ptr %75, align 4, !tbaa !5
  br label %.lr.ph.split.us.1

.lr.ph.split.us.1:                                ; preds = %78, %.lr.ph.split.us
  %79 = or disjoint i64 %.03640.us, 1
  %80 = getelementptr inbounds i8, ptr %0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = sub i64 %68, %79
  %83 = trunc i64 %82 to i32
  %84 = zext i8 %81 to i64
  %85 = getelementptr inbounds i32, ptr %2, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp sgt i32 %86, %83
  br i1 %87, label %88, label %89

88:                                               ; preds = %.lr.ph.split.us.1
  store i32 %83, ptr %85, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %88, %.lr.ph.split.us.1
  %90 = add nuw i64 %.03640.us, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.split.us, !llvm.loop !10

.lr.ph.split:                                     ; preds = %.lr.ph
  %91 = tail call ptr @__ctype_toupper_loc() #2
  %92 = load ptr, ptr %91, align 8, !tbaa !12
  br label %102

._crit_edge.loopexit.unr-lcssa:                   ; preds = %89, %.lr.ph.split.us.preheader
  %.03640.us.unr = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %90, %89 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.split.us.epil

.lr.ph.split.us.epil:                             ; preds = %._crit_edge.loopexit.unr-lcssa
  %93 = getelementptr inbounds i8, ptr %0, i64 %.03640.us.unr
  %94 = load i8, ptr %93, align 1, !tbaa !9
  %95 = sub i64 %68, %.03640.us.unr
  %96 = trunc i64 %95 to i32
  %97 = zext i8 %94 to i64
  %98 = getelementptr inbounds i32, ptr %2, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, %96
  br i1 %100, label %101, label %._crit_edge

101:                                              ; preds = %.lr.ph.split.us.epil
  store i32 %96, ptr %98, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %126, %._crit_edge.loopexit.unr-lcssa, %101, %.lr.ph.split.us.epil, %vector.ph
  ret void

102:                                              ; preds = %.lr.ph.split, %126
  %.03640 = phi i64 [ 0, %.lr.ph.split ], [ %127, %126 ]
  %103 = getelementptr inbounds i8, ptr %0, i64 %.03640
  %104 = load i8, ptr %103, align 1, !tbaa !9
  %105 = sub i64 %68, %.03640
  %106 = trunc i64 %105 to i32
  %107 = zext i8 %104 to i64
  %108 = getelementptr inbounds [256 x i8], ptr @lower_table, i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !9
  %110 = zext i8 %109 to i64
  %111 = getelementptr inbounds i32, ptr %2, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = icmp sgt i32 %112, %106
  br i1 %113, label %114, label %115

114:                                              ; preds = %102
  store i32 %106, ptr %111, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %114, %102
  %116 = getelementptr inbounds i32, ptr %92, i64 %107
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = trunc i32 %117 to i8
  %.not = icmp eq i8 %109, %118
  br i1 %.not, label %126, label %119

119:                                              ; preds = %115
  %120 = and i32 %117, 255
  %121 = zext nneg i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %2, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp sgt i32 %123, %106
  br i1 %124, label %125, label %126

125:                                              ; preds = %119
  store i32 %106, ptr %122, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %115, %125, %119
  %127 = add nuw i64 %.03640, 1
  %exitcond44.not = icmp eq i64 %127, %68
  br i1 %exitcond44.not, label %._crit_edge, label %102, !llvm.loop !10
}

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() local_unnamed_addr #1

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

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}


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