; LLVM IR from paintdream/DontStarveLuaJIT :: src/luajit/src (lj_opt_mem)

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

%struct.jit_State = type { %struct.GCtrace, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i8, i8, %struct.IRType1, i8, %struct.FoldState, ptr, i32, i32, i32, i32, i32, i32, i32, %struct.MRef, [5 x %union.TValue], ptr, i32, i32, i32, i32, ptr, ptr, i32, i32, i8, ptr, i32, i32, ptr, [100 x i16], [255 x i32], [15 x i32], [16 x ptr], [64 x %struct.HotPenalty], i32, i32, [16 x %struct.BPropEntry], i32, %struct.ScEvEntry, ptr, i32, i32, ptr, i32, i32, ptr, ptr, ptr, i64, i64, %union.TValue, ptr, i32, i32 }
%struct.GCtrace = type { %struct.GCRef, i8, i8, i8, i8, i32, %struct.GCRef, ptr, i32, i16, i16, ptr, ptr, %struct.GCRef, %struct.MRef, i32, i32, ptr, i32, i16, i16, i16, i16, i16, i16, i16, i8, i8 }
%struct.GCRef = type { i32 }
%struct.IRType1 = type { i8 }
%struct.FoldState = type { %union.IRIns, %union.IRIns, %union.IRIns }
%union.IRIns = type { %struct.anon.0 }
%struct.anon.0 = type { i32, %struct.IRType1, i8, i8, i8 }
%struct.MRef = type { i32 }
%struct.HotPenalty = type { %struct.MRef, i16, i16 }
%struct.BPropEntry = type { i16, i16, i32 }
%struct.ScEvEntry = type { %struct.MRef, i16, i16, i16, i16, %struct.IRType1, i8 }
%union.TValue = type { i64 }
%struct.anon = type { i16, i16, i16, i16 }

; 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 hidden i32 @lj_opt_fwd_wasnonnil(ptr noundef %0, i16 noundef zeroext %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i16 %1, ptr %6, align 2, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.jit_State, ptr %14, i32 0, i32 38
  %16 = load i16, ptr %6, align 2, !tbaa !9
  %17 = zext i16 %16 to i32
  %18 = add nsw i32 %17, 7
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [100 x i16], ptr %15, i64 0, i64 %19
  %21 = load i16, ptr %20, align 2, !tbaa !9
  %22 = zext i16 %21 to i32
  store i32 %22, ptr %8, align 4, !tbaa !11
  br label %23

23:                                               ; preds = %135, %3
  %24 = load i32, ptr %8, align 4, !tbaa !11
  %25 = load i32, ptr %7, align 4, !tbaa !11
  %26 = icmp ugt i32 %24, %25
  br i1 %26, label %27, label %136

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.jit_State, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds %struct.GCtrace, ptr %29, i32 0, i32 7
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = load i32, ptr %8, align 4, !tbaa !11
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds %union.IRIns, ptr %31, i64 %33
  store ptr %34, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.anon, ptr %35, i32 0, i32 0
  %37 = load i16, ptr %36, align 4, !tbaa !22
  %38 = zext i16 %37 to i32
  %39 = load i32, ptr %7, align 4, !tbaa !11
  %40 = icmp eq i32 %38, %39
  br i1 %40, label %41, label %51

41:                                               ; preds = %27
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.anon.0, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %struct.IRType1, ptr %43, i32 0, i32 0
  %45 = load i8, ptr %44, align 4, !tbaa !22
  %46 = zext i8 %45 to i32
  %47 = and i32 %46, 31
  %48 = icmp eq i32 %47, 0
  %49 = xor i1 %48, true
  %50 = zext i1 %49 to i32
  store i32 %50, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %133

51:                                               ; preds = %27
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 1
  %54 = getelementptr inbounds %struct.IRType1, ptr %53, i32 0, i32 0
  %55 = load i8, ptr %54, align 4, !tbaa !22
  %56 = zext i8 %55 to i32
  %57 = and i32 %56, 31
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %127

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.jit_State, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds %struct.GCtrace, ptr %61, i32 0, i32 7
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.anon, ptr %64, i32 0, i32 0
  %66 = load i16, ptr %65, align 4, !tbaa !22
  %67 = zext i16 %66 to i64
  %68 = getelementptr inbounds %union.IRIns, ptr %63, i64 %67
  %69 = getelementptr inbounds %struct.anon, ptr %68, i32 0, i32 1
  %70 = load i16, ptr %69, align 2, !tbaa !22
  %71 = zext i16 %70 to i32
  store i32 %71, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.jit_State, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds %struct.GCtrace, ptr %73, i32 0, i32 7
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = load i32, ptr %7, align 4, !tbaa !11
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds %union.IRIns, ptr %75, i64 %77
  %79 = getelementptr inbounds %struct.anon, ptr %78, i32 0, i32 1
  %80 = load i16, ptr %79, align 2, !tbaa !22
  %81 = zext i16 %80 to i32
  store i32 %81, ptr %12, align 4, !tbaa !11
  %82 = load i16, ptr %6, align 2, !tbaa !9
  %83 = zext i16 %82 to i32
  %84 = icmp eq i32 %83, 66
  br i1 %84, label %111, label %85

85:                                               ; preds = %59
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.jit_State, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds %struct.GCtrace, ptr %87, i32 0, i32 7
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i32, ptr %11, align 4, !tbaa !11
  %91 = zext i32 %90 to i64
  %92 = getelementptr inbounds %union.IRIns, ptr %89, i64 %91
  %93 = getelementptr inbounds %struct.anon.0, ptr %92, i32 0, i32 1
  %94 = getelementptr inbounds %struct.IRType1, ptr %93, i32 0, i32 0
  %95 = load i8, ptr %94, align 4, !tbaa !22
  %96 = zext i8 %95 to i32
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.jit_State, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.GCtrace, ptr %98, i32 0, i32 7
  %100 = load ptr, ptr %99, align 8, !tbaa !13
  %101 = load i32, ptr %12, align 4, !tbaa !11
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds %union.IRIns, ptr %100, i64 %102
  %104 = getelementptr inbounds %struct.anon.0, ptr %103, i32 0, i32 1
  %105 = getelementptr inbounds %struct.IRType1, ptr %104, i32 0, i32 0
  %106 = load i8, ptr %105, align 4, !tbaa !22
  %107 = zext i8 %106 to i32
  %108 = xor i32 %96, %107
  %109 = and i32 %108, 31
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %123

111:                                              ; preds = %85, %59
  %112 = load i32, ptr %11, align 4, !tbaa !11
  %113 = load i32, ptr %12, align 4, !tbaa !11
  %114 = icmp eq i32 %112, %113
  br i1 %114, label %121, label %115

115:                                              ; preds = %111
  %116 = load i32, ptr %11, align 4, !tbaa !11
  %117 = icmp ult i32 %116, 32768
  br i1 %117, label %118, label %121

118:                                              ; preds = %115
  %119 = load i32, ptr %12, align 4, !tbaa !11
  %120 = icmp ult i32 %119, 32768
  br i1 %120, label %122, label %121

121:                                              ; preds = %118, %115, %111
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %124

122:                                              ; preds = %118
  br label %123

123:                                              ; preds = %122, %85
  store i32 0, ptr %10, align 4
  br label %124

124:                                              ; preds = %123, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  %125 = load i32, ptr %10, align 4
  switch i32 %125, label %133 [
    i32 0, label %126
  ]

126:                                              ; preds = %124
  br label %127

127:                                              ; preds = %126, %51
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.anon, ptr %129, i32 0, i32 3
  %131 = load i16, ptr %130, align 2, !tbaa !22
  %132 = zext i16 %131 to i32
  store i32 %132, ptr %8, align 4, !tbaa !11
  store i32 0, ptr %10, align 4
  br label %133

133:                                              ; preds = %128, %124, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  %134 = load i32, ptr %10, align 4
  switch i32 %134, label %181 [
    i32 0, label %135
  ]

135:                                              ; preds = %133
  br label %23, !llvm.loop !23

136:                                              ; preds = %23
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.jit_State, ptr %137, i32 0, i32 38
  %139 = load i16, ptr %6, align 2, !tbaa !9
  %140 = zext i16 %139 to i64
  %141 = getelementptr inbounds [100 x i16], ptr %138, i64 0, i64 %140
  %142 = load i16, ptr %141, align 2, !tbaa !9
  %143 = zext i16 %142 to i32
  store i32 %143, ptr %8, align 4, !tbaa !11
  br label %144

144:                                              ; preds = %179, %136
  %145 = load i32, ptr %8, align 4, !tbaa !11
  %146 = load i32, ptr %7, align 4, !tbaa !11
  %147 = icmp ugt i32 %145, %146
  br i1 %147, label %148, label %180

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.jit_State, ptr %149, i32 0, i32 0
  %151 = getelementptr inbounds %struct.GCtrace, ptr %150, i32 0, i32 7
  %152 = load ptr, ptr %151, align 8, !tbaa !13
  %153 = load i32, ptr %8, align 4, !tbaa !11
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds %union.IRIns, ptr %152, i64 %154
  store ptr %155, ptr %13, align 8, !tbaa !5
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.anon, ptr %156, i32 0, i32 0
  %158 = load i16, ptr %157, align 4, !tbaa !22
  %159 = zext i16 %158 to i32
  %160 = load i32, ptr %7, align 4, !tbaa !11
  %161 = icmp eq i32 %159, %160
  br i1 %161, label %162, label %172

162:                                              ; preds = %148
  %163 = load ptr, ptr %13, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.anon.0, ptr %163, i32 0, i32 1
  %165 = getelementptr inbounds %struct.IRType1, ptr %164, i32 0, i32 0
  %166 = load i8, ptr %165, align 4, !tbaa !22
  %167 = zext i8 %166 to i32
  %168 = and i32 %167, 31
  %169 = icmp eq i32 %168, 0
  %170 = xor i1 %169, true
  %171 = zext i1 %170 to i32
  store i32 %171, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %177

172:                                              ; preds = %148
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.anon, ptr %173, i32 0, i32 3
  %175 = load i16, ptr %174, align 2, !tbaa !22
  %176 = zext i16 %175 to i32
  store i32 %176, ptr %8, align 4, !tbaa !11
  store i32 0, ptr %10, align 4
  br label %177

177:                                              ; preds = %172, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  %178 = load i32, ptr %10, align 4
  switch i32 %178, label %181 [
    i32 0, label %179
  ]

179:                                              ; preds = %177
  br label %144, !llvm.loop !25

180:                                              ; preds = %144
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %181

181:                                              ; preds = %180, %177, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  %182 = load i32, ptr %4, align 4
  ret i32 %182
}

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 }

!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 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"jit_State", !15, i64 0, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !12, i64 136, !12, i64 140, !12, i64 144, !7, i64 148, !7, i64 149, !18, i64 150, !7, i64 151, !19, i64 152, !6, i64 176, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !17, i64 212, !7, i64 216, !6, i64 256, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !6, i64 280, !6, i64 288, !12, i64 296, !12, i64 300, !7, i64 304, !6, i64 312, !12, i64 320, !12, i64 324, !6, i64 328, !7, i64 336, !7, i64 536, !7, i64 1556, !7, i64 1616, !7, i64 1744, !12, i64 2256, !12, i64 2260, !7, i64 2264, !12, i64 2392, !20, i64 2396, !6, i64 2416, !12, i64 2424, !12, i64 2428, !6, i64 2432, !12, i64 2440, !12, i64 2444, !6, i64 2448, !6, i64 2456, !6, i64 2464, !21, i64 2472, !21, i64 2480, !7, i64 2488, !6, i64 2496, !12, i64 2504, !12, i64 2508}
!15 = !{!"GCtrace", !16, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !12, i64 8, !16, i64 12, !6, i64 16, !12, i64 24, !10, i64 28, !10, i64 30, !6, i64 32, !6, i64 40, !16, i64 48, !17, i64 52, !12, i64 56, !12, i64 60, !6, i64 64, !12, i64 72, !10, i64 76, !10, i64 78, !10, i64 80, !10, i64 82, !10, i64 84, !10, i64 86, !10, i64 88, !7, i64 90, !7, i64 91}
!16 = !{!"GCRef", !12, i64 0}
!17 = !{!"MRef", !12, i64 0}
!18 = !{!"IRType1", !7, i64 0}
!19 = !{!"FoldState", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"ScEvEntry", !17, i64 0, !10, i64 4, !10, i64 6, !10, i64 8, !10, i64 10, !18, i64 12, !7, i64 13}
!21 = !{!"long", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


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

%union.IRIns = type { %struct.anon.0 }
%struct.anon.0 = type { i32, %struct.IRType1, i8, i8, i8 }
%struct.IRType1 = type { i8 }

; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable
define hidden i32 @lj_opt_fwd_wasnonnil(ptr nocapture noundef readonly %0, i16 noundef zeroext %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 336
  %5 = zext i16 %1 to i64
  %6 = add nuw nsw i64 %5, 7
  %7 = getelementptr inbounds [100 x i16], ptr %4, i64 0, i64 %6
  %.042.in63 = load i16, ptr %7, align 2, !tbaa !5
  %.04264 = zext i16 %.042.in63 to i32
  %8 = icmp ugt i32 %.04264, %2
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !8
  %invariant.gep = getelementptr inbounds i8, ptr %10, i64 2
  %11 = zext nneg i32 %2 to i64
  %12 = getelementptr inbounds %union.IRIns, ptr %10, i64 %11
  %13 = getelementptr inbounds i8, ptr %12, i64 2
  %14 = icmp eq i16 %1, 66
  %15 = trunc i32 %2 to i16
  br i1 %14, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.thread.us
  %.042.in65.us = phi i16 [ %.042.in.us, %.thread.us ], [ %.042.in63, %.lr.ph ]
  %16 = zext i16 %.042.in65.us to i64
  %17 = getelementptr inbounds %union.IRIns, ptr %10, i64 %16
  %18 = load i16, ptr %17, align 4, !tbaa !5
  %19 = zext i16 %18 to i32
  %20 = icmp eq i32 %19, %2
  br i1 %20, label %.split.us, label %21

21:                                               ; preds = %.lr.ph.split.us
  %22 = getelementptr inbounds i8, ptr %17, i64 4
  %23 = load i8, ptr %22, align 4, !tbaa !5
  %24 = and i8 %23, 31
  %25 = icmp eq i8 %24, 0
  br i1 %25, label %26, label %.thread.us

26:                                               ; preds = %21
  %27 = zext i16 %18 to i64
  %gep.us = getelementptr inbounds %union.IRIns, ptr %invariant.gep, i64 %27
  %28 = load i16, ptr %gep.us, align 2, !tbaa !5
  %29 = load i16, ptr %13, align 2, !tbaa !5
  %30 = icmp ne i16 %28, %29
  %31 = or i16 %29, %28
  %32 = icmp sgt i16 %31, -1
  %or.cond5.us = and i1 %30, %32
  br i1 %or.cond5.us, label %.thread.us, label %.thread53

.thread.us:                                       ; preds = %26, %21
  %33 = getelementptr inbounds i8, ptr %17, i64 6
  %.042.in.us = load i16, ptr %33, align 2, !tbaa !5
  %34 = icmp ugt i16 %.042.in.us, %15
  br i1 %34, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !20

.lr.ph.split:                                     ; preds = %.lr.ph, %.thread
  %.042.in65 = phi i16 [ %.042.in, %.thread ], [ %.042.in63, %.lr.ph ]
  %35 = zext i16 %.042.in65 to i64
  %36 = getelementptr inbounds %union.IRIns, ptr %10, i64 %35
  %37 = load i16, ptr %36, align 4, !tbaa !5
  %38 = zext i16 %37 to i32
  %39 = icmp eq i32 %38, %2
  br i1 %39, label %.split.us, label %42

.split.us:                                        ; preds = %.lr.ph.split, %.lr.ph.split.us
  %40 = phi i64 [ %16, %.lr.ph.split.us ], [ %35, %.lr.ph.split ]
  %41 = getelementptr inbounds %union.IRIns, ptr %10, i64 %40, i32 0, i32 1
  br label %.thread53.sink.split

42:                                               ; preds = %.lr.ph.split
  %43 = getelementptr inbounds i8, ptr %36, i64 4
  %44 = load i8, ptr %43, align 4, !tbaa !5
  %45 = and i8 %44, 31
  %46 = icmp eq i8 %45, 0
  br i1 %46, label %47, label %.thread

47:                                               ; preds = %42
  %48 = zext i16 %37 to i64
  %gep = getelementptr inbounds %union.IRIns, ptr %invariant.gep, i64 %48
  %49 = load i16, ptr %gep, align 2, !tbaa !5
  %50 = load i16, ptr %13, align 2, !tbaa !5
  %51 = zext i16 %49 to i64
  %52 = getelementptr inbounds %union.IRIns, ptr %10, i64 %51, i32 0, i32 1
  %53 = load i8, ptr %52, align 4, !tbaa !5
  %54 = zext i16 %50 to i64
  %55 = getelementptr inbounds %union.IRIns, ptr %10, i64 %54, i32 0, i32 1
  %56 = load i8, ptr %55, align 4, !tbaa !5
  %57 = xor i8 %56, %53
  %58 = and i8 %57, 31
  %59 = icmp eq i8 %58, 0
  br i1 %59, label %60, label %.thread

60:                                               ; preds = %47
  %61 = icmp ne i16 %49, %50
  %62 = or i16 %50, %49
  %63 = icmp sgt i16 %62, -1
  %or.cond5 = and i1 %61, %63
  br i1 %or.cond5, label %.thread, label %.thread53

.thread:                                          ; preds = %60, %47, %42
  %64 = getelementptr inbounds i8, ptr %36, i64 6
  %.042.in = load i16, ptr %64, align 2, !tbaa !5
  %65 = icmp ugt i16 %.042.in, %15
  br i1 %65, label %.lr.ph.split, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %.thread, %.thread.us, %3
  %66 = getelementptr inbounds [100 x i16], ptr %4, i64 0, i64 %5
  %.244.in66 = load i16, ptr %66, align 2, !tbaa !5
  %.24467 = zext i16 %.244.in66 to i32
  %67 = icmp ugt i32 %.24467, %2
  br i1 %67, label %.lr.ph70, label %.thread53

.lr.ph70:                                         ; preds = %._crit_edge
  %68 = getelementptr inbounds i8, ptr %0, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !8
  %70 = trunc i32 %2 to i16
  br label %71

71:                                               ; preds = %.lr.ph70, %77
  %.244.in68 = phi i16 [ %.244.in66, %.lr.ph70 ], [ %.244.in, %77 ]
  %72 = zext i16 %.244.in68 to i64
  %73 = getelementptr inbounds %union.IRIns, ptr %69, i64 %72
  %74 = load i16, ptr %73, align 4, !tbaa !5
  %75 = zext i16 %74 to i32
  %.not = icmp eq i32 %75, %2
  br i1 %.not, label %.thread57, label %77

.thread57:                                        ; preds = %71
  %76 = getelementptr inbounds i8, ptr %73, i64 4
  br label %.thread53.sink.split

77:                                               ; preds = %71
  %78 = getelementptr inbounds i8, ptr %73, i64 6
  %.244.in = load i16, ptr %78, align 2, !tbaa !5
  %79 = icmp ugt i16 %.244.in, %70
  br i1 %79, label %71, label %.thread53

.thread53.sink.split:                             ; preds = %.thread57, %.split.us
  %.sink = phi ptr [ %41, %.split.us ], [ %76, %.thread57 ]
  %80 = load i8, ptr %.sink, align 4, !tbaa !5
  %81 = and i8 %80, 31
  %82 = icmp ne i8 %81, 0
  %83 = zext i1 %82 to i32
  br label %.thread53

.thread53:                                        ; preds = %60, %26, %77, %.thread53.sink.split, %._crit_edge
  %.6.shrunk = phi i32 [ 0, %._crit_edge ], [ %83, %.thread53.sink.split ], [ 0, %77 ], [ 0, %26 ], [ 0, %60 ]
  ret i32 %.6.shrunk
}

attributes #0 = { nofree norecurse nosync nounwind memory(read, 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" }

!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/C++ TBAA"}
!8 = !{!9, !13, i64 16}
!9 = !{!"jit_State", !10, i64 0, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !12, i64 136, !12, i64 140, !12, i64 144, !6, i64 148, !6, i64 149, !16, i64 150, !6, i64 151, !17, i64 152, !13, i64 176, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !15, i64 212, !6, i64 216, !13, i64 256, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !13, i64 280, !13, i64 288, !12, i64 296, !12, i64 300, !6, i64 304, !13, i64 312, !12, i64 320, !12, i64 324, !13, i64 328, !6, i64 336, !6, i64 536, !6, i64 1556, !6, i64 1616, !6, i64 1744, !12, i64 2256, !12, i64 2260, !6, i64 2264, !12, i64 2392, !18, i64 2396, !13, i64 2416, !12, i64 2424, !12, i64 2428, !13, i64 2432, !12, i64 2440, !12, i64 2444, !13, i64 2448, !13, i64 2456, !13, i64 2464, !19, i64 2472, !19, i64 2480, !6, i64 2488, !13, i64 2496, !12, i64 2504, !12, i64 2508}
!10 = !{!"GCtrace", !11, i64 0, !6, i64 4, !6, i64 5, !6, i64 6, !6, i64 7, !12, i64 8, !11, i64 12, !13, i64 16, !12, i64 24, !14, i64 28, !14, i64 30, !13, i64 32, !13, i64 40, !11, i64 48, !15, i64 52, !12, i64 56, !12, i64 60, !13, i64 64, !12, i64 72, !14, i64 76, !14, i64 78, !14, i64 80, !14, i64 82, !14, i64 84, !14, i64 86, !14, i64 88, !6, i64 90, !6, i64 91}
!11 = !{!"GCRef", !12, i64 0}
!12 = !{!"int", !6, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!"short", !6, i64 0}
!15 = !{!"MRef", !12, i64 0}
!16 = !{!"IRType1", !6, i64 0}
!17 = !{!"FoldState", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"ScEvEntry", !15, i64 0, !14, i64 4, !14, i64 6, !14, i64 8, !14, i64 10, !16, i64 12, !6, i64 13}
!19 = !{!"long", !6, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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