; LLVM IR from OpenDiS/OpenDiS :: core/pydis/c/util (Util_subset)

; 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._home = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, ptr, ptr, ptr, double, double, double, double, double, double, i32, i32, i32, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, ptr, i32, i32, i32, [3 x [3 x double]], [3 x [3 x double]], %struct.BurgInfo_t, i32, i32, i32, i32, i32, i32, i32, %struct.timeval }
%struct.BurgInfo_t = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.timeval = type { i64, i64 }
%struct._operate = type { i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double }

; 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 @AddOp(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, double noundef %8, double noundef %9, double noundef %10, double noundef %11, double noundef %12, double noundef %13, double noundef %14, double noundef %15, double noundef %16) #1 {
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca ptr, align 8
  store ptr %0, ptr %18, align 8, !tbaa !5
  store i32 %1, ptr %19, align 4, !tbaa !9
  store i32 %2, ptr %20, align 4, !tbaa !9
  store i32 %3, ptr %21, align 4, !tbaa !9
  store i32 %4, ptr %22, align 4, !tbaa !9
  store i32 %5, ptr %23, align 4, !tbaa !9
  store i32 %6, ptr %24, align 4, !tbaa !9
  store i32 %7, ptr %25, align 4, !tbaa !9
  store double %8, ptr %26, align 8, !tbaa !11
  store double %9, ptr %27, align 8, !tbaa !11
  store double %10, ptr %28, align 8, !tbaa !11
  store double %11, ptr %29, align 8, !tbaa !11
  store double %12, ptr %30, align 8, !tbaa !11
  store double %13, ptr %31, align 8, !tbaa !11
  store double %14, ptr %32, align 8, !tbaa !11
  store double %15, ptr %33, align 8, !tbaa !11
  store double %16, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #2
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._home, ptr %36, i32 0, i32 47
  %38 = load i32, ptr %37, align 8, !tbaa !13
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._home, ptr %39, i32 0, i32 48
  %41 = load i32, ptr %40, align 4, !tbaa !18
  %42 = icmp sge i32 %38, %41
  br i1 %42, label %43, label %45

43:                                               ; preds = %17
  %44 = load ptr, ptr %18, align 8, !tbaa !5
  call void @ExtendOpList(ptr noundef %44)
  br label %45

45:                                               ; preds = %43, %17
  %46 = load ptr, ptr %18, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._home, ptr %46, i32 0, i32 46
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._home, ptr %49, i32 0, i32 47
  %51 = load i32, ptr %50, align 8, !tbaa !13
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %struct._operate, ptr %48, i64 %52
  store ptr %53, ptr %35, align 8, !tbaa !5
  %54 = load i32, ptr %19, align 4, !tbaa !9
  %55 = load ptr, ptr %35, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._operate, ptr %55, i32 0, i32 0
  store i32 %54, ptr %56, align 8, !tbaa !20
  %57 = load i32, ptr %20, align 4, !tbaa !9
  %58 = load ptr, ptr %35, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._operate, ptr %58, i32 0, i32 1
  store i32 %57, ptr %59, align 4, !tbaa !22
  %60 = load i32, ptr %21, align 4, !tbaa !9
  %61 = load ptr, ptr %35, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._operate, ptr %61, i32 0, i32 2
  store i32 %60, ptr %62, align 8, !tbaa !23
  %63 = load i32, ptr %22, align 4, !tbaa !9
  %64 = load ptr, ptr %35, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._operate, ptr %64, i32 0, i32 3
  store i32 %63, ptr %65, align 4, !tbaa !24
  %66 = load i32, ptr %23, align 4, !tbaa !9
  %67 = load ptr, ptr %35, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._operate, ptr %67, i32 0, i32 4
  store i32 %66, ptr %68, align 8, !tbaa !25
  %69 = load i32, ptr %24, align 4, !tbaa !9
  %70 = load ptr, ptr %35, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._operate, ptr %70, i32 0, i32 5
  store i32 %69, ptr %71, align 4, !tbaa !26
  %72 = load i32, ptr %25, align 4, !tbaa !9
  %73 = load ptr, ptr %35, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._operate, ptr %73, i32 0, i32 6
  store i32 %72, ptr %74, align 8, !tbaa !27
  %75 = load double, ptr %26, align 8, !tbaa !11
  %76 = load ptr, ptr %35, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._operate, ptr %76, i32 0, i32 7
  store double %75, ptr %77, align 8, !tbaa !28
  %78 = load double, ptr %27, align 8, !tbaa !11
  %79 = load ptr, ptr %35, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._operate, ptr %79, i32 0, i32 8
  store double %78, ptr %80, align 8, !tbaa !29
  %81 = load double, ptr %28, align 8, !tbaa !11
  %82 = load ptr, ptr %35, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._operate, ptr %82, i32 0, i32 9
  store double %81, ptr %83, align 8, !tbaa !30
  %84 = load double, ptr %29, align 8, !tbaa !11
  %85 = load ptr, ptr %35, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._operate, ptr %85, i32 0, i32 10
  store double %84, ptr %86, align 8, !tbaa !31
  %87 = load double, ptr %30, align 8, !tbaa !11
  %88 = load ptr, ptr %35, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._operate, ptr %88, i32 0, i32 11
  store double %87, ptr %89, align 8, !tbaa !32
  %90 = load double, ptr %31, align 8, !tbaa !11
  %91 = load ptr, ptr %35, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._operate, ptr %91, i32 0, i32 12
  store double %90, ptr %92, align 8, !tbaa !33
  %93 = load double, ptr %32, align 8, !tbaa !11
  %94 = load ptr, ptr %35, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._operate, ptr %94, i32 0, i32 13
  store double %93, ptr %95, align 8, !tbaa !34
  %96 = load double, ptr %33, align 8, !tbaa !11
  %97 = load ptr, ptr %35, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._operate, ptr %97, i32 0, i32 14
  store double %96, ptr %98, align 8, !tbaa !35
  %99 = load double, ptr %34, align 8, !tbaa !11
  %100 = load ptr, ptr %35, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._operate, ptr %100, i32 0, i32 15
  store double %99, ptr %101, align 8, !tbaa !36
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._home, ptr %102, i32 0, i32 47
  %104 = load i32, ptr %103, align 8, !tbaa !13
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %103, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #2
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @ExtendOpList(ptr noundef) #1

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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 320}
!14 = !{!"_home", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !10, i64 128, !10, i64 132, !10, i64 136, !6, i64 144, !10, i64 152, !10, i64 156, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !10, i64 232, !10, i64 236, !10, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !10, i64 272, !6, i64 280, !10, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !10, i64 320, !10, i64 324, !6, i64 328, !10, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !10, i64 368, !10, i64 372, !10, i64 376, !6, i64 384, !6, i64 392, !10, i64 400, !10, i64 404, !6, i64 408, !6, i64 416, !6, i64 424, !10, i64 432, !10, i64 436, !10, i64 440, !7, i64 448, !7, i64 520, !15, i64 592, !10, i64 632, !10, i64 636, !10, i64 640, !10, i64 644, !10, i64 648, !10, i64 652, !10, i64 656, !16, i64 664}
!15 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!16 = !{!"timeval", !17, i64 0, !17, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!14, !10, i64 324}
!19 = !{!14, !6, i64 312}
!20 = !{!21, !10, i64 0}
!21 = !{!"_operate", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96}
!22 = !{!21, !10, i64 4}
!23 = !{!21, !10, i64 8}
!24 = !{!21, !10, i64 12}
!25 = !{!21, !10, i64 16}
!26 = !{!21, !10, i64 20}
!27 = !{!21, !10, i64 24}
!28 = !{!21, !12, i64 32}
!29 = !{!21, !12, i64 40}
!30 = !{!21, !12, i64 48}
!31 = !{!21, !12, i64 56}
!32 = !{!21, !12, i64 64}
!33 = !{!21, !12, i64 72}
!34 = !{!21, !12, i64 80}
!35 = !{!21, !12, i64 88}
!36 = !{!21, !12, i64 96}


; 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._operate = type { i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double }

; Function Attrs: nounwind uwtable
define dso_local void @AddOp(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, double noundef %8, double noundef %9, double noundef %10, double noundef %11, double noundef %12, double noundef %13, double noundef %14, double noundef %15, double noundef %16) local_unnamed_addr #0 {
  %18 = getelementptr inbounds i8, ptr %0, i64 320
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 324
  %21 = load i32, ptr %20, align 4, !tbaa !15
  %.not = icmp slt i32 %19, %21
  br i1 %.not, label %23, label %22

22:                                               ; preds = %17
  tail call void @ExtendOpList(ptr noundef nonnull %0)
  %.pre = load i32, ptr %18, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %22, %17
  %24 = phi i32 [ %.pre, %22 ], [ %19, %17 ]
  %25 = getelementptr inbounds i8, ptr %0, i64 312
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = sext i32 %24 to i64
  %28 = getelementptr inbounds %struct._operate, ptr %26, i64 %27
  store i32 %1, ptr %28, align 8, !tbaa !17
  %29 = getelementptr inbounds i8, ptr %28, i64 4
  store i32 %2, ptr %29, align 4, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %28, i64 8
  store i32 %3, ptr %30, align 8, !tbaa !20
  %31 = getelementptr inbounds i8, ptr %28, i64 12
  store i32 %4, ptr %31, align 4, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %28, i64 16
  store i32 %5, ptr %32, align 8, !tbaa !22
  %33 = getelementptr inbounds i8, ptr %28, i64 20
  store i32 %6, ptr %33, align 4, !tbaa !23
  %34 = getelementptr inbounds i8, ptr %28, i64 24
  store i32 %7, ptr %34, align 8, !tbaa !24
  %35 = getelementptr inbounds i8, ptr %28, i64 32
  store double %8, ptr %35, align 8, !tbaa !25
  %36 = getelementptr inbounds i8, ptr %28, i64 40
  store double %9, ptr %36, align 8, !tbaa !26
  %37 = getelementptr inbounds i8, ptr %28, i64 48
  store double %10, ptr %37, align 8, !tbaa !27
  %38 = getelementptr inbounds i8, ptr %28, i64 56
  store double %11, ptr %38, align 8, !tbaa !28
  %39 = getelementptr inbounds i8, ptr %28, i64 64
  store double %12, ptr %39, align 8, !tbaa !29
  %40 = getelementptr inbounds i8, ptr %28, i64 72
  store double %13, ptr %40, align 8, !tbaa !30
  %41 = getelementptr inbounds i8, ptr %28, i64 80
  store double %14, ptr %41, align 8, !tbaa !31
  %42 = getelementptr inbounds i8, ptr %28, i64 88
  store double %15, ptr %42, align 8, !tbaa !32
  %43 = getelementptr inbounds i8, ptr %28, i64 96
  store double %16, ptr %43, align 8, !tbaa !33
  %44 = add nsw i32 %24, 1
  store i32 %44, ptr %18, align 8, !tbaa !5
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @ExtendOpList(ptr noundef) local_unnamed_addr #0

attributes #0 = { 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 320}
!6 = !{!"_home", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104, !7, i64 112, !7, i64 116, !10, i64 120, !7, i64 128, !7, i64 132, !7, i64 136, !10, i64 144, !7, i64 152, !7, i64 156, !10, i64 160, !10, i64 168, !10, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !7, i64 232, !7, i64 236, !7, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !7, i64 272, !10, i64 280, !7, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !7, i64 320, !7, i64 324, !10, i64 328, !7, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !7, i64 368, !7, i64 372, !7, i64 376, !10, i64 384, !10, i64 392, !7, i64 400, !7, i64 404, !10, i64 408, !10, i64 416, !10, i64 424, !7, i64 432, !7, i64 436, !7, i64 440, !8, i64 448, !8, i64 520, !12, i64 592, !7, i64 632, !7, i64 636, !7, i64 640, !7, i64 644, !7, i64 648, !7, i64 652, !7, i64 656, !13, i64 664}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!"timeval", !14, i64 0, !14, i64 8}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !7, i64 324}
!16 = !{!6, !10, i64 312}
!17 = !{!18, !7, i64 0}
!18 = !{!"_operate", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96}
!19 = !{!18, !7, i64 4}
!20 = !{!18, !7, i64 8}
!21 = !{!18, !7, i64 12}
!22 = !{!18, !7, i64 16}
!23 = !{!18, !7, i64 20}
!24 = !{!18, !7, i64 24}
!25 = !{!18, !11, i64 32}
!26 = !{!18, !11, i64 40}
!27 = !{!18, !11, i64 48}
!28 = !{!18, !11, i64 56}
!29 = !{!18, !11, i64 64}
!30 = !{!18, !11, i64 72}
!31 = !{!18, !11, i64 80}
!32 = !{!18, !11, i64 88}
!33 = !{!18, !11, i64 96}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass