; LLVM IR from GPUOpen-LibrariesAndSDKs/TAN :: tan/tests/src/TanDeviceResources (TanDeviceResources)

; 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._TanDeviceCapabilities = type { ptr, i64, ptr, ptr, ptr, i8, i8, i32, float, i32, i32, i32, i64, i64, i64, [1016 x i32] }

@.str = external hidden unnamed_addr constant [73 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %10 = load ptr, ptr %5, align 8, !tbaa !9
  %11 = getelementptr inbounds ptr, ptr %10, i64 0
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %14 = call i32 @listTanDevicesAndCaps(ptr noundef %6, ptr noundef %7)
  store i32 %14, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %142, %2
  %16 = load i32, ptr %9, align 4, !tbaa !5
  %17 = load i32, ptr %7, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %145

20:                                               ; preds = %15
  %21 = call i32 @puts(ptr noundef @.str.1)
  %22 = load i32, ptr %9, align 4, !tbaa !5
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %22)
  %24 = load ptr, ptr %6, align 8, !tbaa !9
  %25 = load i32, ptr %9, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %24, i64 %26
  %28 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %29)
  %31 = load ptr, ptr %6, align 8, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %31, i64 %33
  %35 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %34, i32 0, i32 1
  %36 = load i64, ptr %35, align 8, !tbaa !16
  %37 = icmp eq i64 %36, 4
  br i1 %37, label %38, label %39

38:                                               ; preds = %20
  br label %40

39:                                               ; preds = %20
  br label %40

40:                                               ; preds = %39, %38
  %41 = phi ptr [ @.str.5, %38 ], [ @.str.6, %39 ]
  %42 = getelementptr inbounds [4 x i8], ptr %41, i64 0, i64 0
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %42)
  %44 = load ptr, ptr %6, align 8, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %44, i64 %46
  %48 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %47, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %49)
  %51 = load ptr, ptr %6, align 8, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %51, i64 %53
  %55 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %54, i32 0, i32 3
  %56 = load ptr, ptr %55, align 8, !tbaa !18
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %56)
  %58 = load ptr, ptr %6, align 8, !tbaa !9
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %58, i64 %60
  %62 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !19
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %63)
  %65 = load ptr, ptr %6, align 8, !tbaa !9
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %65, i64 %67
  %69 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %68, i32 0, i32 5
  %70 = load i8, ptr %69, align 8, !tbaa !20, !range !21, !noundef !22
  %71 = trunc i8 %70 to i1
  %72 = zext i1 %71 to i32
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %72)
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %77, i32 0, i32 6
  %79 = load i8, ptr %78, align 1, !tbaa !23, !range !21, !noundef !22
  %80 = trunc i8 %79 to i1
  %81 = zext i1 %80 to i32
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %81)
  %83 = load ptr, ptr %6, align 8, !tbaa !9
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %83, i64 %85
  %87 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %86, i32 0, i32 7
  %88 = load i32, ptr %87, align 4, !tbaa !24
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %88)
  %90 = load ptr, ptr %6, align 8, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %90, i64 %92
  %94 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %93, i32 0, i32 8
  %95 = load float, ptr %94, align 8, !tbaa !25
  %96 = fpext float %95 to double
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, double noundef %96)
  %98 = load ptr, ptr %6, align 8, !tbaa !9
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %98, i64 %100
  %102 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %101, i32 0, i32 9
  %103 = load i32, ptr %102, align 4, !tbaa !26
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %103)
  %105 = load ptr, ptr %6, align 8, !tbaa !9
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %105, i64 %107
  %109 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %108, i32 0, i32 10
  %110 = load i32, ptr %109, align 8, !tbaa !27
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %110)
  %112 = load ptr, ptr %6, align 8, !tbaa !9
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %112, i64 %114
  %116 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %115, i32 0, i32 11
  %117 = load i32, ptr %116, align 4, !tbaa !28
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %117)
  %119 = load ptr, ptr %6, align 8, !tbaa !9
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %122, i32 0, i32 12
  %124 = load i64, ptr %123, align 8, !tbaa !29
  %125 = udiv i64 %124, 1048576
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i64 noundef %125)
  %127 = load ptr, ptr %6, align 8, !tbaa !9
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %127, i64 %129
  %131 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %130, i32 0, i32 13
  %132 = load i64, ptr %131, align 8, !tbaa !30
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i64 noundef %132)
  %134 = load ptr, ptr %6, align 8, !tbaa !9
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %134, i64 %136
  %138 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %137, i32 0, i32 14
  %139 = load i64, ptr %138, align 8, !tbaa !31
  %140 = udiv i64 %139, 1024
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, i64 noundef %140)
  br label %142

142:                                              ; preds = %40
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %9, align 4, !tbaa !5
  br label %15, !llvm.loop !32

145:                                              ; preds = %19
  %146 = load ptr, ptr %6, align 8, !tbaa !9
  %147 = icmp eq ptr %146, null
  br i1 %147, label %149, label %148

148:                                              ; preds = %145
  call void @_ZdaPv(ptr noundef %146) #5
  br label %149

149:                                              ; preds = %148, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  ret i32 0
}

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare i32 @listTanDevicesAndCaps(ptr noundef, ptr noundef) #1

declare i32 @puts(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

attributes #0 = { mustprogress norecurse 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin nounwind "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 #4 = { nounwind }
attributes #5 = { builtin 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS22_TanDeviceCapabilities", !10, i64 0, !13, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !14, i64 40, !14, i64 41, !6, i64 44, !15, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !13, i64 64, !13, i64 72, !13, i64 80, !7, i64 88}
!13 = !{!"long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!12, !13, i64 8}
!17 = !{!12, !10, i64 16}
!18 = !{!12, !10, i64 24}
!19 = !{!12, !10, i64 32}
!20 = !{!12, !14, i64 40}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!12, !14, i64 41}
!24 = !{!12, !6, i64 44}
!25 = !{!12, !15, i64 48}
!26 = !{!12, !6, i64 52}
!27 = !{!12, !6, i64 56}
!28 = !{!12, !6, i64 60}
!29 = !{!12, !13, i64 64}
!30 = !{!12, !13, i64 72}
!31 = !{!12, !13, i64 80}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; 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._TanDeviceCapabilities = type { ptr, i64, ptr, ptr, ptr, i8, i8, i32, float, i32, i32, i32, i64, i64, i64, [1016 x i32] }

@.str = external hidden unnamed_addr constant [73 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  %7 = call i32 @listTanDevicesAndCaps(ptr noundef nonnull %3, ptr noundef nonnull %4)
  %8 = load i32, ptr %4, align 4, !tbaa !9
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %85, label %84

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %12 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  %13 = trunc nuw nsw i64 %indvars.iv to i32
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %13)
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %15, i64 %indvars.iv
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef %17)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %19, i64 %indvars.iv, i32 1
  %21 = load i64, ptr %20, align 8, !tbaa !16
  %22 = icmp eq i64 %21, 4
  %.str.5..str.6 = select i1 %22, ptr @.str.5, ptr @.str.6
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %.str.5..str.6)
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %24, i64 %indvars.iv, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !17
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %26)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %28, i64 %indvars.iv, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %30)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %32, i64 %indvars.iv, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef %34)
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %36, i64 %indvars.iv, i32 5
  %38 = load i8, ptr %37, align 8, !tbaa !20, !range !21, !noundef !22
  %39 = zext nneg i8 %38 to i32
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %39)
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %41, i64 %indvars.iv, i32 6
  %43 = load i8, ptr %42, align 1, !tbaa !23, !range !21, !noundef !22
  %44 = zext nneg i8 %43 to i32
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %44)
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %46, i64 %indvars.iv, i32 7
  %48 = load i32, ptr %47, align 4, !tbaa !24
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %48)
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %50, i64 %indvars.iv, i32 8
  %52 = load float, ptr %51, align 8, !tbaa !25
  %53 = fpext float %52 to double
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, double noundef %53)
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %55, i64 %indvars.iv, i32 9
  %57 = load i32, ptr %56, align 4, !tbaa !26
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %57)
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %59, i64 %indvars.iv, i32 10
  %61 = load i32, ptr %60, align 8, !tbaa !27
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %61)
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %63, i64 %indvars.iv, i32 11
  %65 = load i32, ptr %64, align 4, !tbaa !28
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %65)
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %67, i64 %indvars.iv, i32 12
  %69 = load i64, ptr %68, align 8, !tbaa !29
  %70 = lshr i64 %69, 20
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i64 noundef %70)
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %72, i64 %indvars.iv, i32 13
  %74 = load i64, ptr %73, align 8, !tbaa !30
  %75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i64 noundef %74)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._TanDeviceCapabilities, ptr %76, i64 %indvars.iv, i32 14
  %78 = load i64, ptr %77, align 8, !tbaa !31
  %79 = lshr i64 %78, 10
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i64 noundef %79)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %81 = load i32, ptr %4, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = icmp slt i64 %indvars.iv.next, %82
  br i1 %83, label %.lr.ph, label %._crit_edge, !llvm.loop !32

84:                                               ; preds = %._crit_edge
  call void @_ZdaPv(ptr noundef nonnull %10) #6
  br label %85

85:                                               ; preds = %84, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare i32 @listTanDevicesAndCaps(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress norecurse 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 = { nofree nounwind "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 #4 = { nobuiltin nounwind "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 #5 = { nounwind }
attributes #6 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS22_TanDeviceCapabilities", !6, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !14, i64 40, !14, i64 41, !10, i64 44, !15, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !13, i64 64, !13, i64 72, !13, i64 80, !7, i64 88}
!13 = !{!"long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!12, !13, i64 8}
!17 = !{!12, !6, i64 16}
!18 = !{!12, !6, i64 24}
!19 = !{!12, !6, i64 32}
!20 = !{!12, !14, i64 40}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!12, !14, i64 41}
!24 = !{!12, !10, i64 44}
!25 = !{!12, !15, i64 48}
!26 = !{!12, !10, i64 52}
!27 = !{!12, !10, i64 56}
!28 = !{!12, !10, i64 60}
!29 = !{!12, !13, i64 64}
!30 = !{!12, !13, i64 72}
!31 = !{!12, !13, i64 80}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass