; 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

declare hidden i32 @lj_ir_emit(ptr noundef) #1

; 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
declare hidden i32 @aa_fref(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define hidden i32 @lj_opt_dse_fstore(ptr noundef %0) #2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.jit_State, ptr %12, i32 0, i32 13
  %14 = getelementptr inbounds %struct.FoldState, ptr %13, i32 0, i32 0
  %15 = getelementptr inbounds %struct.anon, ptr %14, i32 0, i32 0
  %16 = load i16, ptr %15, align 8, !tbaa !9
  %17 = zext i16 %16 to i32
  store i32 %17, ptr %4, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.jit_State, ptr %18, i32 0, i32 13
  %20 = getelementptr inbounds %struct.FoldState, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %struct.anon, ptr %20, i32 0, i32 1
  %22 = load i16, ptr %21, align 2, !tbaa !9
  %23 = zext i16 %22 to i32
  store i32 %23, ptr %5, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.jit_State, ptr %24, i32 0, i32 0
  %26 = getelementptr inbounds %struct.GCtrace, ptr %25, i32 0, i32 7
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = load i32, ptr %4, align 4, !tbaa !10
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds %union.IRIns, ptr %27, i64 %29
  store ptr %30, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.jit_State, ptr %31, i32 0, i32 38
  %33 = getelementptr inbounds [100 x i16], ptr %32, i64 0, i64 76
  store ptr %33, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load i16, ptr %34, align 2, !tbaa !22
  %36 = zext i16 %35 to i32
  store i32 %36, ptr %8, align 4, !tbaa !10
  br label %37

37:                                               ; preds = %158, %1
  %38 = load i32, ptr %8, align 4, !tbaa !10
  %39 = load i32, ptr %4, align 4, !tbaa !10
  %40 = icmp ugt i32 %38, %39
  br i1 %40, label %41, label %159

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.jit_State, ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds %struct.GCtrace, ptr %43, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !12
  %46 = load i32, ptr %8, align 4, !tbaa !10
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds %union.IRIns, ptr %45, i64 %47
  store ptr %48, ptr %9, align 8, !tbaa !5
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.jit_State, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %struct.GCtrace, ptr %52, i32 0, i32 7
  %54 = load ptr, ptr %53, align 8, !tbaa !12
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.anon, ptr %55, i32 0, i32 0
  %57 = load i16, ptr %56, align 4, !tbaa !9
  %58 = zext i16 %57 to i64
  %59 = getelementptr inbounds %union.IRIns, ptr %54, i64 %58
  %60 = call i32 @aa_fref(ptr noundef %49, ptr noundef %50, ptr noundef %59)
  switch i32 %60, label %151 [
    i32 0, label %151
    i32 1, label %61
    i32 2, label %70
  ]

61:                                               ; preds = %41
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.anon, ptr %62, i32 0, i32 1
  %64 = load i16, ptr %63, align 2, !tbaa !9
  %65 = zext i16 %64 to i32
  %66 = load i32, ptr %5, align 4, !tbaa !10
  %67 = icmp ne i32 %65, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %61
  store i32 5, ptr %10, align 4
  br label %156

69:                                               ; preds = %61
  br label %151

70:                                               ; preds = %41
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.anon, ptr %71, i32 0, i32 1
  %73 = load i16, ptr %72, align 2, !tbaa !9
  %74 = zext i16 %73 to i32
  %75 = load i32, ptr %5, align 4, !tbaa !10
  %76 = icmp eq i32 %74, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %70
  store i32 4, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %156

78:                                               ; preds = %70
  %79 = load i32, ptr %8, align 4, !tbaa !10
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.jit_State, ptr %80, i32 0, i32 38
  %82 = getelementptr inbounds [100 x i16], ptr %81, i64 0, i64 17
  %83 = load i16, ptr %82, align 2, !tbaa !22
  %84 = zext i16 %83 to i32
  %85 = icmp ugt i32 %79, %84
  br i1 %85, label %86, label %150

86:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.jit_State, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.GCtrace, ptr %88, i32 0, i32 7
  %90 = load ptr, ptr %89, align 8, !tbaa !12
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.jit_State, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.GCtrace, ptr %92, i32 0, i32 5
  %94 = load i32, ptr %93, align 8, !tbaa !23
  %95 = sub i32 %94, 1
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds %union.IRIns, ptr %90, i64 %96
  store ptr %97, ptr %11, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %128, %86
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = icmp ugt ptr %99, %100
  br i1 %101, label %102, label %131

102:                                              ; preds = %98
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %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 !9
  %107 = zext i8 %106 to i32
  %108 = and i32 %107, 128
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %126, label %110

110:                                              ; preds = %102
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.anon.0, ptr %111, i32 0, i32 2
  %113 = load i8, ptr %112, align 1, !tbaa !9
  %114 = zext i8 %113 to i32
  %115 = icmp eq i32 %114, 69
  br i1 %115, label %116, label %127

116:                                              ; preds = %110
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.anon, ptr %117, i32 0, i32 1
  %119 = load i16, ptr %118, align 2, !tbaa !9
  %120 = zext i16 %119 to i32
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.anon, ptr %121, i32 0, i32 1
  %123 = load i16, ptr %122, align 2, !tbaa !9
  %124 = zext i16 %123 to i32
  %125 = icmp eq i32 %120, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %116, %102
  store i32 5, ptr %10, align 4
  br label %147

127:                                              ; preds = %116, %110
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %union.IRIns, ptr %129, i32 -1
  store ptr %130, ptr %11, align 8, !tbaa !5
  br label %98, !llvm.loop !24

131:                                              ; preds = %98
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.anon, ptr %132, i32 0, i32 3
  %134 = load i16, ptr %133, align 2, !tbaa !9
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  store i16 %134, ptr %135, align 2, !tbaa !22
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.anon.0, ptr %136, i32 0, i32 2
  store i8 12, ptr %137, align 1, !tbaa !9
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.anon.0, ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %struct.IRType1, ptr %139, i32 0, i32 0
  store i8 0, ptr %140, align 4, !tbaa !9
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.anon, ptr %141, i32 0, i32 1
  store i16 0, ptr %142, align 2, !tbaa !9
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.anon, ptr %143, i32 0, i32 0
  store i16 0, ptr %144, align 4, !tbaa !9
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.anon, ptr %145, i32 0, i32 3
  store i16 0, ptr %146, align 2, !tbaa !9
  store i32 0, ptr %10, align 4
  br label %147

147:                                              ; preds = %131, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %148 = load i32, ptr %10, align 4
  switch i32 %148, label %156 [
    i32 0, label %149
  ]

149:                                              ; preds = %147
  br label %150

150:                                              ; preds = %149, %78
  store i32 5, ptr %10, align 4
  br label %156

151:                                              ; preds = %69, %41, %41
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.anon, ptr %152, i32 0, i32 3
  store ptr %153, ptr %7, align 8, !tbaa !5
  %154 = load i16, ptr %153, align 2, !tbaa !22
  %155 = zext i16 %154 to i32
  store i32 %155, ptr %8, align 4, !tbaa !10
  store i32 0, ptr %10, align 4
  br label %156

156:                                              ; preds = %151, %150, %147, %77, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %157 = load i32, ptr %10, align 4
  switch i32 %157, label %163 [
    i32 0, label %158
    i32 5, label %160
  ]

158:                                              ; preds = %156
  br label %37, !llvm.loop !26

159:                                              ; preds = %37
  br label %160

160:                                              ; preds = %159, %156
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = call i32 @lj_ir_emit(ptr noundef %161)
  store i32 %162, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %163

163:                                              ; preds = %160, %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %164 = load i32, ptr %2, align 4
  ret i32 %164
}

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


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

declare hidden i32 @lj_ir_emit(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @aa_fref(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define hidden i32 @lj_opt_dse_fstore(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 152
  %3 = load i16, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 154
  %5 = load i16, ptr %4, align 2, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !8
  %8 = zext i16 %3 to i64
  %9 = getelementptr inbounds %union.IRIns, ptr %7, i64 %8
  %10 = getelementptr inbounds i8, ptr %0, i64 488
  %.043.in63 = load i16, ptr %10, align 2, !tbaa !20
  %11 = icmp ugt i16 %.043.in63, %3
  br i1 %11, label %.lr.ph, label %.thread52

.lr.ph:                                           ; preds = %1, %56
  %.043.in65 = phi i16 [ %.043.in, %56 ], [ %.043.in63, %1 ]
  %.04564 = phi ptr [ %57, %56 ], [ %10, %1 ]
  %12 = load ptr, ptr %6, align 8, !tbaa !8
  %13 = zext i16 %.043.in65 to i64
  %14 = getelementptr inbounds %union.IRIns, ptr %12, i64 %13
  %15 = load i16, ptr %14, align 4, !tbaa !5
  %16 = zext i16 %15 to i64
  %17 = getelementptr inbounds %union.IRIns, ptr %12, i64 %16
  %18 = tail call i32 @aa_fref(ptr noundef nonnull %0, ptr noundef %9, ptr noundef %17)
  switch i32 %18, label %56 [
    i32 2, label %22
    i32 1, label %19
  ]

19:                                               ; preds = %.lr.ph
  %20 = getelementptr inbounds i8, ptr %14, i64 2
  %21 = load i16, ptr %20, align 2, !tbaa !5
  %.not = icmp eq i16 %21, %5
  br i1 %.not, label %56, label %.thread52

22:                                               ; preds = %.lr.ph
  %23 = getelementptr inbounds i8, ptr %14, i64 2
  %24 = load i16, ptr %23, align 2, !tbaa !5
  %25 = icmp eq i16 %24, %5
  br i1 %25, label %.thread56, label %26

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %0, i64 370
  %28 = load i16, ptr %27, align 2, !tbaa !20
  %29 = icmp ugt i16 %.043.in65, %28
  br i1 %29, label %30, label %.thread52

30:                                               ; preds = %26
  %31 = load ptr, ptr %6, align 8, !tbaa !8
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !21
  %34 = add i32 %33, -1
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds %union.IRIns, ptr %31, i64 %35
  %.not4967 = icmp ugt ptr %36, %14
  br i1 %.not4967, label %.lr.ph69, label %._crit_edge

.lr.ph69:                                         ; preds = %30
  %37 = getelementptr inbounds i8, ptr %9, i64 2
  br label %38

38:                                               ; preds = %.lr.ph69, %50
  %.068 = phi ptr [ %36, %.lr.ph69 ], [ %51, %50 ]
  %39 = getelementptr inbounds i8, ptr %.068, i64 4
  %40 = load i8, ptr %39, align 4, !tbaa !5
  %.not48 = icmp sgt i8 %40, -1
  br i1 %.not48, label %41, label %.thread52

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %.068, i64 5
  %43 = load i8, ptr %42, align 1, !tbaa !5
  %44 = icmp eq i8 %43, 69
  br i1 %44, label %45, label %50

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %.068, i64 2
  %47 = load i16, ptr %46, align 2, !tbaa !5
  %48 = load i16, ptr %37, align 2, !tbaa !5
  %49 = icmp eq i16 %47, %48
  br i1 %49, label %.thread52, label %50

50:                                               ; preds = %41, %45
  %51 = getelementptr inbounds i8, ptr %.068, i64 -8
  %.not49 = icmp ugt ptr %51, %14
  br i1 %.not49, label %38, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %50, %30
  %52 = getelementptr inbounds i8, ptr %14, i64 6
  %53 = load i16, ptr %52, align 2, !tbaa !5
  store i16 %53, ptr %.04564, align 2, !tbaa !20
  %54 = getelementptr inbounds i8, ptr %14, i64 5
  store i8 12, ptr %54, align 1, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %14, i64 4
  store i8 0, ptr %55, align 4, !tbaa !5
  store i16 0, ptr %23, align 2, !tbaa !5
  store i16 0, ptr %14, align 4, !tbaa !5
  store i16 0, ptr %52, align 2, !tbaa !5
  br label %.thread52

56:                                               ; preds = %.lr.ph, %19
  %57 = getelementptr inbounds i8, ptr %14, i64 6
  %.043.in = load i16, ptr %57, align 2, !tbaa !20
  %58 = icmp ugt i16 %.043.in, %3
  br i1 %58, label %.lr.ph, label %.thread52

.thread52:                                        ; preds = %56, %19, %45, %38, %1, %26, %._crit_edge
  %59 = tail call i32 @lj_ir_emit(ptr noundef %0) #2
  br label %.thread56

.thread56:                                        ; preds = %22, %.thread52
  %.2 = phi i32 [ %59, %.thread52 ], [ 4, %22 ]
  ret i32 %.2
}

attributes #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 = { 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 = !{!"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 = !{!14, !14, i64 0}
!21 = !{!9, !12, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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