; LLVM IR from bjourne/fast_snn_fpga :: src (opencl)

; 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.pretty_printer = type { i64, i64, i64, i64, i64, ptr, ptr, i8, i64, i64, [10 x i64], i8, [256 x i8], i64, i8, i64 }

@.str.66 = external hidden unnamed_addr constant [68 x i8], align 1
@__const.ocl_print_device_details.attr_names = external hidden unnamed_addr constant [4 x ptr], align 16
@__const.ocl_print_device_details.attr_types = external hidden unnamed_addr constant [4 x i32], align 16
@__const.ocl_print_device_details.keys = external hidden unnamed_addr constant [5 x ptr], align 16
@__const.ocl_print_device_details.params = external hidden unnamed_addr constant [5 x i32], align 16
@.str.76 = external hidden unnamed_addr constant [1 x i8], align 1
@__const.ocl_print_device_details.suffixes = external hidden unnamed_addr constant [5 x ptr], align 16
@.str.78 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.ocl_print_device_details.flags = external hidden unnamed_addr constant [3 x i32], align 4
@__const.ocl_print_device_details.names = external hidden unnamed_addr constant [3 x ptr], align 16
@.str.83 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @ocl_check_err(i32 noundef, ptr noundef, i32 noundef) #0

; 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

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

; Function Attrs: nounwind uwtable
define dso_local void @ocl_print_device_details(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [4 x ptr], align 16
  %7 = alloca [4 x i32], align 16
  %8 = alloca i64, align 8
  %9 = alloca [5 x ptr], align 16
  %10 = alloca [5 x i32], align 16
  %11 = alloca [5 x i64], align 16
  %12 = alloca [5 x ptr], align 16
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca [3 x i32], align 4
  %20 = alloca [3 x ptr], align 16
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %28, label %26

26:                                               ; preds = %2
  %27 = call ptr (...) @pp_init()
  store ptr %27, ptr %5, align 8, !tbaa !5
  br label %30

28:                                               ; preds = %2
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %29, ptr %5, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %28, %26
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.ocl_print_device_details.attr_names, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.ocl_print_device_details.attr_types, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %44, %30
  %32 = load i64, ptr %8, align 8, !tbaa !9
  %33 = icmp ult i64 %32, 4
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %47

35:                                               ; preds = %31
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = getelementptr inbounds [4 x i32], ptr %7, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = getelementptr inbounds [4 x ptr], ptr %6, i64 0, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  call void @print_device_info_str(ptr noundef %36, ptr noundef %37, i32 noundef %40, ptr noundef %43)
  br label %44

44:                                               ; preds = %35
  %45 = load i64, ptr %8, align 8, !tbaa !9
  %46 = add i64 %45, 1
  store i64 %46, ptr %8, align 8, !tbaa !9
  br label %31, !llvm.loop !13

47:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.ocl_print_device_details.keys, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 20, ptr %10) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.ocl_print_device_details.params, i64 20, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #8
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 40, i1 false)
  %48 = getelementptr inbounds [5 x i64], ptr %11, i32 0, i32 0
  store i64 4, ptr %48, align 16
  %49 = getelementptr inbounds [5 x i64], ptr %11, i32 0, i32 1
  store i64 8, ptr %49, align 8
  %50 = getelementptr inbounds [5 x i64], ptr %11, i32 0, i32 2
  store i64 8, ptr %50, align 16
  %51 = getelementptr inbounds [5 x i64], ptr %11, i32 0, i32 3
  store i64 8, ptr %51, align 8
  %52 = getelementptr inbounds [5 x i64], ptr %11, i32 0, i32 4
  store i64 8, ptr %52, align 16
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.ocl_print_device_details.suffixes, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %53

53:                                               ; preds = %86, %47
  %54 = load i64, ptr %13, align 8, !tbaa !9
  %55 = icmp ult i64 %54, 5
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %89

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %58 = load i64, ptr %13, align 8, !tbaa !9
  %59 = getelementptr inbounds [5 x ptr], ptr %12, i64 0, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  store ptr %60, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %61 = load i64, ptr %13, align 8, !tbaa !9
  %62 = getelementptr inbounds [5 x ptr], ptr %9, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  store ptr %63, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = getelementptr inbounds [5 x i32], ptr %10, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = load i64, ptr %13, align 8, !tbaa !9
  %69 = getelementptr inbounds [5 x i64], ptr %11, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !9
  %71 = call i32 @clGetDeviceInfo(ptr noundef %64, i32 noundef %67, i64 noundef %70, ptr noundef %16, ptr noundef null)
  call void @ocl_check_err(i32 noundef %71, ptr noundef @.str.66, i32 noundef 206)
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = call i32 @strcmp(ptr noundef %72, ptr noundef @.str.76) #9
  %74 = icmp ne i32 %73, 0
  %75 = xor i1 %74, true
  %76 = zext i1 %75 to i64
  %77 = select i1 %75, i32 0, i32 2
  %78 = sext i32 %77 to i64
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.pretty_printer, ptr %79, i32 0, i32 3
  store i64 %78, ptr %80, align 8, !tbaa !15
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = load i64, ptr %16, align 8, !tbaa !9
  %84 = uitofp i64 %83 to double
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  call void @pp_print_key_value_with_unit(ptr noundef %81, ptr noundef %82, double noundef %84, ptr noundef %85)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %86

86:                                               ; preds = %57
  %87 = load i64, ptr %13, align 8, !tbaa !9
  %88 = add i64 %87, 1
  store i64 %88, ptr %13, align 8, !tbaa !9
  br label %53, !llvm.loop !18

89:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = call i32 @clGetDeviceInfo(ptr noundef %90, i32 noundef 4101, i64 noundef 0, ptr noundef null, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %92 = load i64, ptr %17, align 8, !tbaa !9
  %93 = call noalias ptr @malloc(i64 noundef %92) #10
  store ptr %93, ptr %18, align 8, !tbaa !5
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = load i64, ptr %17, align 8, !tbaa !9
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = call i32 @clGetDeviceInfo(ptr noundef %94, i32 noundef 4101, i64 noundef %95, ptr noundef %96, ptr noundef null)
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load ptr, ptr %18, align 8, !tbaa !5
  %100 = getelementptr inbounds i64, ptr %99, i64 0
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  %103 = getelementptr inbounds i64, ptr %102, i64 1
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %18, align 8, !tbaa !5
  %106 = getelementptr inbounds i64, ptr %105, i64 2
  %107 = load i64, ptr %106, align 8, !tbaa !9
  call void (ptr, ptr, ptr, ...) @pp_print_key_value(ptr noundef %98, ptr noundef @.str.78, ptr noundef @.str.79, i64 noundef %101, i64 noundef %104, i64 noundef %107)
  %108 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %108) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 @__const.ocl_print_device_details.flags, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const.ocl_print_device_details.names, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %132, %89
  %110 = load i64, ptr %21, align 8, !tbaa !9
  %111 = icmp ult i64 %110, 3
  br i1 %111, label %113, label %112

112:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %135

113:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = load i64, ptr %21, align 8, !tbaa !9
  %116 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !11
  %118 = call i32 @clGetDeviceInfo(ptr noundef %114, i32 noundef %117, i64 noundef 4, ptr noundef %22, ptr noundef null)
  store i32 %118, ptr %23, align 4, !tbaa !11
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = load i64, ptr %21, align 8, !tbaa !9
  %121 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = load i32, ptr %23, align 4, !tbaa !11
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %128

125:                                              ; preds = %113
  %126 = load i32, ptr %22, align 4, !tbaa !11
  %127 = icmp ne i32 %126, 0
  br label %128

128:                                              ; preds = %125, %113
  %129 = phi i1 [ false, %113 ], [ %127, %125 ]
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, ptr @.str.84, ptr @.str.85
  call void (ptr, ptr, ptr, ...) @pp_print_key_value(ptr noundef %119, ptr noundef %122, ptr noundef @.str.83, ptr noundef %131)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %132

132:                                              ; preds = %128
  %133 = load i64, ptr %21, align 8, !tbaa !9
  %134 = add i64 %133, 1
  store i64 %134, ptr %21, align 8, !tbaa !9
  br label %109, !llvm.loop !19

135:                                              ; preds = %112
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = icmp ne ptr %136, null
  br i1 %137, label %140, label %138

138:                                              ; preds = %135
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  call void @pp_free(ptr noundef %139)
  br label %140

140:                                              ; preds = %138, %135
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void
}

declare ptr @pp_init(...) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nounwind uwtable
declare hidden void @print_device_info_str(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #6

declare void @pp_print_key_value_with_unit(ptr noundef, ptr noundef, double noundef, ptr noundef) #3

declare void @pp_print_key_value(ptr noundef, ptr noundef, ptr noundef, ...) #3

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

declare void @pp_free(ptr noundef) #3

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" }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(read) "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 "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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 24}
!16 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !10, i64 64, !10, i64 72, !7, i64 80, !17, i64 160, !7, i64 161, !10, i64 424, !17, i64 432, !10, i64 440}
!17 = !{!"_Bool", !7, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !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.66 = external hidden unnamed_addr constant [68 x i8], align 1
@__const.ocl_print_device_details.attr_names = external hidden unnamed_addr constant [4 x ptr], align 16
@__const.ocl_print_device_details.attr_types = external hidden unnamed_addr constant [4 x i32], align 16
@__const.ocl_print_device_details.keys = external hidden unnamed_addr constant [5 x ptr], align 16
@__const.ocl_print_device_details.params = external hidden unnamed_addr constant [5 x i32], align 16
@.str.76 = external hidden unnamed_addr constant [1 x i8], align 1
@__const.ocl_print_device_details.suffixes = external hidden unnamed_addr constant [5 x ptr], align 16
@.str.78 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.ocl_print_device_details.flags = external hidden unnamed_addr constant [3 x i32], align 4
@__const.ocl_print_device_details.names = external hidden unnamed_addr constant [3 x ptr], align 16
@.str.83 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [3 x i8], align 1

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
define dso_local void @ocl_print_device_details(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %6, label %8

6:                                                ; preds = %2
  %7 = tail call ptr (...) @pp_init() #6
  br label %8

8:                                                ; preds = %2, %6
  %.0 = phi ptr [ %7, %6 ], [ %1, %2 ]
  %9 = load i32, ptr @__const.ocl_print_device_details.attr_types, align 16, !tbaa !5
  %10 = load ptr, ptr @__const.ocl_print_device_details.attr_names, align 16, !tbaa !9
  tail call void @print_device_info_str(ptr noundef %0, ptr noundef %.0, i32 noundef %9, ptr noundef %10)
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.attr_types, i64 4), align 4, !tbaa !5
  %12 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.attr_names, i64 8), align 8, !tbaa !9
  tail call void @print_device_info_str(ptr noundef %0, ptr noundef %.0, i32 noundef %11, ptr noundef %12)
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.attr_types, i64 8), align 8, !tbaa !5
  %14 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.attr_names, i64 16), align 16, !tbaa !9
  tail call void @print_device_info_str(ptr noundef %0, ptr noundef %.0, i32 noundef %13, ptr noundef %14)
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.attr_types, i64 12), align 4, !tbaa !5
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.attr_names, i64 24), align 8, !tbaa !9
  tail call void @print_device_info_str(ptr noundef %0, ptr noundef %.0, i32 noundef %15, ptr noundef %16)
  %17 = getelementptr inbounds i8, ptr %.0, i64 24
  %18 = load ptr, ptr @__const.ocl_print_device_details.suffixes, align 16, !tbaa !9
  %19 = load ptr, ptr @__const.ocl_print_device_details.keys, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %20 = load i32, ptr @__const.ocl_print_device_details.params, align 16, !tbaa !5
  %21 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %20, i64 noundef 4, ptr noundef nonnull %3, ptr noundef null) #6
  call void @ocl_check_err(i32 noundef %21, ptr noundef nonnull @.str.66, i32 noundef 206)
  %22 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.76) #7
  %.not40 = icmp eq i32 %22, 0
  %23 = select i1 %.not40, i64 0, i64 2
  store i64 %23, ptr %17, align 8, !tbaa !11
  %24 = load i64, ptr %3, align 8, !tbaa !15
  %25 = uitofp i64 %24 to double
  call void @pp_print_key_value_with_unit(ptr noundef %.0, ptr noundef %19, double noundef %25, ptr noundef %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.suffixes, i64 8), align 8, !tbaa !9
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.keys, i64 8), align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.params, i64 4), align 4, !tbaa !5
  %29 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %28, i64 noundef 8, ptr noundef nonnull %3, ptr noundef null) #6
  call void @ocl_check_err(i32 noundef %29, ptr noundef nonnull @.str.66, i32 noundef 206)
  %30 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %26, ptr noundef nonnull dereferenceable(1) @.str.76) #7
  %.not40.1 = icmp eq i32 %30, 0
  %31 = select i1 %.not40.1, i64 0, i64 2
  store i64 %31, ptr %17, align 8, !tbaa !11
  %32 = load i64, ptr %3, align 8, !tbaa !15
  %33 = uitofp i64 %32 to double
  call void @pp_print_key_value_with_unit(ptr noundef %.0, ptr noundef %27, double noundef %33, ptr noundef %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.suffixes, i64 16), align 16, !tbaa !9
  %35 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.keys, i64 16), align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.params, i64 8), align 8, !tbaa !5
  %37 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %36, i64 noundef 8, ptr noundef nonnull %3, ptr noundef null) #6
  call void @ocl_check_err(i32 noundef %37, ptr noundef nonnull @.str.66, i32 noundef 206)
  %38 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.76) #7
  %.not40.2 = icmp eq i32 %38, 0
  %39 = select i1 %.not40.2, i64 0, i64 2
  store i64 %39, ptr %17, align 8, !tbaa !11
  %40 = load i64, ptr %3, align 8, !tbaa !15
  %41 = uitofp i64 %40 to double
  call void @pp_print_key_value_with_unit(ptr noundef %.0, ptr noundef %35, double noundef %41, ptr noundef %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %42 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.suffixes, i64 24), align 8, !tbaa !9
  %43 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.keys, i64 24), align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.params, i64 12), align 4, !tbaa !5
  %45 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %44, i64 noundef 8, ptr noundef nonnull %3, ptr noundef null) #6
  call void @ocl_check_err(i32 noundef %45, ptr noundef nonnull @.str.66, i32 noundef 206)
  %46 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %42, ptr noundef nonnull dereferenceable(1) @.str.76) #7
  %.not40.3 = icmp eq i32 %46, 0
  %47 = select i1 %.not40.3, i64 0, i64 2
  store i64 %47, ptr %17, align 8, !tbaa !11
  %48 = load i64, ptr %3, align 8, !tbaa !15
  %49 = uitofp i64 %48 to double
  call void @pp_print_key_value_with_unit(ptr noundef %.0, ptr noundef %43, double noundef %49, ptr noundef %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.suffixes, i64 32), align 16, !tbaa !9
  %51 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.keys, i64 32), align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.params, i64 16), align 16, !tbaa !5
  %53 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %52, i64 noundef 8, ptr noundef nonnull %3, ptr noundef null) #6
  call void @ocl_check_err(i32 noundef %53, ptr noundef nonnull @.str.66, i32 noundef 206)
  %54 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %50, ptr noundef nonnull dereferenceable(1) @.str.76) #7
  %.not40.4 = icmp eq i32 %54, 0
  %55 = select i1 %.not40.4, i64 0, i64 2
  store i64 %55, ptr %17, align 8, !tbaa !11
  %56 = load i64, ptr %3, align 8, !tbaa !15
  %57 = uitofp i64 %56 to double
  call void @pp_print_key_value_with_unit(ptr noundef %.0, ptr noundef %51, double noundef %57, ptr noundef %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %58 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef 4101, i64 noundef 0, ptr noundef null, ptr noundef nonnull %4) #6
  %59 = load i64, ptr %4, align 8, !tbaa !15
  %60 = call noalias ptr @malloc(i64 noundef %59) #8
  %61 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef 4101, i64 noundef %59, ptr noundef %60, ptr noundef null) #6
  %62 = load i64, ptr %60, align 8, !tbaa !15
  %63 = getelementptr inbounds i8, ptr %60, i64 8
  %64 = load i64, ptr %63, align 8, !tbaa !15
  %65 = getelementptr inbounds i8, ptr %60, i64 16
  %66 = load i64, ptr %65, align 8, !tbaa !15
  call void (ptr, ptr, ptr, ...) @pp_print_key_value(ptr noundef %.0, ptr noundef nonnull @.str.78, ptr noundef nonnull @.str.79, i64 noundef %62, i64 noundef %64, i64 noundef %66) #6
  call void @free(ptr noundef %60) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %67 = load i32, ptr @__const.ocl_print_device_details.flags, align 4, !tbaa !5
  %68 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %67, i64 noundef 4, ptr noundef nonnull %5, ptr noundef null) #6
  %69 = load ptr, ptr @__const.ocl_print_device_details.names, align 16, !tbaa !9
  %70 = icmp eq i32 %68, 0
  %71 = load i32, ptr %5, align 4
  %72 = icmp ne i32 %71, 0
  %73 = select i1 %70, i1 %72, i1 false
  %74 = select i1 %73, ptr @.str.84, ptr @.str.85
  call void (ptr, ptr, ptr, ...) @pp_print_key_value(ptr noundef %.0, ptr noundef %69, ptr noundef nonnull @.str.83, ptr noundef nonnull %74) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %75 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.flags, i64 4), align 4, !tbaa !5
  %76 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %75, i64 noundef 4, ptr noundef nonnull %5, ptr noundef null) #6
  %77 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.names, i64 8), align 8, !tbaa !9
  %78 = icmp eq i32 %76, 0
  %79 = load i32, ptr %5, align 4
  %80 = icmp ne i32 %79, 0
  %81 = select i1 %78, i1 %80, i1 false
  %82 = select i1 %81, ptr @.str.84, ptr @.str.85
  call void (ptr, ptr, ptr, ...) @pp_print_key_value(ptr noundef %.0, ptr noundef %77, ptr noundef nonnull @.str.83, ptr noundef nonnull %82) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.flags, i64 8), align 4, !tbaa !5
  %84 = call i32 @clGetDeviceInfo(ptr noundef %0, i32 noundef %83, i64 noundef 4, ptr noundef nonnull %5, ptr noundef null) #6
  %85 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.ocl_print_device_details.names, i64 16), align 16, !tbaa !9
  %86 = icmp eq i32 %84, 0
  %87 = load i32, ptr %5, align 4
  %88 = icmp ne i32 %87, 0
  %89 = select i1 %86, i1 %88, i1 false
  %90 = select i1 %89, ptr @.str.84, ptr @.str.85
  call void (ptr, ptr, ptr, ...) @pp_print_key_value(ptr noundef %.0, ptr noundef %85, ptr noundef nonnull @.str.83, ptr noundef nonnull %90) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br i1 %.not, label %91, label %92

91:                                               ; preds = %8
  call void @pp_free(ptr noundef nonnull %.0) #6
  br label %92

92:                                               ; preds = %91, %8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  ret void
}

declare ptr @pp_init(...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @print_device_info_str(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @clGetDeviceInfo(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

declare void @pp_print_key_value_with_unit(ptr noundef, ptr noundef, double noundef, ptr noundef) local_unnamed_addr #3

declare void @pp_print_key_value(ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #3

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

declare void @pp_free(ptr noundef) local_unnamed_addr #3

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" }
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 = { "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 24}
!12 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !13, i64 64, !13, i64 72, !7, i64 80, !14, i64 160, !7, i64 161, !13, i64 424, !14, i64 432, !13, i64 440}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!13, !13, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass