; LLVM IR from microbotsio/CodeCell :: src (sh2)

; 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.sh2_Op_s = type { i32, ptr, ptr }
%struct.sh2_s = type { ptr, ptr, i8, i8, i8, i8, [17 x i8], [64 x %struct.anon], ptr, i32, %union.sh2_OpData_t, i8, i8, i8, ptr, ptr, ptr, ptr, [72 x i32], i16, i32, i32, i32 }
%struct.anon = type { i8, i8 }
%union.sh2_OpData_t = type { %struct.anon.4 }
%struct.anon.4 = type { i16, ptr, ptr, i16 }
%struct.anon.14 = type { i8, i16 }

@getFrsOp = external dso_local constant %struct.sh2_Op_s, align 8
@_sh2 = external dso_local global %struct.sh2_s, align 8
@sensorToRecordMap = external hidden constant [32 x %struct.anon.14], 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 @opProcess(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @sh2_getMetadata(i8 noundef zeroext %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i16, align 2
  %10 = alloca i32, align 4
  store i8 %0, ptr %4, align 1, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store ptr @_sh2, ptr %6, align 8, !tbaa !8
  %11 = load ptr, ptr %5, align 8, !tbaa !8
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %2
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %76

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

15:                                               ; preds = %31, %14
  %16 = load i32, ptr %8, align 4, !tbaa !10
  %17 = sext i32 %16 to i64
  %18 = icmp ult i64 %17, 32
  br i1 %18, label %19, label %34

19:                                               ; preds = %15
  %20 = load i32, ptr %8, align 4, !tbaa !10
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [32 x %struct.anon.14], ptr @sensorToRecordMap, i64 0, i64 %21
  %23 = getelementptr inbounds %struct.anon.14, ptr %22, i32 0, i32 0
  %24 = load i8, ptr %23, align 4, !tbaa !12
  %25 = zext i8 %24 to i32
  %26 = load i8, ptr %4, align 1, !tbaa !5
  %27 = zext i8 %26 to i32
  %28 = icmp eq i32 %25, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %19
  br label %34

30:                                               ; preds = %19
  br label %31

31:                                               ; preds = %30
  %32 = load i32, ptr %8, align 4, !tbaa !10
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %8, align 4, !tbaa !10
  br label %15, !llvm.loop !15

34:                                               ; preds = %29, %15
  %35 = load i32, ptr %8, align 4, !tbaa !10
  %36 = sext i32 %35 to i64
  %37 = icmp uge i64 %36, 32
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %75

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #3
  %40 = load i32, ptr %8, align 4, !tbaa !10
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [32 x %struct.anon.14], ptr @sensorToRecordMap, i64 0, i64 %41
  %43 = getelementptr inbounds %struct.anon.14, ptr %42, i32 0, i32 1
  %44 = load i16, ptr %43, align 2, !tbaa !17
  store i16 %44, ptr %9, align 2, !tbaa !18
  %45 = load ptr, ptr %6, align 8, !tbaa !8
  %46 = getelementptr inbounds %struct.sh2_s, ptr %45, i32 0, i32 10
  call void @llvm.memset.p0.i64(ptr align 8 %46, i8 0, i64 32, i1 false)
  %47 = load i16, ptr %9, align 2, !tbaa !18
  %48 = load ptr, ptr %6, align 8, !tbaa !8
  %49 = getelementptr inbounds %struct.sh2_s, ptr %48, i32 0, i32 10
  %50 = getelementptr inbounds %struct.anon.4, ptr %49, i32 0, i32 0
  store i16 %47, ptr %50, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !8
  %52 = getelementptr inbounds %struct.sh2_s, ptr %51, i32 0, i32 18
  %53 = getelementptr inbounds [72 x i32], ptr %52, i64 0, i64 0
  %54 = load ptr, ptr %6, align 8, !tbaa !8
  %55 = getelementptr inbounds %struct.sh2_s, ptr %54, i32 0, i32 10
  %56 = getelementptr inbounds %struct.anon.4, ptr %55, i32 0, i32 1
  store ptr %53, ptr %56, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8, !tbaa !8
  %58 = getelementptr inbounds %struct.sh2_s, ptr %57, i32 0, i32 19
  store i16 72, ptr %58, align 8, !tbaa !19
  %59 = load ptr, ptr %6, align 8, !tbaa !8
  %60 = getelementptr inbounds %struct.sh2_s, ptr %59, i32 0, i32 19
  %61 = load ptr, ptr %6, align 8, !tbaa !8
  %62 = getelementptr inbounds %struct.sh2_s, ptr %61, i32 0, i32 10
  %63 = getelementptr inbounds %struct.anon.4, ptr %62, i32 0, i32 2
  store ptr %60, ptr %63, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %64 = load ptr, ptr %6, align 8, !tbaa !8
  %65 = call i32 @opProcess(ptr noundef %64, ptr noundef @getFrsOp)
  store i32 %65, ptr %10, align 4, !tbaa !10
  %66 = load i32, ptr %10, align 4, !tbaa !10
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %73

68:                                               ; preds = %39
  %69 = load ptr, ptr %5, align 8, !tbaa !8
  %70 = load ptr, ptr %6, align 8, !tbaa !8
  %71 = getelementptr inbounds %struct.sh2_s, ptr %70, i32 0, i32 18
  %72 = getelementptr inbounds [72 x i32], ptr %71, i64 0, i64 0
  call void @stuffMetadata(ptr noundef %69, ptr noundef %72)
  br label %73

73:                                               ; preds = %68, %39
  %74 = load i32, ptr %10, align 4, !tbaa !10
  store i32 %74, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #3
  br label %75

75:                                               ; preds = %73, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %76

76:                                               ; preds = %75, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %77 = load i32, ptr %3, align 4
  ret i32 %77
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"", !6, i64 0, !14, i64 2}
!14 = !{!"short", !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!13, !14, i64 2}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !14, i64 544}
!20 = !{!"sh2_s", !9, i64 0, !9, i64 8, !21, i64 16, !21, i64 17, !6, i64 18, !6, i64 19, !6, i64 20, !6, i64 37, !9, i64 168, !11, i64 176, !6, i64 184, !6, i64 216, !6, i64 217, !6, i64 218, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !6, i64 256, !14, i64 544, !11, i64 548, !11, i64 552, !11, i64 556}
!21 = !{!"_Bool", !6, i64 0}


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

%struct.sh2_Op_s = type { i32, ptr, ptr }
%struct.sh2_s = type { ptr, ptr, i8, i8, i8, i8, [17 x i8], [64 x %struct.anon], ptr, i32, %union.sh2_OpData_t, i8, i8, i8, ptr, ptr, ptr, ptr, [72 x i32], i16, i32, i32, i32 }
%struct.anon = type { i8, i8 }
%union.sh2_OpData_t = type { %struct.anon.4 }
%struct.anon.4 = type { i16, ptr, ptr, i16 }
%struct.anon.14 = type { i8, i16 }

@getFrsOp = external dso_local constant %struct.sh2_Op_s, align 8
@_sh2 = external dso_local global %struct.sh2_s, align 8
@sensorToRecordMap = external hidden local_unnamed_addr constant [32 x %struct.anon.14], align 16

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sh2_getMetadata(i8 noundef zeroext %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = icmp eq ptr %1, null
  br i1 %3, label %.thread, label %.preheader.preheader

.preheader.preheader:                             ; preds = %2
  %4 = load i8, ptr @sensorToRecordMap, align 16, !tbaa !5
  %5 = icmp eq i8 %4, %0
  br i1 %5, label %68, label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.preheader
  %6 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 4), align 4, !tbaa !5
  %7 = icmp eq i8 %6, %0
  br i1 %7, label %68, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1
  %8 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 8), align 8, !tbaa !5
  %9 = icmp eq i8 %8, %0
  br i1 %9, label %68, label %.preheader.3

.preheader.3:                                     ; preds = %.preheader.2
  %10 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 12), align 4, !tbaa !5
  %11 = icmp eq i8 %10, %0
  br i1 %11, label %68, label %.preheader.4

.preheader.4:                                     ; preds = %.preheader.3
  %12 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 16), align 16, !tbaa !5
  %13 = icmp eq i8 %12, %0
  br i1 %13, label %68, label %.preheader.5

.preheader.5:                                     ; preds = %.preheader.4
  %14 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 20), align 4, !tbaa !5
  %15 = icmp eq i8 %14, %0
  br i1 %15, label %68, label %.preheader.6

.preheader.6:                                     ; preds = %.preheader.5
  %16 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 24), align 8, !tbaa !5
  %17 = icmp eq i8 %16, %0
  br i1 %17, label %68, label %.preheader.7

.preheader.7:                                     ; preds = %.preheader.6
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 28), align 4, !tbaa !5
  %19 = icmp eq i8 %18, %0
  br i1 %19, label %68, label %.preheader.8

.preheader.8:                                     ; preds = %.preheader.7
  %20 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 32), align 16, !tbaa !5
  %21 = icmp eq i8 %20, %0
  br i1 %21, label %68, label %.preheader.9

.preheader.9:                                     ; preds = %.preheader.8
  %22 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 36), align 4, !tbaa !5
  %23 = icmp eq i8 %22, %0
  br i1 %23, label %68, label %.preheader.10

.preheader.10:                                    ; preds = %.preheader.9
  %24 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 40), align 8, !tbaa !5
  %25 = icmp eq i8 %24, %0
  br i1 %25, label %68, label %.preheader.11

.preheader.11:                                    ; preds = %.preheader.10
  %26 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 44), align 4, !tbaa !5
  %27 = icmp eq i8 %26, %0
  br i1 %27, label %68, label %.preheader.12

.preheader.12:                                    ; preds = %.preheader.11
  %28 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 48), align 16, !tbaa !5
  %29 = icmp eq i8 %28, %0
  br i1 %29, label %68, label %.preheader.13

.preheader.13:                                    ; preds = %.preheader.12
  %30 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 52), align 4, !tbaa !5
  %31 = icmp eq i8 %30, %0
  br i1 %31, label %68, label %.preheader.14

.preheader.14:                                    ; preds = %.preheader.13
  %32 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 56), align 8, !tbaa !5
  %33 = icmp eq i8 %32, %0
  br i1 %33, label %68, label %.preheader.15

.preheader.15:                                    ; preds = %.preheader.14
  %34 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 60), align 4, !tbaa !5
  %35 = icmp eq i8 %34, %0
  br i1 %35, label %68, label %.preheader.16

.preheader.16:                                    ; preds = %.preheader.15
  %36 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 64), align 16, !tbaa !5
  %37 = icmp eq i8 %36, %0
  br i1 %37, label %68, label %.preheader.17

.preheader.17:                                    ; preds = %.preheader.16
  %38 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 68), align 4, !tbaa !5
  %39 = icmp eq i8 %38, %0
  br i1 %39, label %68, label %.preheader.18

.preheader.18:                                    ; preds = %.preheader.17
  %40 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 72), align 8, !tbaa !5
  %41 = icmp eq i8 %40, %0
  br i1 %41, label %68, label %.preheader.19

.preheader.19:                                    ; preds = %.preheader.18
  %42 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 76), align 4, !tbaa !5
  %43 = icmp eq i8 %42, %0
  br i1 %43, label %68, label %.preheader.20

.preheader.20:                                    ; preds = %.preheader.19
  %44 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 80), align 16, !tbaa !5
  %45 = icmp eq i8 %44, %0
  br i1 %45, label %68, label %.preheader.21

.preheader.21:                                    ; preds = %.preheader.20
  %46 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 84), align 4, !tbaa !5
  %47 = icmp eq i8 %46, %0
  br i1 %47, label %68, label %.preheader.22

.preheader.22:                                    ; preds = %.preheader.21
  %48 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 88), align 8, !tbaa !5
  %49 = icmp eq i8 %48, %0
  br i1 %49, label %68, label %.preheader.23

.preheader.23:                                    ; preds = %.preheader.22
  %50 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 92), align 4, !tbaa !5
  %51 = icmp eq i8 %50, %0
  br i1 %51, label %68, label %.preheader.24

.preheader.24:                                    ; preds = %.preheader.23
  %52 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 96), align 16, !tbaa !5
  %53 = icmp eq i8 %52, %0
  br i1 %53, label %68, label %.preheader.25

.preheader.25:                                    ; preds = %.preheader.24
  %54 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 100), align 4, !tbaa !5
  %55 = icmp eq i8 %54, %0
  br i1 %55, label %68, label %.preheader.26

.preheader.26:                                    ; preds = %.preheader.25
  %56 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 104), align 8, !tbaa !5
  %57 = icmp eq i8 %56, %0
  br i1 %57, label %68, label %.preheader.27

.preheader.27:                                    ; preds = %.preheader.26
  %58 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 108), align 4, !tbaa !5
  %59 = icmp eq i8 %58, %0
  br i1 %59, label %68, label %.preheader.28

.preheader.28:                                    ; preds = %.preheader.27
  %60 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 112), align 16, !tbaa !5
  %61 = icmp eq i8 %60, %0
  br i1 %61, label %68, label %.preheader.29

.preheader.29:                                    ; preds = %.preheader.28
  %62 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 116), align 4, !tbaa !5
  %63 = icmp eq i8 %62, %0
  br i1 %63, label %68, label %.preheader.30

.preheader.30:                                    ; preds = %.preheader.29
  %64 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 120), align 8, !tbaa !5
  %65 = icmp eq i8 %64, %0
  br i1 %65, label %68, label %.preheader.31

.preheader.31:                                    ; preds = %.preheader.30
  %66 = load i8, ptr getelementptr inbounds (i8, ptr @sensorToRecordMap, i64 124), align 4, !tbaa !5
  %67 = icmp eq i8 %66, %0
  br i1 %67, label %68, label %.thread

68:                                               ; preds = %.preheader.31, %.preheader.30, %.preheader.29, %.preheader.28, %.preheader.27, %.preheader.26, %.preheader.25, %.preheader.24, %.preheader.23, %.preheader.22, %.preheader.21, %.preheader.20, %.preheader.19, %.preheader.18, %.preheader.17, %.preheader.16, %.preheader.15, %.preheader.14, %.preheader.13, %.preheader.12, %.preheader.11, %.preheader.10, %.preheader.9, %.preheader.8, %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %.lcssa = phi i64 [ 0, %.preheader.preheader ], [ 1, %.preheader.1 ], [ 2, %.preheader.2 ], [ 3, %.preheader.3 ], [ 4, %.preheader.4 ], [ 5, %.preheader.5 ], [ 6, %.preheader.6 ], [ 7, %.preheader.7 ], [ 8, %.preheader.8 ], [ 9, %.preheader.9 ], [ 10, %.preheader.10 ], [ 11, %.preheader.11 ], [ 12, %.preheader.12 ], [ 13, %.preheader.13 ], [ 14, %.preheader.14 ], [ 15, %.preheader.15 ], [ 16, %.preheader.16 ], [ 17, %.preheader.17 ], [ 18, %.preheader.18 ], [ 19, %.preheader.19 ], [ 20, %.preheader.20 ], [ 21, %.preheader.21 ], [ 22, %.preheader.22 ], [ 23, %.preheader.23 ], [ 24, %.preheader.24 ], [ 25, %.preheader.25 ], [ 26, %.preheader.26 ], [ 27, %.preheader.27 ], [ 28, %.preheader.28 ], [ 29, %.preheader.29 ], [ 30, %.preheader.30 ], [ 31, %.preheader.31 ]
  %69 = getelementptr inbounds [32 x %struct.anon.14], ptr @sensorToRecordMap, i64 0, i64 %.lcssa, i32 1
  %70 = load i16, ptr %69, align 2, !tbaa !10
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_sh2, i64 184), i8 0, i64 32, i1 false)
  store i16 %70, ptr getelementptr inbounds (i8, ptr @_sh2, i64 184), align 8, !tbaa !11
  store ptr getelementptr inbounds (i8, ptr @_sh2, i64 256), ptr getelementptr inbounds (i8, ptr @_sh2, i64 192), align 8, !tbaa !11
  store i16 72, ptr getelementptr inbounds (i8, ptr @_sh2, i64 544), align 8, !tbaa !12
  store ptr getelementptr inbounds (i8, ptr @_sh2, i64 544), ptr getelementptr inbounds (i8, ptr @_sh2, i64 200), align 8, !tbaa !11
  %71 = tail call i32 @opProcess(ptr noundef nonnull @_sh2, ptr noundef nonnull @getFrsOp)
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %.thread

73:                                               ; preds = %68
  tail call void @stuffMetadata(ptr noundef nonnull %1, ptr noundef nonnull getelementptr inbounds (i8, ptr @_sh2, i64 256))
  br label %.thread

.thread:                                          ; preds = %.preheader.31, %73, %68, %2
  %.1 = phi i32 [ -2, %2 ], [ 0, %73 ], [ %71, %68 ], [ -2, %.preheader.31 ]
  ret i32 %.1
}

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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" }

!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, !7, i64 0}
!6 = !{!"", !7, i64 0, !9, i64 2}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!6, !9, i64 2}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !9, i64 544}
!13 = !{!"sh2_s", !14, i64 0, !14, i64 8, !15, i64 16, !15, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 37, !14, i64 168, !16, i64 176, !7, i64 184, !7, i64 216, !7, i64 217, !7, i64 218, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !7, i64 256, !9, i64 544, !16, i64 548, !16, i64 552, !16, i64 556}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"int", !7, i64 0}


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