; LLVM IR from NVIDIA/tensorflow :: tensorflow/compiler/xla/python/tpu_driver/client (libtpu_client)

; 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.TpuDriverFn = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.DeviceAssignment = type { ptr, i32 }
%struct.TpuCompiledProgramHandle = type { ptr, ptr }
%struct.TpuBufferHandle = type { ptr, ptr, i64 }
%struct.TpuStatus = type { i32, ptr }

@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@stdout = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [201 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @LoadAndInitializeDriver(ptr noundef, ptr 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
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; 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 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 %struct.TpuDriverFn, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [1 x ptr], align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca [1 x ptr], align 8
  %22 = alloca ptr, align 8
  %23 = alloca [1 x ptr], align 8
  %24 = alloca ptr, align 8
  %25 = alloca %struct.DeviceAssignment, align 8
  %26 = alloca [2 x ptr], align 16
  %27 = alloca [1 x ptr], align 8
  %28 = alloca [2 x ptr], align 16
  %29 = alloca ptr, align 8
  %30 = alloca [1 x ptr], align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i64, align 8
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store ptr @.str.2, ptr %6, align 8, !tbaa !9
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 2
  br i1 %39, label %40, label %44

40:                                               ; preds = %2
  %41 = load ptr, ptr %5, align 8, !tbaa !9
  %42 = getelementptr inbounds ptr, ptr %41, i64 1
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  store ptr %43, ptr %6, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %40, %2
  call void @llvm.lifetime.start.p0(i64 224, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %45 = load ptr, ptr %6, align 8, !tbaa !9
  %46 = call ptr @LoadAndInitializeDriver(ptr noundef %45, ptr noundef %7)
  store ptr %46, ptr %8, align 8, !tbaa !9
  %47 = load ptr, ptr @stdout, align 8, !tbaa !9
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str.3) #6
  %49 = load ptr, ptr @stdout, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 27
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = call ptr (...) %51()
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.4, ptr noundef %52) #6
  %54 = load ptr, ptr @stdout, align 8, !tbaa !9
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %56 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !13
  %58 = call ptr %57(ptr noundef @.str.6)
  store ptr %58, ptr %9, align 8, !tbaa !9
  %59 = load ptr, ptr @stdout, align 8, !tbaa !9
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef @.str.7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %61 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  %64 = call ptr %62(ptr noundef %63)
  store ptr %64, ptr %10, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 5
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  call void %66(ptr noundef %67)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr @.str.8, ptr %11, align 8, !tbaa !9
  %68 = load ptr, ptr @stdout, align 8, !tbaa !9
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %70 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 9
  %71 = load ptr, ptr %70, align 8, !tbaa !16
  %72 = load ptr, ptr %9, align 8, !tbaa !9
  %73 = load ptr, ptr %11, align 8, !tbaa !9
  %74 = call ptr %71(ptr noundef %72, ptr noundef %73, i32 noundef 1, i32 noundef 0, ptr noundef null)
  store ptr %74, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %75 = load ptr, ptr %12, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.TpuCompiledProgramHandle, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  store ptr %77, ptr %13, align 8, !tbaa !9
  %78 = load ptr, ptr @stdout, align 8, !tbaa !9
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %80 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 11
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  %82 = load ptr, ptr %9, align 8, !tbaa !9
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  %84 = getelementptr inbounds [1 x ptr], ptr %13, i64 0, i64 0
  %85 = call ptr %81(ptr noundef %82, i32 noundef 0, ptr noundef %83, i32 noundef 1, ptr noundef %84)
  store ptr %85, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1024, ptr %15, align 4, !tbaa !5
  %86 = load ptr, ptr @stdout, align 8, !tbaa !9
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %88 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 15
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  %90 = load ptr, ptr %9, align 8, !tbaa !9
  %91 = call ptr %89(ptr noundef %90, i32 noundef 0, i32 noundef 1, i64 noundef 1024, i32 noundef 0, ptr noundef null)
  store ptr %91, ptr %16, align 8, !tbaa !9
  %92 = load ptr, ptr @stdout, align 8, !tbaa !9
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef @.str.11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %94 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 15
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = load ptr, ptr %9, align 8, !tbaa !9
  %97 = call ptr %95(ptr noundef %96, i32 noundef 0, i32 noundef 1, i64 noundef 1024, i32 noundef 0, ptr noundef null)
  store ptr %97, ptr %17, align 8, !tbaa !9
  %98 = load ptr, ptr @stdout, align 8, !tbaa !9
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %100 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 15
  %101 = load ptr, ptr %100, align 8, !tbaa !20
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = call ptr %101(ptr noundef %102, i32 noundef 0, i32 noundef 1, i64 noundef 1024, i32 noundef 0, ptr noundef null)
  store ptr %103, ptr %18, align 8, !tbaa !9
  %104 = call ptr @llvm.stacksave.p0()
  store ptr %104, ptr %19, align 8
  %105 = alloca i8, i64 1024, align 16
  %106 = alloca i8, i64 1024, align 16
  %107 = alloca i8, i64 1024, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %122, %44
  %109 = load i32, ptr %20, align 4, !tbaa !5
  %110 = icmp slt i32 %109, 1024
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %125

112:                                              ; preds = %108
  %113 = load i32, ptr %20, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %105, i64 %114
  store i8 1, ptr %115, align 1, !tbaa !21
  %116 = load i32, ptr %20, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %106, i64 %117
  store i8 2, ptr %118, align 1, !tbaa !21
  %119 = load i32, ptr %20, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i8, ptr %107, i64 %120
  store i8 0, ptr %121, align 1, !tbaa !21
  br label %122

122:                                              ; preds = %112
  %123 = load i32, ptr %20, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %20, align 4, !tbaa !5
  br label %108, !llvm.loop !22

125:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %126 = load ptr, ptr %16, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.TpuBufferHandle, ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !24
  store ptr %128, ptr %21, align 8, !tbaa !9
  %129 = load ptr, ptr @stdout, align 8, !tbaa !9
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str.12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %131 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 18
  %132 = load ptr, ptr %131, align 8, !tbaa !27
  %133 = load ptr, ptr %9, align 8, !tbaa !9
  %134 = load ptr, ptr %16, align 8, !tbaa !9
  %135 = getelementptr inbounds [1 x ptr], ptr %21, i64 0, i64 0
  %136 = call ptr %132(ptr noundef %133, ptr noundef %105, ptr noundef %134, i32 noundef 1, ptr noundef %135)
  store ptr %136, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %137 = load ptr, ptr %16, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.TpuBufferHandle, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !24
  store ptr %139, ptr %23, align 8, !tbaa !9
  %140 = load ptr, ptr @stdout, align 8, !tbaa !9
  %141 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %142 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 18
  %143 = load ptr, ptr %142, align 8, !tbaa !27
  %144 = load ptr, ptr %9, align 8, !tbaa !9
  %145 = load ptr, ptr %17, align 8, !tbaa !9
  %146 = getelementptr inbounds [1 x ptr], ptr %23, i64 0, i64 0
  %147 = call ptr %143(ptr noundef %144, ptr noundef %106, ptr noundef %145, i32 noundef 1, ptr noundef %146)
  store ptr %147, ptr %24, align 8, !tbaa !9
  %148 = load ptr, ptr @stdout, align 8, !tbaa !9
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  %150 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %150, ptr %26, align 8, !tbaa !9
  %151 = getelementptr inbounds ptr, ptr %26, i64 1
  %152 = load ptr, ptr %17, align 8, !tbaa !9
  store ptr %152, ptr %151, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %153 = load ptr, ptr %18, align 8, !tbaa !9
  store ptr %153, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  %154 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %154, ptr %28, align 8, !tbaa !9
  %155 = getelementptr inbounds ptr, ptr %28, i64 1
  %156 = load ptr, ptr %24, align 8, !tbaa !9
  store ptr %156, ptr %155, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %157 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 13
  %158 = load ptr, ptr %157, align 8, !tbaa !28
  %159 = load ptr, ptr %9, align 8, !tbaa !9
  %160 = load ptr, ptr %14, align 8, !tbaa !9
  %161 = getelementptr inbounds [2 x ptr], ptr %26, i64 0, i64 0
  %162 = getelementptr inbounds [1 x ptr], ptr %27, i64 0, i64 0
  %163 = getelementptr inbounds [2 x ptr], ptr %28, i64 0, i64 0
  %164 = call ptr %158(ptr noundef %159, ptr noundef %160, i32 noundef 2, ptr noundef %161, i32 noundef 1, ptr noundef %162, ptr noundef byval(%struct.DeviceAssignment) align 8 %25, i32 noundef 2, ptr noundef %163)
  store ptr %164, ptr %29, align 8, !tbaa !9
  %165 = load ptr, ptr @stdout, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %167 = load ptr, ptr %29, align 8, !tbaa !9
  store ptr %167, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %168 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 19
  %169 = load ptr, ptr %168, align 8, !tbaa !29
  %170 = load ptr, ptr %9, align 8, !tbaa !9
  %171 = load ptr, ptr %18, align 8, !tbaa !9
  %172 = getelementptr inbounds [1 x ptr], ptr %30, i64 0, i64 0
  %173 = call ptr %169(ptr noundef %170, ptr noundef %171, ptr noundef %107, i32 noundef 1, ptr noundef %172)
  store ptr %173, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %174 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 24
  %175 = load ptr, ptr %174, align 8, !tbaa !30
  %176 = load ptr, ptr %31, align 8, !tbaa !9
  %177 = call ptr %175(ptr noundef %176, i64 noundef 10000000)
  store ptr %177, ptr %32, align 8, !tbaa !9
  %178 = load ptr, ptr %32, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.TpuStatus, ptr %178, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !31
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %191

182:                                              ; preds = %125
  %183 = load ptr, ptr @stdout, align 8, !tbaa !9
  %184 = load ptr, ptr %32, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.TpuStatus, ptr %184, i32 0, i32 0
  %186 = load i32, ptr %185, align 8, !tbaa !31
  %187 = load ptr, ptr %32, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.TpuStatus, ptr %187, i32 0, i32 1
  %189 = load ptr, ptr %188, align 8, !tbaa !33
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str.15, i32 noundef %186, ptr noundef %189) #6
  br label %191

191:                                              ; preds = %182, %125
  %192 = load ptr, ptr @stdout, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef @.str.16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %194 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 12
  %195 = load ptr, ptr %194, align 8, !tbaa !34
  %196 = load ptr, ptr %9, align 8, !tbaa !9
  %197 = load ptr, ptr %14, align 8, !tbaa !9
  %198 = getelementptr inbounds [1 x ptr], ptr %30, i64 0, i64 0
  %199 = call ptr %195(ptr noundef %196, ptr noundef %197, i32 noundef 1, ptr noundef %198)
  store ptr %199, ptr %33, align 8, !tbaa !9
  %200 = load ptr, ptr @stdout, align 8, !tbaa !9
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %202 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 17
  %203 = load ptr, ptr %202, align 8, !tbaa !35
  %204 = load ptr, ptr %9, align 8, !tbaa !9
  %205 = load ptr, ptr %16, align 8, !tbaa !9
  %206 = call ptr %203(ptr noundef %204, ptr noundef %205, i32 noundef 0, ptr noundef null)
  store ptr %206, ptr %34, align 8, !tbaa !9
  %207 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 25
  %208 = load ptr, ptr %207, align 8, !tbaa !36
  %209 = load ptr, ptr %34, align 8, !tbaa !9
  call void %208(ptr noundef %209)
  %210 = load ptr, ptr @stdout, align 8, !tbaa !9
  %211 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %212 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 17
  %213 = load ptr, ptr %212, align 8, !tbaa !35
  %214 = load ptr, ptr %9, align 8, !tbaa !9
  %215 = load ptr, ptr %17, align 8, !tbaa !9
  %216 = call ptr %213(ptr noundef %214, ptr noundef %215, i32 noundef 0, ptr noundef null)
  store ptr %216, ptr %35, align 8, !tbaa !9
  %217 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 25
  %218 = load ptr, ptr %217, align 8, !tbaa !36
  %219 = load ptr, ptr %35, align 8, !tbaa !9
  call void %218(ptr noundef %219)
  %220 = load ptr, ptr @stdout, align 8, !tbaa !9
  %221 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef @.str.17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %222 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 17
  %223 = load ptr, ptr %222, align 8, !tbaa !35
  %224 = load ptr, ptr %9, align 8, !tbaa !9
  %225 = load ptr, ptr %18, align 8, !tbaa !9
  %226 = call ptr %223(ptr noundef %224, ptr noundef %225, i32 noundef 0, ptr noundef null)
  store ptr %226, ptr %36, align 8, !tbaa !9
  %227 = getelementptr inbounds %struct.TpuDriverFn, ptr %7, i32 0, i32 25
  %228 = load ptr, ptr %227, align 8, !tbaa !36
  %229 = load ptr, ptr %36, align 8, !tbaa !9
  call void %228(ptr noundef %229)
  %230 = load ptr, ptr @stdout, align 8, !tbaa !9
  %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %230, ptr noundef @.str.18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  store i64 0, ptr %37, align 8, !tbaa !37
  br label %232

232:                                              ; preds = %243, %191
  %233 = load i64, ptr %37, align 8, !tbaa !37
  %234 = icmp ult i64 %233, 1024
  br i1 %234, label %236, label %235

235:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  br label %246

236:                                              ; preds = %232
  %237 = load ptr, ptr @stdout, align 8, !tbaa !9
  %238 = load i64, ptr %37, align 8, !tbaa !37
  %239 = getelementptr inbounds i8, ptr %107, i64 %238
  %240 = load i8, ptr %239, align 1, !tbaa !21
  %241 = sext i8 %240 to i32
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %237, ptr noundef @.str.19, i32 noundef %241) #6
  br label %243

243:                                              ; preds = %236
  %244 = load i64, ptr %37, align 8, !tbaa !37
  %245 = add i64 %244, 1
  store i64 %245, ptr %37, align 8, !tbaa !37
  br label %232, !llvm.loop !38

246:                                              ; preds = %235
  %247 = load ptr, ptr %8, align 8, !tbaa !9
  %248 = call i32 @dlclose(ptr noundef %247) #6
  call void @exit(i32 noundef 0) #7
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

; Function Attrs: nounwind
declare i32 @dlclose(ptr noundef) #2

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 "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 = { noreturn 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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 216}
!12 = !{!"TpuDriverFn", !10, i64 0, !10, i64 8, !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, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 32}
!15 = !{!12, !10, i64 40}
!16 = !{!12, !10, i64 72}
!17 = !{!18, !10, i64 8}
!18 = !{!"TpuCompiledProgramHandle", !10, i64 0, !10, i64 8}
!19 = !{!12, !10, i64 88}
!20 = !{!12, !10, i64 120}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !10, i64 8}
!25 = !{!"TpuBufferHandle", !10, i64 0, !10, i64 8, !26, i64 16}
!26 = !{!"long", !7, i64 0}
!27 = !{!12, !10, i64 144}
!28 = !{!12, !10, i64 104}
!29 = !{!12, !10, i64 152}
!30 = !{!12, !10, i64 192}
!31 = !{!32, !6, i64 0}
!32 = !{!"TpuStatus", !6, i64 0, !10, i64 8}
!33 = !{!32, !10, i64 8}
!34 = !{!12, !10, i64 96}
!35 = !{!12, !10, i64 136}
!36 = !{!12, !10, i64 200}
!37 = !{!26, !26, i64 0}
!38 = distinct !{!38, !23}


; 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.TpuDriverFn = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.DeviceAssignment = type { ptr, i32 }

@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [201 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @LoadAndInitializeDriver(ptr noundef, ptr 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 {
  %3 = alloca %struct.TpuDriverFn, align 8
  %4 = alloca [1 x ptr], align 8
  %5 = alloca [1 x ptr], align 8
  %6 = alloca [1 x ptr], align 8
  %7 = alloca %struct.DeviceAssignment, align 8
  %8 = alloca [2 x ptr], align 16
  %9 = alloca [1 x ptr], align 8
  %10 = alloca [2 x ptr], align 16
  %11 = alloca [1 x ptr], align 8
  %12 = icmp eq i32 %0, 2
  br i1 %12, label %13, label %16

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %13, %2
  %.052 = phi ptr [ %15, %13 ], [ @.str.2, %2 ]
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %3) #7
  %17 = call ptr @LoadAndInitializeDriver(ptr noundef %.052, ptr noundef nonnull %3)
  %18 = load ptr, ptr @stdout, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.3) #7
  %20 = load ptr, ptr @stdout, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %3, i64 216
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = call ptr (...) %22() #7
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.4, ptr noundef %23) #7
  %25 = load ptr, ptr @stdout, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.5) #7
  %27 = load ptr, ptr %3, align 8, !tbaa !11
  %28 = call ptr %27(ptr noundef nonnull @.str.6) #7
  %29 = load ptr, ptr @stdout, align 8, !tbaa !5
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.7) #7
  %31 = getelementptr inbounds i8, ptr %3, i64 32
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = call ptr %32(ptr noundef %28) #7
  %34 = getelementptr inbounds i8, ptr %3, i64 40
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  call void %35(ptr noundef %33) #7
  %36 = load ptr, ptr @stdout, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.9) #7
  %38 = getelementptr inbounds i8, ptr %3, i64 72
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = call ptr %39(ptr noundef %28, ptr noundef nonnull @.str.8, i32 noundef 1, i32 noundef 0, ptr noundef null) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !15
  store ptr %42, ptr %4, align 8, !tbaa !5
  %43 = load ptr, ptr @stdout, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.10) #7
  %45 = getelementptr inbounds i8, ptr %3, i64 88
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = call ptr %46(ptr noundef %28, i32 noundef 0, ptr noundef %40, i32 noundef 1, ptr noundef nonnull %4) #7
  %48 = load ptr, ptr @stdout, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.11) #7
  %50 = getelementptr inbounds i8, ptr %3, i64 120
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = call ptr %51(ptr noundef %28, i32 noundef 0, i32 noundef 1, i64 noundef 1024, i32 noundef 0, ptr noundef null) #7
  %53 = load ptr, ptr @stdout, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.11) #7
  %55 = load ptr, ptr %50, align 8, !tbaa !18
  %56 = call ptr %55(ptr noundef %28, i32 noundef 0, i32 noundef 1, i64 noundef 1024, i32 noundef 0, ptr noundef null) #7
  %57 = load ptr, ptr @stdout, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.11) #7
  %59 = load ptr, ptr %50, align 8, !tbaa !18
  %60 = call ptr %59(ptr noundef %28, i32 noundef 0, i32 noundef 1, i64 noundef 1024, i32 noundef 0, ptr noundef null) #7
  %61 = alloca [1024 x i8], align 16
  %62 = alloca [1024 x i8], align 16
  %63 = alloca [1024 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %61, i8 1, i64 1024, i1 false), !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %62, i8 2, i64 1024, i1 false), !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %63, i8 0, i64 1024, i1 false), !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %64 = getelementptr inbounds i8, ptr %52, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  store ptr %65, ptr %5, align 8, !tbaa !5
  %66 = load ptr, ptr @stdout, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.12) #7
  %68 = getelementptr inbounds i8, ptr %3, i64 144
  %69 = load ptr, ptr %68, align 8, !tbaa !23
  %70 = call ptr %69(ptr noundef %28, ptr noundef nonnull %61, ptr noundef %52, i32 noundef 1, ptr noundef nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %71 = load ptr, ptr %64, align 8, !tbaa !20
  store ptr %71, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr @stdout, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.12) #7
  %74 = load ptr, ptr %68, align 8, !tbaa !23
  %75 = call ptr %74(ptr noundef %28, ptr noundef nonnull %62, ptr noundef %56, i32 noundef 1, ptr noundef nonnull %6) #7
  %76 = load ptr, ptr @stdout, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  store ptr %52, ptr %8, align 16, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %56, ptr %78, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store ptr %60, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  store ptr %70, ptr %10, align 16, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %75, ptr %79, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %3, i64 104
  %81 = load ptr, ptr %80, align 8, !tbaa !24
  %82 = call ptr %81(ptr noundef %28, ptr noundef %47, i32 noundef 2, ptr noundef nonnull %8, i32 noundef 1, ptr noundef nonnull %9, ptr noundef nonnull byval(%struct.DeviceAssignment) align 8 %7, i32 noundef 2, ptr noundef nonnull %10) #7
  %83 = load ptr, ptr @stdout, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store ptr %82, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %3, i64 152
  %86 = load ptr, ptr %85, align 8, !tbaa !25
  %87 = call ptr %86(ptr noundef %28, ptr noundef %60, ptr noundef nonnull %63, i32 noundef 1, ptr noundef nonnull %11) #7
  %88 = getelementptr inbounds i8, ptr %3, i64 192
  %89 = load ptr, ptr %88, align 8, !tbaa !26
  %90 = call ptr %89(ptr noundef %87, i64 noundef 10000000) #7
  %91 = load i32, ptr %90, align 8, !tbaa !27
  %.not = icmp eq i32 %91, 0
  br i1 %.not, label %97, label %92

92:                                               ; preds = %16
  %93 = load ptr, ptr @stdout, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %90, i64 8
  %95 = load ptr, ptr %94, align 8, !tbaa !30
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.15, i32 noundef %91, ptr noundef %95) #7
  br label %97

97:                                               ; preds = %92, %16
  %98 = load ptr, ptr @stdout, align 8, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.16) #7
  %100 = getelementptr inbounds i8, ptr %3, i64 96
  %101 = load ptr, ptr %100, align 8, !tbaa !31
  %102 = call ptr %101(ptr noundef %28, ptr noundef %47, i32 noundef 1, ptr noundef nonnull %11) #7
  %103 = load ptr, ptr @stdout, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.17) #7
  %105 = getelementptr inbounds i8, ptr %3, i64 136
  %106 = load ptr, ptr %105, align 8, !tbaa !32
  %107 = call ptr %106(ptr noundef %28, ptr noundef nonnull %52, i32 noundef 0, ptr noundef null) #7
  %108 = getelementptr inbounds i8, ptr %3, i64 200
  %109 = load ptr, ptr %108, align 8, !tbaa !33
  call void %109(ptr noundef %107) #7
  %110 = load ptr, ptr @stdout, align 8, !tbaa !5
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef nonnull @.str.17) #7
  %112 = load ptr, ptr %105, align 8, !tbaa !32
  %113 = call ptr %112(ptr noundef %28, ptr noundef %56, i32 noundef 0, ptr noundef null) #7
  %114 = load ptr, ptr %108, align 8, !tbaa !33
  call void %114(ptr noundef %113) #7
  %115 = load ptr, ptr @stdout, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef nonnull @.str.17) #7
  %117 = load ptr, ptr %105, align 8, !tbaa !32
  %118 = call ptr %117(ptr noundef %28, ptr noundef %60, i32 noundef 0, ptr noundef null) #7
  %119 = load ptr, ptr %108, align 8, !tbaa !33
  call void %119(ptr noundef %118) #7
  %120 = load ptr, ptr @stdout, align 8, !tbaa !5
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.18) #7
  br label %124

122:                                              ; preds = %124
  %123 = call i32 @dlclose(ptr noundef %17) #7
  call void @exit(i32 noundef 0) #8
  unreachable

124:                                              ; preds = %97, %124
  %.056 = phi i64 [ 0, %97 ], [ %130, %124 ]
  %125 = load ptr, ptr @stdout, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %63, i64 %.056
  %127 = load i8, ptr %126, align 1, !tbaa !19
  %128 = sext i8 %127 to i32
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef nonnull @.str.19, i32 noundef %128) #7
  %130 = add nuw nsw i64 %.056, 1
  %exitcond.not = icmp eq i64 %130, 1024
  br i1 %exitcond.not, label %122, label %124, !llvm.loop !34
}

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

; Function Attrs: nounwind
declare i32 @dlclose(ptr noundef) local_unnamed_addr #6

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 = { 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 #3 = { noreturn 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 = { noreturn 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn 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, !6, i64 216}
!10 = !{!"TpuDriverFn", !6, i64 0, !6, i64 8, !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, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216}
!11 = !{!10, !6, i64 0}
!12 = !{!10, !6, i64 32}
!13 = !{!10, !6, i64 40}
!14 = !{!10, !6, i64 72}
!15 = !{!16, !6, i64 8}
!16 = !{!"TpuCompiledProgramHandle", !6, i64 0, !6, i64 8}
!17 = !{!10, !6, i64 88}
!18 = !{!10, !6, i64 120}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !6, i64 8}
!21 = !{!"TpuBufferHandle", !6, i64 0, !6, i64 8, !22, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{!10, !6, i64 144}
!24 = !{!10, !6, i64 104}
!25 = !{!10, !6, i64 152}
!26 = !{!10, !6, i64 192}
!27 = !{!28, !29, i64 0}
!28 = !{!"TpuStatus", !29, i64 0, !6, i64 8}
!29 = !{!"int", !7, i64 0}
!30 = !{!28, !6, i64 8}
!31 = !{!10, !6, i64 96}
!32 = !{!10, !6, i64 136}
!33 = !{!10, !6, i64 200}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


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