; LLVM IR from ERGO-Code/HiGHS :: check (cublas_example)

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

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

13:                                               ; preds = %0
  %14 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %121

15:                                               ; preds = %0
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %41, %15
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = icmp slt i32 %17, 5
  br i1 %18, label %19, label %44

19:                                               ; preds = %16
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %37, %19
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = icmp slt i32 %21, 6
  br i1 %22, label %23, label %40

23:                                               ; preds = %20
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = mul nsw i32 %24, 5
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = add nsw i32 %25, %26
  %28 = add nsw i32 %27, 1
  %29 = sitofp i32 %28 to float
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = mul nsw i32 %31, 6
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = add nsw i32 %32, %33
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds float, ptr %30, i64 %35
  store float %29, ptr %36, align 4, !tbaa !11
  br label %37

37:                                               ; preds = %23
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %5, align 4, !tbaa !9
  br label %20, !llvm.loop !13

40:                                               ; preds = %20
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %6, align 4, !tbaa !9
  br label %16, !llvm.loop !15

44:                                               ; preds = %16
  %45 = call i32 @cudaMalloc(ptr noundef %7, i64 noundef 120)
  store i32 %45, ptr %2, align 4, !tbaa !16
  %46 = load i32, ptr %2, align 4, !tbaa !16
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %51

48:                                               ; preds = %44
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %50) #6
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %121

51:                                               ; preds = %44
  %52 = call i32 @cublasCreate_v2(ptr noundef %4)
  store i32 %52, ptr %3, align 4, !tbaa !18
  %53 = load i32, ptr %3, align 4, !tbaa !18
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %51
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %57) #6
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call i32 @cudaFree(ptr noundef %58)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %121

60:                                               ; preds = %51
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = call i32 @cublasSetMatrix(i32 noundef 6, i32 noundef 5, i32 noundef 4, ptr noundef %61, i32 noundef 6, ptr noundef %62, i32 noundef 6)
  store i32 %63, ptr %3, align 4, !tbaa !18
  %64 = load i32, ptr %3, align 4, !tbaa !18
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %73

66:                                               ; preds = %60
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %68) #6
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = call i32 @cudaFree(ptr noundef %69)
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = call i32 @cublasDestroy_v2(ptr noundef %71)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %121

73:                                               ; preds = %60
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL6modifyP13cublasContextPfiiiiff(ptr noundef %74, ptr noundef %75, i32 noundef 6, i32 noundef 5, i32 noundef 1, i32 noundef 2, float noundef 1.600000e+01, float noundef 1.200000e+01)
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = call i32 @cublasGetMatrix(i32 noundef 6, i32 noundef 5, i32 noundef 4, ptr noundef %76, i32 noundef 6, ptr noundef %77, i32 noundef 6)
  store i32 %78, ptr %3, align 4, !tbaa !18
  %79 = load i32, ptr %3, align 4, !tbaa !18
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %73
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %83) #6
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = call i32 @cudaFree(ptr noundef %84)
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call i32 @cublasDestroy_v2(ptr noundef %86)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %121

88:                                               ; preds = %73
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = call i32 @cudaFree(ptr noundef %89)
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = call i32 @cublasDestroy_v2(ptr noundef %91)
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %116, %88
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = icmp slt i32 %94, 5
  br i1 %95, label %96, label %119

96:                                               ; preds = %93
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %111, %96
  %98 = load i32, ptr %5, align 4, !tbaa !9
  %99 = icmp slt i32 %98, 6
  br i1 %99, label %100, label %114

100:                                              ; preds = %97
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = mul nsw i32 %102, 6
  %104 = load i32, ptr %5, align 4, !tbaa !9
  %105 = add nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds float, ptr %101, i64 %106
  %108 = load float, ptr %107, align 4, !tbaa !11
  %109 = fpext float %108 to double
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %109)
  br label %111

111:                                              ; preds = %100
  %112 = load i32, ptr %5, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %5, align 4, !tbaa !9
  br label %97, !llvm.loop !20

114:                                              ; preds = %97
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %116

116:                                              ; preds = %114
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %6, align 4, !tbaa !9
  br label %93, !llvm.loop !21

119:                                              ; preds = %93
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %120) #6
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %121

121:                                              ; preds = %119, %81, %66, %55, %48, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %122 = load i32, ptr %1, align 4
  ret i32 %122
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

declare i32 @cudaMalloc(ptr noundef, i64 noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

declare i32 @cublasCreate_v2(ptr noundef) #3

declare i32 @cudaFree(ptr noundef) #3

declare i32 @cublasSetMatrix(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

declare i32 @cublasDestroy_v2(ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL6modifyP13cublasContextPfiiiiff(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef) #5

declare i32 @cublasGetMatrix(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(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 = { "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 "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 = { inlinehint mustprogress 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS9cudaError", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS14cublasStatus_t", !7, i64 0}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}


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

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %3 = tail call noalias dereferenceable_or_null(120) ptr @malloc(i64 noundef 120) #8
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %34, label %.preheader36.preheader

.preheader36.preheader:                           ; preds = %0
  %4 = getelementptr inbounds i8, ptr %3, i64 4
  %5 = getelementptr inbounds i8, ptr %3, i64 8
  %6 = getelementptr inbounds i8, ptr %3, i64 12
  store <4 x float> <float 1.000000e+00, float 6.000000e+00, float 1.100000e+01, float 1.600000e+01>, ptr %3, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 16
  %8 = getelementptr inbounds i8, ptr %3, i64 20
  %9 = getelementptr inbounds i8, ptr %3, i64 24
  %10 = getelementptr inbounds i8, ptr %3, i64 28
  store <4 x float> <float 2.100000e+01, float 2.600000e+01, float 2.000000e+00, float 7.000000e+00>, ptr %7, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %3, i64 32
  %12 = getelementptr inbounds i8, ptr %3, i64 36
  %13 = getelementptr inbounds i8, ptr %3, i64 40
  %14 = getelementptr inbounds i8, ptr %3, i64 44
  store <4 x float> <float 1.200000e+01, float 1.700000e+01, float 2.200000e+01, float 2.700000e+01>, ptr %11, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %3, i64 48
  %16 = getelementptr inbounds i8, ptr %3, i64 52
  %17 = getelementptr inbounds i8, ptr %3, i64 56
  %18 = getelementptr inbounds i8, ptr %3, i64 60
  store <4 x float> <float 3.000000e+00, float 8.000000e+00, float 1.300000e+01, float 1.800000e+01>, ptr %15, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %3, i64 64
  %20 = getelementptr inbounds i8, ptr %3, i64 68
  %21 = getelementptr inbounds i8, ptr %3, i64 72
  %22 = getelementptr inbounds i8, ptr %3, i64 76
  store <4 x float> <float 2.300000e+01, float 2.800000e+01, float 4.000000e+00, float 9.000000e+00>, ptr %19, align 4, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %3, i64 80
  %24 = getelementptr inbounds i8, ptr %3, i64 84
  %25 = getelementptr inbounds i8, ptr %3, i64 88
  %26 = getelementptr inbounds i8, ptr %3, i64 92
  store <4 x float> <float 1.400000e+01, float 1.900000e+01, float 2.400000e+01, float 2.900000e+01>, ptr %23, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %3, i64 96
  %28 = getelementptr inbounds i8, ptr %3, i64 100
  %29 = getelementptr inbounds i8, ptr %3, i64 104
  %30 = getelementptr inbounds i8, ptr %3, i64 108
  store <4 x float> <float 5.000000e+00, float 1.000000e+01, float 1.500000e+01, float 2.000000e+01>, ptr %27, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %3, i64 112
  %32 = getelementptr inbounds i8, ptr %3, i64 116
  store <2 x float> <float 2.500000e+01, float 3.000000e+01>, ptr %31, align 4, !tbaa !5
  %33 = call i32 @cudaMalloc(ptr noundef nonnull %2, i64 noundef 120)
  %.not32 = icmp eq i32 %33, 0
  br i1 %.not32, label %38, label %36

34:                                               ; preds = %0
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %163

36:                                               ; preds = %.preheader36.preheader
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @free(ptr noundef nonnull %3) #7
  br label %163

38:                                               ; preds = %.preheader36.preheader
  %39 = call i32 @cublasCreate_v2(ptr noundef nonnull %1)
  %.not33 = icmp eq i32 %39, 0
  br i1 %.not33, label %44, label %40

40:                                               ; preds = %38
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @free(ptr noundef nonnull %3) #7
  %42 = load ptr, ptr %2, align 8, !tbaa !9
  %43 = call i32 @cudaFree(ptr noundef %42)
  br label %163

44:                                               ; preds = %38
  %45 = load ptr, ptr %2, align 8, !tbaa !9
  %46 = call i32 @cublasSetMatrix(i32 noundef 6, i32 noundef 5, i32 noundef 4, ptr noundef nonnull %3, i32 noundef 6, ptr noundef %45, i32 noundef 6)
  %.not34 = icmp eq i32 %46, 0
  br i1 %.not34, label %53, label %47

47:                                               ; preds = %44
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @free(ptr noundef nonnull %3) #7
  %49 = load ptr, ptr %2, align 8, !tbaa !9
  %50 = call i32 @cudaFree(ptr noundef %49)
  %51 = load ptr, ptr %1, align 8, !tbaa !9
  %52 = call i32 @cublasDestroy_v2(ptr noundef %51)
  br label %163

53:                                               ; preds = %44
  %54 = load ptr, ptr %1, align 8, !tbaa !9
  %55 = load ptr, ptr %2, align 8, !tbaa !9
  call void @_ZL6modifyP13cublasContextPfiiiiff(ptr noundef %54, ptr noundef %55, i32 noundef 6, i32 noundef 5, i32 noundef 1, i32 noundef 2, float noundef 1.600000e+01, float noundef 1.200000e+01)
  %56 = load ptr, ptr %2, align 8, !tbaa !9
  %57 = call i32 @cublasGetMatrix(i32 noundef 6, i32 noundef 5, i32 noundef 4, ptr noundef %56, i32 noundef 6, ptr noundef nonnull %3, i32 noundef 6)
  %.not35 = icmp eq i32 %57, 0
  br i1 %.not35, label %.preheader, label %58

58:                                               ; preds = %53
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @free(ptr noundef nonnull %3) #7
  %60 = load ptr, ptr %2, align 8, !tbaa !9
  %61 = call i32 @cudaFree(ptr noundef %60)
  %62 = load ptr, ptr %1, align 8, !tbaa !9
  %63 = call i32 @cublasDestroy_v2(ptr noundef %62)
  br label %163

.preheader:                                       ; preds = %53
  %64 = load ptr, ptr %2, align 8, !tbaa !9
  %65 = call i32 @cudaFree(ptr noundef %64)
  %66 = load ptr, ptr %1, align 8, !tbaa !9
  %67 = call i32 @cublasDestroy_v2(ptr noundef %66)
  %68 = load float, ptr %3, align 4, !tbaa !5
  %69 = fpext float %68 to double
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %69)
  %71 = load float, ptr %4, align 4, !tbaa !5
  %72 = fpext float %71 to double
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %72)
  %74 = load float, ptr %5, align 4, !tbaa !5
  %75 = fpext float %74 to double
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %75)
  %77 = load float, ptr %6, align 4, !tbaa !5
  %78 = fpext float %77 to double
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %78)
  %80 = load float, ptr %7, align 4, !tbaa !5
  %81 = fpext float %80 to double
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %81)
  %83 = load float, ptr %8, align 4, !tbaa !5
  %84 = fpext float %83 to double
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %84)
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %87 = load float, ptr %9, align 4, !tbaa !5
  %88 = fpext float %87 to double
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %88)
  %90 = load float, ptr %10, align 4, !tbaa !5
  %91 = fpext float %90 to double
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %91)
  %93 = load float, ptr %11, align 4, !tbaa !5
  %94 = fpext float %93 to double
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %94)
  %96 = load float, ptr %12, align 4, !tbaa !5
  %97 = fpext float %96 to double
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %97)
  %99 = load float, ptr %13, align 4, !tbaa !5
  %100 = fpext float %99 to double
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %100)
  %102 = load float, ptr %14, align 4, !tbaa !5
  %103 = fpext float %102 to double
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %103)
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %106 = load float, ptr %15, align 4, !tbaa !5
  %107 = fpext float %106 to double
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %107)
  %109 = load float, ptr %16, align 4, !tbaa !5
  %110 = fpext float %109 to double
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %110)
  %112 = load float, ptr %17, align 4, !tbaa !5
  %113 = fpext float %112 to double
  %114 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %113)
  %115 = load float, ptr %18, align 4, !tbaa !5
  %116 = fpext float %115 to double
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %116)
  %118 = load float, ptr %19, align 4, !tbaa !5
  %119 = fpext float %118 to double
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %119)
  %121 = load float, ptr %20, align 4, !tbaa !5
  %122 = fpext float %121 to double
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %122)
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %125 = load float, ptr %21, align 4, !tbaa !5
  %126 = fpext float %125 to double
  %127 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %126)
  %128 = load float, ptr %22, align 4, !tbaa !5
  %129 = fpext float %128 to double
  %130 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %129)
  %131 = load float, ptr %23, align 4, !tbaa !5
  %132 = fpext float %131 to double
  %133 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %132)
  %134 = load float, ptr %24, align 4, !tbaa !5
  %135 = fpext float %134 to double
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %135)
  %137 = load float, ptr %25, align 4, !tbaa !5
  %138 = fpext float %137 to double
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %138)
  %140 = load float, ptr %26, align 4, !tbaa !5
  %141 = fpext float %140 to double
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %141)
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %144 = load float, ptr %27, align 4, !tbaa !5
  %145 = fpext float %144 to double
  %146 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %145)
  %147 = load float, ptr %28, align 4, !tbaa !5
  %148 = fpext float %147 to double
  %149 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %148)
  %150 = load float, ptr %29, align 4, !tbaa !5
  %151 = fpext float %150 to double
  %152 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %151)
  %153 = load float, ptr %30, align 4, !tbaa !5
  %154 = fpext float %153 to double
  %155 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %154)
  %156 = load float, ptr %31, align 4, !tbaa !5
  %157 = fpext float %156 to double
  %158 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %157)
  %159 = load float, ptr %32, align 4, !tbaa !5
  %160 = fpext float %159 to double
  %161 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %160)
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @free(ptr noundef nonnull %3) #7
  br label %163

163:                                              ; preds = %.preheader, %58, %47, %40, %36, %34
  %.030 = phi i32 [ 1, %36 ], [ 1, %40 ], [ 1, %47 ], [ 1, %58 ], [ 0, %.preheader ], [ 1, %34 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 %.030
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

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

declare i32 @cudaMalloc(ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

declare i32 @cublasCreate_v2(ptr noundef) local_unnamed_addr #4

declare i32 @cudaFree(ptr noundef) local_unnamed_addr #4

declare i32 @cublasSetMatrix(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare i32 @cublasDestroy_v2(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL6modifyP13cublasContextPfiiiiff(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef) local_unnamed_addr #6

declare i32 @cublasGetMatrix(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #4 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { inlinehint mustprogress 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass