; LLVM IR from bjourne/fast_snn_fpga :: src (sim_params_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.sim_result = type { i32, i64, ptr }
%struct.ocl_ctx_buf = type { ptr, i64, i64 }
%struct.sim_config = type { i32, ptr, i8, ptr, i32, i32, i8, i32, i32, i8, double, double, double, double, double, double, double, i8, i32, ptr, i32, ptr, ptr, i32, ptr, ptr }
%struct.synapse_index = type { ptr, ptr, i32, i32, i32 }
%struct.ocl_ctx = type { ptr, ptr, ptr, i64, [20 x %struct.ocl_ctx_buf], i64, ptr, i64, ptr, ptr, i32 }

@JIT_MULTI_KERNELS = external dso_local global [2 x ptr], align 16
@HORIZ_MULTI_KERNELS = external dso_local global [2 x ptr], align 16
@GMEM_MULTI_KERNELS = external dso_local global [2 x ptr], align 16
@DEFAULT_KERNEL = external dso_local global [1 x ptr], align 8
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.sim_config_run_on_opencl = external hidden unnamed_addr constant [50 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [26 x i8], align 1
@__const.sim_config_run_on_opencl.wg_size = external hidden unnamed_addr constant [1 x i64], align 8

; Function Attrs: nounwind uwtable
define dso_local void @sim_config_run_on_opencl(ptr dead_on_unwind noalias writable sret(%struct.sim_result) align 8 %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca [512 x i8], align 16
  %22 = alloca i64, align 8
  %23 = alloca [9 x %struct.ocl_ctx_buf], align 16
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca double, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca double, align 8
  %33 = alloca i32, align 4
  %34 = alloca float, align 4
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca double, align 8
  %47 = alloca float, align 4
  %48 = alloca float, align 4
  %49 = alloca float, align 4
  %50 = alloca float, align 4
  %51 = alloca float, align 4
  %52 = alloca ptr, align 8
  %53 = alloca ptr, align 8
  %54 = alloca ptr, align 8
  %55 = alloca ptr, align 8
  %56 = alloca ptr, align 8
  %57 = alloca ptr, align 8
  %58 = alloca ptr, align 8
  %59 = alloca ptr, align 8
  %60 = alloca ptr, align 8
  %61 = alloca ptr, align 8
  %62 = alloca i32, align 4
  %63 = alloca ptr, align 8
  %64 = alloca i64, align 8
  %65 = alloca [1 x i64], align 8
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca i64, align 8
  %69 = alloca ptr, align 8
  %70 = alloca ptr, align 8
  %71 = alloca [1 x i32], align 4
  store ptr %1, ptr %3, align 8, !tbaa !5
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.sim_config, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !9
  %75 = icmp ugt i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %2
  br label %78

77:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 50, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #9
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.sim_config, ptr %79, i32 0, i32 6
  %81 = load i8, ptr %80, align 8, !tbaa !14, !range !15, !noundef !16
  %82 = trunc i8 %81 to i1
  %83 = zext i1 %82 to i8
  store i8 %83, ptr %4, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  store i64 8, ptr %5, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  store i64 4, ptr %6, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  store i64 1, ptr %7, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store i64 4, ptr %8, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  store i64 8, ptr %9, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %84 = load i8, ptr %4, align 1, !tbaa !17, !range !15, !noundef !16
  %85 = trunc i8 %84 to i1
  br i1 %85, label %86, label %88

86:                                               ; preds = %78
  %87 = load i64, ptr %5, align 8, !tbaa !18
  br label %90

88:                                               ; preds = %78
  %89 = load i64, ptr %6, align 8, !tbaa !18
  br label %90

90:                                               ; preds = %88, %86
  %91 = phi i64 [ %87, %86 ], [ %89, %88 ]
  store i64 %91, ptr %10, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  store ptr null, ptr %12, align 8, !tbaa !5
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.sim_config, ptr %92, i32 0, i32 9
  %94 = load i8, ptr %93, align 4, !tbaa !21, !range !15, !noundef !16
  %95 = trunc i8 %94 to i1
  br i1 %95, label %96, label %111

96:                                               ; preds = %90
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.sim_config, ptr %97, i32 0, i32 8
  %99 = load i32, ptr %98, align 8, !tbaa !22
  %100 = icmp eq i32 %99, 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %96
  store i32 2, ptr %11, align 4, !tbaa !20
  store ptr @JIT_MULTI_KERNELS, ptr %12, align 8, !tbaa !5
  br label %110

102:                                              ; preds = %96
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.sim_config, ptr %103, i32 0, i32 8
  %105 = load i32, ptr %104, align 8, !tbaa !22
  %106 = icmp eq i32 %105, 2
  br i1 %106, label %107, label %108

107:                                              ; preds = %102
  store i32 2, ptr %11, align 4, !tbaa !20
  store ptr @HORIZ_MULTI_KERNELS, ptr %12, align 8, !tbaa !5
  br label %109

108:                                              ; preds = %102
  store i32 2, ptr %11, align 4, !tbaa !20
  store ptr @GMEM_MULTI_KERNELS, ptr %12, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %108, %107
  br label %110

110:                                              ; preds = %109, %101
  br label %112

111:                                              ; preds = %90
  store i32 1, ptr %11, align 4, !tbaa !20
  store ptr @DEFAULT_KERNEL, ptr %12, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %111, %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.sim_config, ptr %113, i32 0, i32 25
  %115 = load ptr, ptr %114, align 8, !tbaa !23
  %116 = getelementptr inbounds %struct.synapse_index, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 4, !tbaa !24
  store i32 %117, ptr %13, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %118 = load i32, ptr %13, align 4, !tbaa !20
  store i32 %118, ptr %14, align 4, !tbaa !20
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.sim_config, ptr %119, i32 0, i32 7
  %121 = load i32, ptr %120, align 4, !tbaa !26
  %122 = icmp eq i32 %121, 0
  br i1 %122, label %123, label %127

123:                                              ; preds = %112
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.sim_config, ptr %124, i32 0, i32 18
  %126 = load i32, ptr %125, align 4, !tbaa !27
  store i32 %126, ptr %14, align 4, !tbaa !20
  br label %189

127:                                              ; preds = %112
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.sim_config, ptr %128, i32 0, i32 7
  %130 = load i32, ptr %129, align 4, !tbaa !26
  %131 = icmp eq i32 %130, 2
  br i1 %131, label %132, label %187

132:                                              ; preds = %127
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.sim_config, ptr %133, i32 0, i32 18
  %135 = load i32, ptr %134, align 4, !tbaa !27
  store i32 %135, ptr %14, align 4, !tbaa !20
  %136 = load i32, ptr %14, align 4, !tbaa !20
  %137 = icmp eq i32 %136, 77248
  br i1 %137, label %138, label %139

138:                                              ; preds = %132
  br label %140

139:                                              ; preds = %132
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.5, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

140:                                              ; preds = %138
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.sim_config, ptr %141, i32 0, i32 8
  %143 = load i32, ptr %142, align 8, !tbaa !22
  %144 = icmp eq i32 %143, 2
  br i1 %144, label %145, label %157

145:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.sim_config, ptr %146, i32 0, i32 25
  %148 = load ptr, ptr %147, align 8, !tbaa !23
  %149 = load i32, ptr %14, align 4, !tbaa !20
  %150 = call ptr @synapse_index_frontier_index(ptr noundef %148, i32 noundef %149, i32 noundef 16, i32 noundef 8)
  store ptr %150, ptr %15, align 8, !tbaa !5
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.sim_config, ptr %151, i32 0, i32 25
  %153 = load ptr, ptr %152, align 8, !tbaa !23
  call void @synapse_index_free(ptr noundef %153)
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.sim_config, ptr %155, i32 0, i32 25
  store ptr %154, ptr %156, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %186

157:                                              ; preds = %140
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.sim_config, ptr %158, i32 0, i32 8
  %160 = load i32, ptr %159, align 8, !tbaa !22
  %161 = icmp eq i32 %160, 1
  br i1 %161, label %162, label %174

162:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.sim_config, ptr %163, i32 0, i32 25
  %165 = load ptr, ptr %164, align 8, !tbaa !23
  %166 = load i32, ptr %14, align 4, !tbaa !20
  %167 = call ptr @synapse_index_align_delay_classes(ptr noundef %165, i32 noundef %166, i32 noundef 8)
  store ptr %167, ptr %16, align 8, !tbaa !5
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.sim_config, ptr %168, i32 0, i32 25
  %170 = load ptr, ptr %169, align 8, !tbaa !23
  call void @synapse_index_free(ptr noundef %170)
  %171 = load ptr, ptr %16, align 8, !tbaa !5
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.sim_config, ptr %172, i32 0, i32 25
  store ptr %171, ptr %173, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %185

174:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.sim_config, ptr %175, i32 0, i32 25
  %177 = load ptr, ptr %176, align 8, !tbaa !23
  %178 = call ptr @synapse_index_merge_delays(ptr noundef %177)
  store ptr %178, ptr %17, align 8, !tbaa !5
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.sim_config, ptr %179, i32 0, i32 25
  %181 = load ptr, ptr %180, align 8, !tbaa !23
  call void @synapse_index_free(ptr noundef %181)
  %182 = load ptr, ptr %17, align 8, !tbaa !5
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.sim_config, ptr %183, i32 0, i32 25
  store ptr %182, ptr %184, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %185

185:                                              ; preds = %174, %162
  br label %186

186:                                              ; preds = %185, %145
  br label %188

187:                                              ; preds = %127
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.5, i32 noundef 104, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

188:                                              ; preds = %186
  br label %189

189:                                              ; preds = %188, %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.sim_config, ptr %190, i32 0, i32 25
  %192 = load ptr, ptr %191, align 8, !tbaa !23
  %193 = getelementptr inbounds %struct.synapse_index, ptr %192, i32 0, i32 4
  %194 = load i32, ptr %193, align 8, !tbaa !28
  store i32 %194, ptr %18, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.sim_config, ptr %195, i32 0, i32 4
  %197 = load i32, ptr %196, align 8, !tbaa !29
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.sim_config, ptr %198, i32 0, i32 5
  %200 = load i32, ptr %199, align 4, !tbaa !30
  %201 = call ptr @ocl_ctx_init(i32 noundef %197, i32 noundef %200, i1 noundef zeroext true)
  store ptr %201, ptr %19, align 8, !tbaa !5
  %202 = load ptr, ptr %19, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.ocl_ctx, ptr %202, i32 0, i32 10
  %204 = load i32, ptr %203, align 8, !tbaa !31
  call void @ocl_check_err(i32 noundef %204, ptr noundef @.str.5, i32 noundef 113)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !20
  br label %205

205:                                              ; preds = %213, %189
  %206 = load i32, ptr %20, align 4, !tbaa !20
  %207 = load i32, ptr %11, align 4, !tbaa !20
  %208 = icmp ult i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %216

210:                                              ; preds = %205
  %211 = load ptr, ptr %19, align 8, !tbaa !5
  %212 = call i32 @ocl_ctx_add_queue(ptr noundef %211)
  call void @ocl_check_err(i32 noundef %212, ptr noundef @.str.5, i32 noundef 115)
  br label %213

213:                                              ; preds = %210
  %214 = load i32, ptr %20, align 4, !tbaa !20
  %215 = add i32 %214, 1
  store i32 %215, ptr %20, align 4, !tbaa !20
  br label %205, !llvm.loop !33

216:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 512, ptr %21) #9
  %217 = getelementptr inbounds [512 x i8], ptr %21, i64 0, i64 0
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.sim_config, ptr %218, i32 0, i32 6
  %220 = load i8, ptr %219, align 8, !tbaa !14, !range !15, !noundef !16
  %221 = trunc i8 %220 to i1
  %222 = zext i1 %221 to i32
  %223 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %217, ptr noundef @.str.8, i32 noundef %222, i32 noundef 1, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 16, i32 noundef 16) #9
  %224 = load ptr, ptr %19, align 8, !tbaa !5
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.sim_config, ptr %225, i32 0, i32 3
  %227 = load ptr, ptr %226, align 8, !tbaa !35
  %228 = getelementptr inbounds [512 x i8], ptr %21, i64 0, i64 0
  %229 = load i32, ptr %11, align 4, !tbaa !20
  %230 = zext i32 %229 to i64
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = call i32 @ocl_ctx_load_kernels(ptr noundef %224, ptr noundef %227, ptr noundef %228, i64 noundef %230, ptr noundef %231)
  call void @ocl_check_err(i32 noundef %232, ptr noundef @.str.5, i32 noundef 129)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %233 = load ptr, ptr %3, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.sim_config, ptr %233, i32 0, i32 23
  %235 = load i32, ptr %234, align 8, !tbaa !36
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.sim_config, ptr %236, i32 0, i32 0
  %238 = load i32, ptr %237, align 8, !tbaa !9
  %239 = icmp ugt i32 %235, %238
  br i1 %239, label %240, label %244

240:                                              ; preds = %216
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.sim_config, ptr %241, i32 0, i32 0
  %243 = load i32, ptr %242, align 8, !tbaa !9
  br label %248

244:                                              ; preds = %216
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.sim_config, ptr %245, i32 0, i32 23
  %247 = load i32, ptr %246, align 8, !tbaa !36
  br label %248

248:                                              ; preds = %244, %240
  %249 = phi i32 [ %243, %240 ], [ %247, %244 ]
  %250 = zext i32 %249 to i64
  store i64 %250, ptr %22, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 216, ptr %23) #9
  %251 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i32 0, i32 0
  store ptr null, ptr %251, align 8, !tbaa !37
  %252 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i32 0, i32 1
  %253 = load i32, ptr %14, align 4, !tbaa !20
  %254 = zext i32 %253 to i64
  %255 = load i64, ptr %10, align 8, !tbaa !18
  %256 = mul i64 %254, %255
  store i64 %256, ptr %252, align 8, !tbaa !39
  %257 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i32 0, i32 2
  store i64 1, ptr %257, align 8, !tbaa !40
  %258 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 1
  %259 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %258, i32 0, i32 0
  store ptr null, ptr %259, align 8, !tbaa !37
  %260 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %258, i32 0, i32 1
  %261 = load i32, ptr %14, align 4, !tbaa !20
  %262 = zext i32 %261 to i64
  %263 = load i64, ptr %10, align 8, !tbaa !18
  %264 = mul i64 %262, %263
  store i64 %264, ptr %260, align 8, !tbaa !39
  %265 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %258, i32 0, i32 2
  store i64 4, ptr %265, align 8, !tbaa !40
  %266 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 2
  %267 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %266, i32 0, i32 0
  store ptr null, ptr %267, align 8, !tbaa !37
  %268 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %266, i32 0, i32 1
  %269 = load i32, ptr %14, align 4, !tbaa !20
  %270 = zext i32 %269 to i64
  %271 = load i64, ptr %7, align 8, !tbaa !18
  %272 = mul i64 %270, %271
  store i64 %272, ptr %268, align 8, !tbaa !39
  %273 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %266, i32 0, i32 2
  store i64 1, ptr %273, align 8, !tbaa !40
  %274 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 3
  %275 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %274, i32 0, i32 0
  store ptr null, ptr %275, align 8, !tbaa !37
  %276 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %274, i32 0, i32 1
  %277 = load i32, ptr %14, align 4, !tbaa !20
  %278 = zext i32 %277 to i64
  %279 = load i64, ptr %10, align 8, !tbaa !18
  %280 = mul i64 %278, %279
  store i64 %280, ptr %276, align 8, !tbaa !39
  %281 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %274, i32 0, i32 2
  store i64 1, ptr %281, align 8, !tbaa !40
  %282 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 4
  %283 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %282, i32 0, i32 0
  store ptr null, ptr %283, align 8, !tbaa !37
  %284 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %282, i32 0, i32 1
  %285 = load i64, ptr %22, align 8, !tbaa !18
  %286 = load ptr, ptr %3, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.sim_config, ptr %286, i32 0, i32 18
  %288 = load i32, ptr %287, align 4, !tbaa !27
  %289 = zext i32 %288 to i64
  %290 = mul i64 %285, %289
  %291 = load i64, ptr %7, align 8, !tbaa !18
  %292 = mul i64 %290, %291
  store i64 %292, ptr %284, align 8, !tbaa !39
  %293 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %282, i32 0, i32 2
  store i64 4, ptr %293, align 8, !tbaa !40
  %294 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 5
  %295 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %294, i32 0, i32 0
  store ptr null, ptr %295, align 8, !tbaa !37
  %296 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %294, i32 0, i32 1
  %297 = load i32, ptr %18, align 4, !tbaa !20
  %298 = zext i32 %297 to i64
  %299 = load i64, ptr %9, align 8, !tbaa !18
  %300 = mul i64 %298, %299
  store i64 %300, ptr %296, align 8, !tbaa !39
  %301 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %294, i32 0, i32 2
  store i64 4, ptr %301, align 8, !tbaa !40
  %302 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 6
  %303 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %302, i32 0, i32 0
  store ptr null, ptr %303, align 8, !tbaa !37
  %304 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %302, i32 0, i32 1
  %305 = load ptr, ptr %3, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.sim_config, ptr %305, i32 0, i32 25
  %307 = load ptr, ptr %306, align 8, !tbaa !23
  %308 = getelementptr inbounds %struct.synapse_index, ptr %307, i32 0, i32 2
  %309 = load i32, ptr %308, align 8, !tbaa !41
  %310 = load i32, ptr %13, align 4, !tbaa !20
  %311 = mul i32 %309, %310
  %312 = zext i32 %311 to i64
  %313 = load i64, ptr %8, align 8, !tbaa !18
  %314 = mul i64 %312, %313
  %315 = load i64, ptr %8, align 8, !tbaa !18
  %316 = add i64 %314, %315
  store i64 %316, ptr %304, align 8, !tbaa !39
  %317 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %302, i32 0, i32 2
  store i64 4, ptr %317, align 8, !tbaa !40
  %318 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 7
  %319 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %318, i32 0, i32 0
  store ptr null, ptr %319, align 8, !tbaa !37
  %320 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %318, i32 0, i32 1
  %321 = load ptr, ptr %3, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.sim_config, ptr %321, i32 0, i32 18
  %323 = load i32, ptr %322, align 4, !tbaa !27
  %324 = mul i32 %323, 64
  %325 = zext i32 %324 to i64
  %326 = load i64, ptr %6, align 8, !tbaa !18
  %327 = mul i64 %325, %326
  store i64 %327, ptr %320, align 8, !tbaa !39
  %328 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %318, i32 0, i32 2
  store i64 1, ptr %328, align 8, !tbaa !40
  %329 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %23, i64 8
  %330 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %329, i32 0, i32 0
  store ptr null, ptr %330, align 8, !tbaa !37
  %331 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %329, i32 0, i32 1
  %332 = load i64, ptr %8, align 8, !tbaa !18
  %333 = mul i64 %332, 50000000
  store i64 %333, ptr %331, align 8, !tbaa !39
  %334 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %329, i32 0, i32 2
  store i64 1, ptr %334, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store i64 0, ptr %24, align 8, !tbaa !18
  br label %335

335:                                              ; preds = %344, %248
  %336 = load i64, ptr %24, align 8, !tbaa !18
  %337 = icmp ult i64 %336, 9
  br i1 %337, label %339, label %338

338:                                              ; preds = %335
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %347

339:                                              ; preds = %335
  %340 = load ptr, ptr %19, align 8, !tbaa !5
  %341 = load i64, ptr %24, align 8, !tbaa !18
  %342 = getelementptr inbounds [9 x %struct.ocl_ctx_buf], ptr %23, i64 0, i64 %341
  %343 = call i32 @ocl_ctx_add_buffer(ptr noundef %340, ptr noundef byval(%struct.ocl_ctx_buf) align 8 %342)
  call void @ocl_check_err(i32 noundef %343, ptr noundef @.str.5, i32 noundef 168)
  br label %344

344:                                              ; preds = %339
  %345 = load i64, ptr %24, align 8, !tbaa !18
  %346 = add i64 %345, 1
  store i64 %346, ptr %24, align 8, !tbaa !18
  br label %335, !llvm.loop !42

347:                                              ; preds = %338
  %348 = load ptr, ptr %19, align 8, !tbaa !5
  %349 = load ptr, ptr %3, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.sim_config, ptr %349, i32 0, i32 25
  %351 = load ptr, ptr %350, align 8, !tbaa !23
  %352 = getelementptr inbounds %struct.synapse_index, ptr %351, i32 0, i32 1
  %353 = load ptr, ptr %352, align 8, !tbaa !43
  %354 = call i32 @ocl_ctx_write_buffer(ptr noundef %348, i64 noundef 0, i64 noundef 6, ptr noundef %353)
  call void @ocl_check_err(i32 noundef %354, ptr noundef @.str.5, i32 noundef 174)
  %355 = load ptr, ptr %19, align 8, !tbaa !5
  %356 = load ptr, ptr %3, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.sim_config, ptr %356, i32 0, i32 25
  %358 = load ptr, ptr %357, align 8, !tbaa !23
  %359 = getelementptr inbounds %struct.synapse_index, ptr %358, i32 0, i32 0
  %360 = load ptr, ptr %359, align 8, !tbaa !44
  %361 = call i32 @ocl_ctx_write_buffer(ptr noundef %355, i64 noundef 0, i64 noundef 5, ptr noundef %360)
  call void @ocl_check_err(i32 noundef %361, ptr noundef @.str.5, i32 noundef 179)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %362 = load i32, ptr %14, align 4, !tbaa !20
  %363 = zext i32 %362 to i64
  %364 = load i64, ptr %10, align 8, !tbaa !18
  %365 = call noalias ptr @calloc(i64 noundef %363, i64 noundef %364) #10
  store ptr %365, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 0, ptr %26, align 4, !tbaa !20
  br label %366

366:                                              ; preds = %389, %347
  %367 = load i32, ptr %26, align 4, !tbaa !20
  %368 = load i32, ptr %13, align 4, !tbaa !20
  %369 = icmp ult i32 %367, %368
  br i1 %369, label %371, label %370

370:                                              ; preds = %366
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %392

371:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %372 = load ptr, ptr %3, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.sim_config, ptr %372, i32 0, i32 19
  %374 = load ptr, ptr %373, align 8, !tbaa !45
  %375 = load i32, ptr %26, align 4, !tbaa !20
  %376 = zext i32 %375 to i64
  %377 = getelementptr inbounds double, ptr %374, i64 %376
  %378 = load double, ptr %377, align 8, !tbaa !46
  %379 = load ptr, ptr %3, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.sim_config, ptr %379, i32 0, i32 15
  %381 = load double, ptr %380, align 8, !tbaa !47
  %382 = fsub double %378, %381
  store double %382, ptr %27, align 8, !tbaa !46
  %383 = load ptr, ptr %25, align 8, !tbaa !5
  %384 = load i32, ptr %26, align 4, !tbaa !20
  %385 = zext i32 %384 to i64
  %386 = load double, ptr %27, align 8, !tbaa !46
  %387 = load i8, ptr %4, align 1, !tbaa !17, !range !15, !noundef !16
  %388 = trunc i8 %387 to i1
  call void @mprec_write_double(ptr noundef %383, i64 noundef %385, double noundef %386, i1 noundef zeroext %388)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %389

389:                                              ; preds = %371
  %390 = load i32, ptr %26, align 4, !tbaa !20
  %391 = add i32 %390, 1
  store i32 %391, ptr %26, align 4, !tbaa !20
  br label %366, !llvm.loop !48

392:                                              ; preds = %370
  %393 = load ptr, ptr %19, align 8, !tbaa !5
  %394 = load ptr, ptr %25, align 8, !tbaa !5
  %395 = call i32 @ocl_ctx_write_buffer(ptr noundef %393, i64 noundef 0, i64 noundef 0, ptr noundef %394)
  call void @ocl_check_err(i32 noundef %395, ptr noundef @.str.5, i32 noundef 189)
  %396 = load ptr, ptr %25, align 8, !tbaa !5
  call void @free(ptr noundef %396) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %397 = load i32, ptr %14, align 4, !tbaa !20
  %398 = zext i32 %397 to i64
  %399 = load i64, ptr %10, align 8, !tbaa !18
  %400 = call noalias ptr @calloc(i64 noundef %398, i64 noundef %399) #10
  store ptr %400, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !20
  br label %401

401:                                              ; preds = %444, %392
  %402 = load i32, ptr %30, align 4, !tbaa !20
  %403 = load ptr, ptr %3, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct.sim_config, ptr %403, i32 0, i32 20
  %405 = load i32, ptr %404, align 8, !tbaa !49
  %406 = icmp ult i32 %402, %405
  br i1 %406, label %408, label %407

407:                                              ; preds = %401
  store i32 11, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %447

408:                                              ; preds = %401
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %409 = load ptr, ptr %3, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.sim_config, ptr %409, i32 0, i32 21
  %411 = load ptr, ptr %410, align 8, !tbaa !50
  %412 = load i32, ptr %30, align 4, !tbaa !20
  %413 = zext i32 %412 to i64
  %414 = getelementptr inbounds double, ptr %411, i64 %413
  %415 = load double, ptr %414, align 8, !tbaa !46
  store double %415, ptr %32, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 0, ptr %33, align 4, !tbaa !20
  br label %416

416:                                              ; preds = %438, %408
  %417 = load i32, ptr %33, align 4, !tbaa !20
  %418 = load ptr, ptr %3, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.sim_config, ptr %418, i32 0, i32 22
  %420 = load ptr, ptr %419, align 8, !tbaa !51
  %421 = load i32, ptr %30, align 4, !tbaa !20
  %422 = zext i32 %421 to i64
  %423 = getelementptr inbounds i32, ptr %420, i64 %422
  %424 = load i32, ptr %423, align 4, !tbaa !20
  %425 = icmp ult i32 %417, %424
  br i1 %425, label %427, label %426

426:                                              ; preds = %416
  store i32 14, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %443

427:                                              ; preds = %416
  %428 = load ptr, ptr %28, align 8, !tbaa !5
  %429 = load i32, ptr %29, align 4, !tbaa !20
  %430 = zext i32 %429 to i64
  %431 = load double, ptr %32, align 8, !tbaa !46
  %432 = load ptr, ptr %3, align 8, !tbaa !5
  %433 = getelementptr inbounds %struct.sim_config, ptr %432, i32 0, i32 12
  %434 = load double, ptr %433, align 8, !tbaa !52
  %435 = fmul double %431, %434
  %436 = load i8, ptr %4, align 1, !tbaa !17, !range !15, !noundef !16
  %437 = trunc i8 %436 to i1
  call void @mprec_write_double(ptr noundef %428, i64 noundef %430, double noundef %435, i1 noundef zeroext %437)
  br label %438

438:                                              ; preds = %427
  %439 = load i32, ptr %33, align 4, !tbaa !20
  %440 = add i32 %439, 1
  store i32 %440, ptr %33, align 4, !tbaa !20
  %441 = load i32, ptr %29, align 4, !tbaa !20
  %442 = add i32 %441, 1
  store i32 %442, ptr %29, align 4, !tbaa !20
  br label %416, !llvm.loop !53

443:                                              ; preds = %426
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %444

444:                                              ; preds = %443
  %445 = load i32, ptr %30, align 4, !tbaa !20
  %446 = add i32 %445, 1
  store i32 %446, ptr %30, align 4, !tbaa !20
  br label %401, !llvm.loop !54

447:                                              ; preds = %407
  %448 = load ptr, ptr %19, align 8, !tbaa !5
  %449 = load ptr, ptr %28, align 8, !tbaa !5
  %450 = call i32 @ocl_ctx_write_buffer(ptr noundef %448, i64 noundef 0, i64 noundef 1, ptr noundef %449)
  call void @ocl_check_err(i32 noundef %450, ptr noundef @.str.5, i32 noundef 202)
  %451 = load ptr, ptr %28, align 8, !tbaa !5
  call void @free(ptr noundef %451) #9
  %452 = load ptr, ptr %19, align 8, !tbaa !5
  %453 = load ptr, ptr %3, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.sim_config, ptr %453, i32 0, i32 24
  %455 = load ptr, ptr %454, align 8, !tbaa !55
  %456 = call i32 @ocl_ctx_write_buffer(ptr noundef %452, i64 noundef 0, i64 noundef 4, ptr noundef %455)
  call void @ocl_check_err(i32 noundef %456, ptr noundef @.str.5, i32 noundef 207)
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store float 0.000000e+00, ptr %34, align 4, !tbaa !56
  %457 = load ptr, ptr %19, align 8, !tbaa !5
  %458 = load i64, ptr %6, align 8, !tbaa !18
  %459 = call i32 @ocl_ctx_fill_buffer(ptr noundef %457, i64 noundef 0, i64 noundef 7, ptr noundef %34, i64 noundef %458)
  call void @ocl_check_err(i32 noundef %459, ptr noundef @.str.5, i32 noundef 212)
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  store i64 8, ptr %35, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  store i64 1, ptr %36, align 8, !tbaa !18
  %460 = load i64, ptr %36, align 8, !tbaa !18
  %461 = icmp ne i64 %460, 0
  br i1 %461, label %462, label %463

462:                                              ; preds = %447
  br label %464

463:                                              ; preds = %447
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.5, i32 noundef 216, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

464:                                              ; preds = %462
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  %465 = load ptr, ptr %19, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.ocl_ctx, ptr %465, i32 0, i32 4
  %467 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %466, i64 0, i64 0
  store ptr %467, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %468 = load ptr, ptr %19, align 8, !tbaa !5
  %469 = getelementptr inbounds %struct.ocl_ctx, ptr %468, i32 0, i32 4
  %470 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %469, i64 0, i64 1
  store ptr %470, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %471 = load ptr, ptr %19, align 8, !tbaa !5
  %472 = getelementptr inbounds %struct.ocl_ctx, ptr %471, i32 0, i32 4
  %473 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %472, i64 0, i64 2
  store ptr %473, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #9
  %474 = load ptr, ptr %19, align 8, !tbaa !5
  %475 = getelementptr inbounds %struct.ocl_ctx, ptr %474, i32 0, i32 4
  %476 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %475, i64 0, i64 3
  store ptr %476, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %477 = load ptr, ptr %19, align 8, !tbaa !5
  %478 = getelementptr inbounds %struct.ocl_ctx, ptr %477, i32 0, i32 4
  %479 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %478, i64 0, i64 4
  store ptr %479, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #9
  %480 = load ptr, ptr %19, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.ocl_ctx, ptr %480, i32 0, i32 4
  %482 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %481, i64 0, i64 5
  store ptr %482, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  %483 = load ptr, ptr %19, align 8, !tbaa !5
  %484 = getelementptr inbounds %struct.ocl_ctx, ptr %483, i32 0, i32 4
  %485 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %484, i64 0, i64 6
  store ptr %485, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #9
  %486 = load ptr, ptr %19, align 8, !tbaa !5
  %487 = getelementptr inbounds %struct.ocl_ctx, ptr %486, i32 0, i32 4
  %488 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %487, i64 0, i64 7
  %489 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %488, i32 0, i32 0
  store ptr %489, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %490 = load ptr, ptr %19, align 8, !tbaa !5
  %491 = getelementptr inbounds %struct.ocl_ctx, ptr %490, i32 0, i32 4
  %492 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %491, i64 0, i64 8
  store ptr %492, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  %493 = load ptr, ptr %3, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.sim_config, ptr %493, i32 0, i32 16
  %495 = load double, ptr %494, align 8, !tbaa !58
  %496 = load ptr, ptr %3, align 8, !tbaa !5
  %497 = getelementptr inbounds %struct.sim_config, ptr %496, i32 0, i32 15
  %498 = load double, ptr %497, align 8, !tbaa !47
  %499 = fsub double %495, %498
  store double %499, ptr %46, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  %500 = load ptr, ptr %3, align 8, !tbaa !5
  %501 = getelementptr inbounds %struct.sim_config, ptr %500, i32 0, i32 11
  %502 = load double, ptr %501, align 8, !tbaa !59
  %503 = fptrunc double %502 to float
  store float %503, ptr %47, align 4, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  %504 = load ptr, ptr %3, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.sim_config, ptr %504, i32 0, i32 13
  %506 = load double, ptr %505, align 8, !tbaa !60
  %507 = fptrunc double %506 to float
  store float %507, ptr %48, align 4, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  %508 = load ptr, ptr %3, align 8, !tbaa !5
  %509 = getelementptr inbounds %struct.sim_config, ptr %508, i32 0, i32 14
  %510 = load double, ptr %509, align 8, !tbaa !61
  %511 = fptrunc double %510 to float
  store float %511, ptr %49, align 4, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  %512 = load ptr, ptr %3, align 8, !tbaa !5
  %513 = getelementptr inbounds %struct.sim_config, ptr %512, i32 0, i32 10
  %514 = load double, ptr %513, align 8, !tbaa !62
  %515 = fptrunc double %514 to float
  store float %515, ptr %50, align 4, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #9
  %516 = load double, ptr %46, align 8, !tbaa !46
  %517 = fptrunc double %516 to float
  store float %517, ptr %51, align 4, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #9
  %518 = load ptr, ptr %3, align 8, !tbaa !5
  %519 = getelementptr inbounds %struct.sim_config, ptr %518, i32 0, i32 11
  store ptr %519, ptr %52, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %520 = load ptr, ptr %3, align 8, !tbaa !5
  %521 = getelementptr inbounds %struct.sim_config, ptr %520, i32 0, i32 13
  store ptr %521, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #9
  %522 = load ptr, ptr %3, align 8, !tbaa !5
  %523 = getelementptr inbounds %struct.sim_config, ptr %522, i32 0, i32 14
  store ptr %523, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #9
  %524 = load ptr, ptr %3, align 8, !tbaa !5
  %525 = getelementptr inbounds %struct.sim_config, ptr %524, i32 0, i32 10
  store ptr %525, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #9
  store ptr %46, ptr %56, align 8, !tbaa !5
  %526 = load i8, ptr %4, align 1, !tbaa !17, !range !15, !noundef !16
  %527 = trunc i8 %526 to i1
  br i1 %527, label %529, label %528

528:                                              ; preds = %464
  store ptr %47, ptr %52, align 8, !tbaa !5
  store ptr %48, ptr %53, align 8, !tbaa !5
  store ptr %49, ptr %54, align 8, !tbaa !5
  store ptr %50, ptr %55, align 8, !tbaa !5
  store ptr %51, ptr %56, align 8, !tbaa !5
  br label %529

529:                                              ; preds = %528, %464
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #9
  %530 = load ptr, ptr %3, align 8, !tbaa !5
  %531 = getelementptr inbounds %struct.sim_config, ptr %530, i32 0, i32 0
  store ptr %531, ptr %57, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #9
  %532 = load ptr, ptr %3, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.sim_config, ptr %532, i32 0, i32 17
  store ptr %533, ptr %58, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #9
  store ptr %14, ptr %59, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #9
  store ptr %18, ptr %60, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #9
  %534 = load ptr, ptr %3, align 8, !tbaa !5
  %535 = getelementptr inbounds %struct.sim_config, ptr %534, i32 0, i32 18
  store ptr %535, ptr %61, align 8, !tbaa !5
  %536 = load ptr, ptr %3, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct.sim_config, ptr %536, i32 0, i32 7
  %538 = load i32, ptr %537, align 4, !tbaa !26
  %539 = icmp eq i32 %538, 0
  br i1 %539, label %540, label %585

540:                                              ; preds = %529
  %541 = load ptr, ptr %19, align 8, !tbaa !5
  %542 = getelementptr inbounds %struct.ocl_ctx, ptr %541, i32 0, i32 8
  %543 = load ptr, ptr %542, align 8, !tbaa !63
  %544 = getelementptr inbounds ptr, ptr %543, i64 0
  %545 = load ptr, ptr %544, align 8, !tbaa !5
  %546 = load i64, ptr %8, align 8, !tbaa !18
  %547 = load ptr, ptr %59, align 8, !tbaa !5
  %548 = load i64, ptr %8, align 8, !tbaa !18
  %549 = load ptr, ptr %60, align 8, !tbaa !5
  %550 = load i64, ptr %8, align 8, !tbaa !18
  %551 = load ptr, ptr %57, align 8, !tbaa !5
  %552 = load i64, ptr %7, align 8, !tbaa !18
  %553 = load ptr, ptr %58, align 8, !tbaa !5
  %554 = load i64, ptr %8, align 8, !tbaa !18
  %555 = load ptr, ptr %61, align 8, !tbaa !5
  %556 = load i64, ptr %10, align 8, !tbaa !18
  %557 = load ptr, ptr %56, align 8, !tbaa !5
  %558 = load i64, ptr %10, align 8, !tbaa !18
  %559 = load ptr, ptr %52, align 8, !tbaa !5
  %560 = load i64, ptr %10, align 8, !tbaa !18
  %561 = load ptr, ptr %53, align 8, !tbaa !5
  %562 = load i64, ptr %10, align 8, !tbaa !18
  %563 = load ptr, ptr %54, align 8, !tbaa !5
  %564 = load i64, ptr %10, align 8, !tbaa !18
  %565 = load ptr, ptr %55, align 8, !tbaa !5
  %566 = load i64, ptr %35, align 8, !tbaa !18
  %567 = load ptr, ptr %37, align 8, !tbaa !5
  %568 = load i64, ptr %35, align 8, !tbaa !18
  %569 = load ptr, ptr %39, align 8, !tbaa !5
  %570 = load i64, ptr %35, align 8, !tbaa !18
  %571 = load ptr, ptr %40, align 8, !tbaa !5
  %572 = load i64, ptr %35, align 8, !tbaa !18
  %573 = load ptr, ptr %41, align 8, !tbaa !5
  %574 = load i64, ptr %35, align 8, !tbaa !18
  %575 = load ptr, ptr %42, align 8, !tbaa !5
  %576 = load i64, ptr %35, align 8, !tbaa !18
  %577 = load ptr, ptr %45, align 8, !tbaa !5
  %578 = load i64, ptr %35, align 8, !tbaa !18
  %579 = load ptr, ptr %38, align 8, !tbaa !5
  %580 = load i64, ptr %35, align 8, !tbaa !18
  %581 = load ptr, ptr %43, align 8, !tbaa !5
  %582 = load i64, ptr %35, align 8, !tbaa !18
  %583 = load ptr, ptr %44, align 8, !tbaa !5
  %584 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %545, i64 noundef 19, i64 noundef %546, ptr noundef %547, i64 noundef %548, ptr noundef %549, i64 noundef %550, ptr noundef %551, i64 noundef %552, ptr noundef %553, i64 noundef %554, ptr noundef %555, i64 noundef %556, ptr noundef %557, i64 noundef %558, ptr noundef %559, i64 noundef %560, ptr noundef %561, i64 noundef %562, ptr noundef %563, i64 noundef %564, ptr noundef %565, i64 noundef %566, ptr noundef %567, i64 noundef %568, ptr noundef %569, i64 noundef %570, ptr noundef %571, i64 noundef %572, ptr noundef %573, i64 noundef %574, ptr noundef %575, i64 noundef %576, ptr noundef %577, i64 noundef %578, ptr noundef %579, i64 noundef %580, ptr noundef %581, i64 noundef %582, ptr noundef %583)
  call void @ocl_check_err(i32 noundef %584, ptr noundef @.str.5, i32 noundef 281)
  br label %838

585:                                              ; preds = %529
  %586 = load ptr, ptr %3, align 8, !tbaa !5
  %587 = getelementptr inbounds %struct.sim_config, ptr %586, i32 0, i32 8
  %588 = load i32, ptr %587, align 8, !tbaa !22
  %589 = icmp eq i32 %588, 1
  br i1 %589, label %590, label %666

590:                                              ; preds = %585
  %591 = load ptr, ptr %3, align 8, !tbaa !5
  %592 = getelementptr inbounds %struct.sim_config, ptr %591, i32 0, i32 9
  %593 = load i8, ptr %592, align 4, !tbaa !21, !range !15, !noundef !16
  %594 = trunc i8 %593 to i1
  br i1 %594, label %595, label %634

595:                                              ; preds = %590
  %596 = load ptr, ptr %19, align 8, !tbaa !5
  %597 = getelementptr inbounds %struct.ocl_ctx, ptr %596, i32 0, i32 8
  %598 = load ptr, ptr %597, align 8, !tbaa !63
  %599 = getelementptr inbounds ptr, ptr %598, i64 0
  %600 = load ptr, ptr %599, align 8, !tbaa !5
  %601 = load i64, ptr %8, align 8, !tbaa !18
  %602 = load ptr, ptr %57, align 8, !tbaa !5
  %603 = load i64, ptr %7, align 8, !tbaa !18
  %604 = load ptr, ptr %58, align 8, !tbaa !5
  %605 = load i64, ptr %10, align 8, !tbaa !18
  %606 = load ptr, ptr %56, align 8, !tbaa !5
  %607 = load i64, ptr %10, align 8, !tbaa !18
  %608 = load ptr, ptr %52, align 8, !tbaa !5
  %609 = load i64, ptr %10, align 8, !tbaa !18
  %610 = load ptr, ptr %53, align 8, !tbaa !5
  %611 = load i64, ptr %10, align 8, !tbaa !18
  %612 = load ptr, ptr %54, align 8, !tbaa !5
  %613 = load i64, ptr %10, align 8, !tbaa !18
  %614 = load ptr, ptr %55, align 8, !tbaa !5
  %615 = load i64, ptr %35, align 8, !tbaa !18
  %616 = load ptr, ptr %37, align 8, !tbaa !5
  %617 = load i64, ptr %35, align 8, !tbaa !18
  %618 = load ptr, ptr %41, align 8, !tbaa !5
  %619 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %600, i64 noundef 9, i64 noundef %601, ptr noundef %602, i64 noundef %603, ptr noundef %604, i64 noundef %605, ptr noundef %606, i64 noundef %607, ptr noundef %608, i64 noundef %609, ptr noundef %610, i64 noundef %611, ptr noundef %612, i64 noundef %613, ptr noundef %614, i64 noundef %615, ptr noundef %616, i64 noundef %617, ptr noundef %618)
  call void @ocl_check_err(i32 noundef %619, ptr noundef @.str.5, i32 noundef 296)
  %620 = load ptr, ptr %19, align 8, !tbaa !5
  %621 = getelementptr inbounds %struct.ocl_ctx, ptr %620, i32 0, i32 8
  %622 = load ptr, ptr %621, align 8, !tbaa !63
  %623 = getelementptr inbounds ptr, ptr %622, i64 1
  %624 = load ptr, ptr %623, align 8, !tbaa !5
  %625 = load i64, ptr %8, align 8, !tbaa !18
  %626 = load ptr, ptr %57, align 8, !tbaa !5
  %627 = load i64, ptr %35, align 8, !tbaa !18
  %628 = load ptr, ptr %42, align 8, !tbaa !5
  %629 = load i64, ptr %35, align 8, !tbaa !18
  %630 = load ptr, ptr %45, align 8, !tbaa !5
  %631 = load i64, ptr %35, align 8, !tbaa !18
  %632 = load ptr, ptr %43, align 8, !tbaa !5
  %633 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %624, i64 noundef 4, i64 noundef %625, ptr noundef %626, i64 noundef %627, ptr noundef %628, i64 noundef %629, ptr noundef %630, i64 noundef %631, ptr noundef %632)
  call void @ocl_check_err(i32 noundef %633, ptr noundef @.str.5, i32 noundef 304)
  br label %665

634:                                              ; preds = %590
  %635 = load ptr, ptr %19, align 8, !tbaa !5
  %636 = getelementptr inbounds %struct.ocl_ctx, ptr %635, i32 0, i32 8
  %637 = load ptr, ptr %636, align 8, !tbaa !63
  %638 = getelementptr inbounds ptr, ptr %637, i64 0
  %639 = load ptr, ptr %638, align 8, !tbaa !5
  %640 = load i64, ptr %8, align 8, !tbaa !18
  %641 = load ptr, ptr %57, align 8, !tbaa !5
  %642 = load i64, ptr %7, align 8, !tbaa !18
  %643 = load ptr, ptr %58, align 8, !tbaa !5
  %644 = load i64, ptr %10, align 8, !tbaa !18
  %645 = load ptr, ptr %56, align 8, !tbaa !5
  %646 = load i64, ptr %10, align 8, !tbaa !18
  %647 = load ptr, ptr %52, align 8, !tbaa !5
  %648 = load i64, ptr %10, align 8, !tbaa !18
  %649 = load ptr, ptr %53, align 8, !tbaa !5
  %650 = load i64, ptr %10, align 8, !tbaa !18
  %651 = load ptr, ptr %54, align 8, !tbaa !5
  %652 = load i64, ptr %10, align 8, !tbaa !18
  %653 = load ptr, ptr %55, align 8, !tbaa !5
  %654 = load i64, ptr %35, align 8, !tbaa !18
  %655 = load ptr, ptr %37, align 8, !tbaa !5
  %656 = load i64, ptr %35, align 8, !tbaa !18
  %657 = load ptr, ptr %41, align 8, !tbaa !5
  %658 = load i64, ptr %35, align 8, !tbaa !18
  %659 = load ptr, ptr %42, align 8, !tbaa !5
  %660 = load i64, ptr %35, align 8, !tbaa !18
  %661 = load ptr, ptr %45, align 8, !tbaa !5
  %662 = load i64, ptr %35, align 8, !tbaa !18
  %663 = load ptr, ptr %43, align 8, !tbaa !5
  %664 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %639, i64 noundef 12, i64 noundef %640, ptr noundef %641, i64 noundef %642, ptr noundef %643, i64 noundef %644, ptr noundef %645, i64 noundef %646, ptr noundef %647, i64 noundef %648, ptr noundef %649, i64 noundef %650, ptr noundef %651, i64 noundef %652, ptr noundef %653, i64 noundef %654, ptr noundef %655, i64 noundef %656, ptr noundef %657, i64 noundef %658, ptr noundef %659, i64 noundef %660, ptr noundef %661, i64 noundef %662, ptr noundef %663)
  call void @ocl_check_err(i32 noundef %664, ptr noundef @.str.5, i32 noundef 320)
  br label %665

665:                                              ; preds = %634, %595
  br label %837

666:                                              ; preds = %585
  %667 = load ptr, ptr %3, align 8, !tbaa !5
  %668 = getelementptr inbounds %struct.sim_config, ptr %667, i32 0, i32 8
  %669 = load i32, ptr %668, align 8, !tbaa !22
  %670 = icmp eq i32 %669, 2
  br i1 %670, label %671, label %747

671:                                              ; preds = %666
  %672 = load ptr, ptr %3, align 8, !tbaa !5
  %673 = getelementptr inbounds %struct.sim_config, ptr %672, i32 0, i32 9
  %674 = load i8, ptr %673, align 4, !tbaa !21, !range !15, !noundef !16
  %675 = trunc i8 %674 to i1
  br i1 %675, label %676, label %715

676:                                              ; preds = %671
  %677 = load ptr, ptr %19, align 8, !tbaa !5
  %678 = getelementptr inbounds %struct.ocl_ctx, ptr %677, i32 0, i32 8
  %679 = load ptr, ptr %678, align 8, !tbaa !63
  %680 = getelementptr inbounds ptr, ptr %679, i64 0
  %681 = load ptr, ptr %680, align 8, !tbaa !5
  %682 = load i64, ptr %8, align 8, !tbaa !18
  %683 = load ptr, ptr %57, align 8, !tbaa !5
  %684 = load i64, ptr %7, align 8, !tbaa !18
  %685 = load ptr, ptr %58, align 8, !tbaa !5
  %686 = load i64, ptr %10, align 8, !tbaa !18
  %687 = load ptr, ptr %56, align 8, !tbaa !5
  %688 = load i64, ptr %10, align 8, !tbaa !18
  %689 = load ptr, ptr %52, align 8, !tbaa !5
  %690 = load i64, ptr %10, align 8, !tbaa !18
  %691 = load ptr, ptr %53, align 8, !tbaa !5
  %692 = load i64, ptr %10, align 8, !tbaa !18
  %693 = load ptr, ptr %54, align 8, !tbaa !5
  %694 = load i64, ptr %10, align 8, !tbaa !18
  %695 = load ptr, ptr %55, align 8, !tbaa !5
  %696 = load i64, ptr %35, align 8, !tbaa !18
  %697 = load ptr, ptr %37, align 8, !tbaa !5
  %698 = load i64, ptr %35, align 8, !tbaa !18
  %699 = load ptr, ptr %41, align 8, !tbaa !5
  %700 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %681, i64 noundef 9, i64 noundef %682, ptr noundef %683, i64 noundef %684, ptr noundef %685, i64 noundef %686, ptr noundef %687, i64 noundef %688, ptr noundef %689, i64 noundef %690, ptr noundef %691, i64 noundef %692, ptr noundef %693, i64 noundef %694, ptr noundef %695, i64 noundef %696, ptr noundef %697, i64 noundef %698, ptr noundef %699)
  call void @ocl_check_err(i32 noundef %700, ptr noundef @.str.5, i32 noundef 336)
  %701 = load ptr, ptr %19, align 8, !tbaa !5
  %702 = getelementptr inbounds %struct.ocl_ctx, ptr %701, i32 0, i32 8
  %703 = load ptr, ptr %702, align 8, !tbaa !63
  %704 = getelementptr inbounds ptr, ptr %703, i64 1
  %705 = load ptr, ptr %704, align 8, !tbaa !5
  %706 = load i64, ptr %8, align 8, !tbaa !18
  %707 = load ptr, ptr %57, align 8, !tbaa !5
  %708 = load i64, ptr %35, align 8, !tbaa !18
  %709 = load ptr, ptr %42, align 8, !tbaa !5
  %710 = load i64, ptr %35, align 8, !tbaa !18
  %711 = load ptr, ptr %45, align 8, !tbaa !5
  %712 = load i64, ptr %35, align 8, !tbaa !18
  %713 = load ptr, ptr %43, align 8, !tbaa !5
  %714 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %705, i64 noundef 4, i64 noundef %706, ptr noundef %707, i64 noundef %708, ptr noundef %709, i64 noundef %710, ptr noundef %711, i64 noundef %712, ptr noundef %713)
  call void @ocl_check_err(i32 noundef %714, ptr noundef @.str.5, i32 noundef 344)
  br label %746

715:                                              ; preds = %671
  %716 = load ptr, ptr %19, align 8, !tbaa !5
  %717 = getelementptr inbounds %struct.ocl_ctx, ptr %716, i32 0, i32 8
  %718 = load ptr, ptr %717, align 8, !tbaa !63
  %719 = getelementptr inbounds ptr, ptr %718, i64 0
  %720 = load ptr, ptr %719, align 8, !tbaa !5
  %721 = load i64, ptr %8, align 8, !tbaa !18
  %722 = load ptr, ptr %57, align 8, !tbaa !5
  %723 = load i64, ptr %7, align 8, !tbaa !18
  %724 = load ptr, ptr %58, align 8, !tbaa !5
  %725 = load i64, ptr %10, align 8, !tbaa !18
  %726 = load ptr, ptr %56, align 8, !tbaa !5
  %727 = load i64, ptr %10, align 8, !tbaa !18
  %728 = load ptr, ptr %52, align 8, !tbaa !5
  %729 = load i64, ptr %10, align 8, !tbaa !18
  %730 = load ptr, ptr %53, align 8, !tbaa !5
  %731 = load i64, ptr %10, align 8, !tbaa !18
  %732 = load ptr, ptr %54, align 8, !tbaa !5
  %733 = load i64, ptr %10, align 8, !tbaa !18
  %734 = load ptr, ptr %55, align 8, !tbaa !5
  %735 = load i64, ptr %35, align 8, !tbaa !18
  %736 = load ptr, ptr %37, align 8, !tbaa !5
  %737 = load i64, ptr %35, align 8, !tbaa !18
  %738 = load ptr, ptr %41, align 8, !tbaa !5
  %739 = load i64, ptr %35, align 8, !tbaa !18
  %740 = load ptr, ptr %42, align 8, !tbaa !5
  %741 = load i64, ptr %35, align 8, !tbaa !18
  %742 = load ptr, ptr %45, align 8, !tbaa !5
  %743 = load i64, ptr %35, align 8, !tbaa !18
  %744 = load ptr, ptr %43, align 8, !tbaa !5
  %745 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %720, i64 noundef 12, i64 noundef %721, ptr noundef %722, i64 noundef %723, ptr noundef %724, i64 noundef %725, ptr noundef %726, i64 noundef %727, ptr noundef %728, i64 noundef %729, ptr noundef %730, i64 noundef %731, ptr noundef %732, i64 noundef %733, ptr noundef %734, i64 noundef %735, ptr noundef %736, i64 noundef %737, ptr noundef %738, i64 noundef %739, ptr noundef %740, i64 noundef %741, ptr noundef %742, i64 noundef %743, ptr noundef %744)
  call void @ocl_check_err(i32 noundef %745, ptr noundef @.str.5, i32 noundef 360)
  br label %746

746:                                              ; preds = %715, %676
  br label %836

747:                                              ; preds = %666
  %748 = load ptr, ptr %3, align 8, !tbaa !5
  %749 = getelementptr inbounds %struct.sim_config, ptr %748, i32 0, i32 8
  %750 = load i32, ptr %749, align 8, !tbaa !22
  %751 = icmp eq i32 %750, 0
  br i1 %751, label %752, label %834

752:                                              ; preds = %747
  %753 = load ptr, ptr %3, align 8, !tbaa !5
  %754 = getelementptr inbounds %struct.sim_config, ptr %753, i32 0, i32 9
  %755 = load i8, ptr %754, align 4, !tbaa !21, !range !15, !noundef !16
  %756 = trunc i8 %755 to i1
  br i1 %756, label %757, label %800

757:                                              ; preds = %752
  %758 = load ptr, ptr %19, align 8, !tbaa !5
  %759 = getelementptr inbounds %struct.ocl_ctx, ptr %758, i32 0, i32 8
  %760 = load ptr, ptr %759, align 8, !tbaa !63
  %761 = getelementptr inbounds ptr, ptr %760, i64 0
  %762 = load ptr, ptr %761, align 8, !tbaa !5
  %763 = load i64, ptr %8, align 8, !tbaa !18
  %764 = load ptr, ptr %57, align 8, !tbaa !5
  %765 = load i64, ptr %35, align 8, !tbaa !18
  %766 = load ptr, ptr %42, align 8, !tbaa !5
  %767 = load i64, ptr %35, align 8, !tbaa !18
  %768 = load ptr, ptr %43, align 8, !tbaa !5
  %769 = load i64, ptr %35, align 8, !tbaa !18
  %770 = load ptr, ptr %44, align 8, !tbaa !5
  %771 = load i64, ptr %35, align 8, !tbaa !18
  %772 = load ptr, ptr %45, align 8, !tbaa !5
  %773 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %762, i64 noundef 5, i64 noundef %763, ptr noundef %764, i64 noundef %765, ptr noundef %766, i64 noundef %767, ptr noundef %768, i64 noundef %769, ptr noundef %770, i64 noundef %771, ptr noundef %772)
  call void @ocl_check_err(i32 noundef %773, ptr noundef @.str.5, i32 noundef 372)
  %774 = load ptr, ptr %19, align 8, !tbaa !5
  %775 = getelementptr inbounds %struct.ocl_ctx, ptr %774, i32 0, i32 8
  %776 = load ptr, ptr %775, align 8, !tbaa !63
  %777 = getelementptr inbounds ptr, ptr %776, i64 1
  %778 = load ptr, ptr %777, align 8, !tbaa !5
  %779 = load i64, ptr %8, align 8, !tbaa !18
  %780 = load ptr, ptr %57, align 8, !tbaa !5
  %781 = load i64, ptr %7, align 8, !tbaa !18
  %782 = load ptr, ptr %58, align 8, !tbaa !5
  %783 = load i64, ptr %10, align 8, !tbaa !18
  %784 = load ptr, ptr %56, align 8, !tbaa !5
  %785 = load i64, ptr %10, align 8, !tbaa !18
  %786 = load ptr, ptr %52, align 8, !tbaa !5
  %787 = load i64, ptr %10, align 8, !tbaa !18
  %788 = load ptr, ptr %53, align 8, !tbaa !5
  %789 = load i64, ptr %10, align 8, !tbaa !18
  %790 = load ptr, ptr %54, align 8, !tbaa !5
  %791 = load i64, ptr %10, align 8, !tbaa !18
  %792 = load ptr, ptr %55, align 8, !tbaa !5
  %793 = load i64, ptr %35, align 8, !tbaa !18
  %794 = load ptr, ptr %37, align 8, !tbaa !5
  %795 = load i64, ptr %35, align 8, !tbaa !18
  %796 = load ptr, ptr %41, align 8, !tbaa !5
  %797 = load i64, ptr %35, align 8, !tbaa !18
  %798 = load ptr, ptr %44, align 8, !tbaa !5
  %799 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %778, i64 noundef 10, i64 noundef %779, ptr noundef %780, i64 noundef %781, ptr noundef %782, i64 noundef %783, ptr noundef %784, i64 noundef %785, ptr noundef %786, i64 noundef %787, ptr noundef %788, i64 noundef %789, ptr noundef %790, i64 noundef %791, ptr noundef %792, i64 noundef %793, ptr noundef %794, i64 noundef %795, ptr noundef %796, i64 noundef %797, ptr noundef %798)
  call void @ocl_check_err(i32 noundef %799, ptr noundef @.str.5, i32 noundef 386)
  br label %833

800:                                              ; preds = %752
  %801 = load ptr, ptr %19, align 8, !tbaa !5
  %802 = getelementptr inbounds %struct.ocl_ctx, ptr %801, i32 0, i32 8
  %803 = load ptr, ptr %802, align 8, !tbaa !63
  %804 = getelementptr inbounds ptr, ptr %803, i64 0
  %805 = load ptr, ptr %804, align 8, !tbaa !5
  %806 = load i64, ptr %8, align 8, !tbaa !18
  %807 = load ptr, ptr %57, align 8, !tbaa !5
  %808 = load i64, ptr %7, align 8, !tbaa !18
  %809 = load ptr, ptr %58, align 8, !tbaa !5
  %810 = load i64, ptr %10, align 8, !tbaa !18
  %811 = load ptr, ptr %56, align 8, !tbaa !5
  %812 = load i64, ptr %10, align 8, !tbaa !18
  %813 = load ptr, ptr %52, align 8, !tbaa !5
  %814 = load i64, ptr %10, align 8, !tbaa !18
  %815 = load ptr, ptr %53, align 8, !tbaa !5
  %816 = load i64, ptr %10, align 8, !tbaa !18
  %817 = load ptr, ptr %54, align 8, !tbaa !5
  %818 = load i64, ptr %10, align 8, !tbaa !18
  %819 = load ptr, ptr %55, align 8, !tbaa !5
  %820 = load i64, ptr %35, align 8, !tbaa !18
  %821 = load ptr, ptr %37, align 8, !tbaa !5
  %822 = load i64, ptr %35, align 8, !tbaa !18
  %823 = load ptr, ptr %41, align 8, !tbaa !5
  %824 = load i64, ptr %35, align 8, !tbaa !18
  %825 = load ptr, ptr %42, align 8, !tbaa !5
  %826 = load i64, ptr %35, align 8, !tbaa !18
  %827 = load ptr, ptr %43, align 8, !tbaa !5
  %828 = load i64, ptr %35, align 8, !tbaa !18
  %829 = load ptr, ptr %44, align 8, !tbaa !5
  %830 = load i64, ptr %35, align 8, !tbaa !18
  %831 = load ptr, ptr %45, align 8, !tbaa !5
  %832 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %805, i64 noundef 13, i64 noundef %806, ptr noundef %807, i64 noundef %808, ptr noundef %809, i64 noundef %810, ptr noundef %811, i64 noundef %812, ptr noundef %813, i64 noundef %814, ptr noundef %815, i64 noundef %816, ptr noundef %817, i64 noundef %818, ptr noundef %819, i64 noundef %820, ptr noundef %821, i64 noundef %822, ptr noundef %823, i64 noundef %824, ptr noundef %825, i64 noundef %826, ptr noundef %827, i64 noundef %828, ptr noundef %829, i64 noundef %830, ptr noundef %831)
  call void @ocl_check_err(i32 noundef %832, ptr noundef @.str.5, i32 noundef 403)
  br label %833

833:                                              ; preds = %800, %757
  br label %835

834:                                              ; preds = %747
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.5, i32 noundef 406, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

835:                                              ; preds = %833
  br label %836

836:                                              ; preds = %835, %746
  br label %837

837:                                              ; preds = %836, %665
  br label %838

838:                                              ; preds = %837, %540
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #9
  store i32 0, ptr %62, align 4, !tbaa !20
  br label %839

839:                                              ; preds = %864, %838
  %840 = load i32, ptr %62, align 4, !tbaa !20
  %841 = load i32, ptr %11, align 4, !tbaa !20
  %842 = icmp ult i32 %840, %841
  br i1 %842, label %844, label %843

843:                                              ; preds = %839
  store i32 17, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #9
  br label %867

844:                                              ; preds = %839
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #9
  %845 = load ptr, ptr %19, align 8, !tbaa !5
  %846 = getelementptr inbounds %struct.ocl_ctx, ptr %845, i32 0, i32 6
  %847 = load ptr, ptr %846, align 8, !tbaa !64
  %848 = load i32, ptr %62, align 4, !tbaa !20
  %849 = zext i32 %848 to i64
  %850 = getelementptr inbounds ptr, ptr %847, i64 %849
  %851 = load ptr, ptr %850, align 8, !tbaa !5
  store ptr %851, ptr %63, align 8, !tbaa !5
  %852 = load ptr, ptr %63, align 8, !tbaa !5
  %853 = call i32 @clFlush(ptr noundef %852)
  %854 = icmp eq i32 %853, 0
  br i1 %854, label %855, label %856

855:                                              ; preds = %844
  br label %857

856:                                              ; preds = %844
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.5, i32 noundef 410, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

857:                                              ; preds = %855
  %858 = load ptr, ptr %63, align 8, !tbaa !5
  %859 = call i32 @clFinish(ptr noundef %858)
  %860 = icmp eq i32 %859, 0
  br i1 %860, label %861, label %862

861:                                              ; preds = %857
  br label %863

862:                                              ; preds = %857
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.5, i32 noundef 411, ptr noundef @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #8
  unreachable

863:                                              ; preds = %861
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  br label %864

864:                                              ; preds = %863
  %865 = load i32, ptr %62, align 4, !tbaa !20
  %866 = add i32 %865, 1
  store i32 %866, ptr %62, align 4, !tbaa !20
  br label %839, !llvm.loop !65

867:                                              ; preds = %843
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #9
  %868 = call i64 (...) @nano_count()
  store i64 %868, ptr %64, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %65, ptr align 8 @__const.sim_config_run_on_opencl.wg_size, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #9
  store i32 0, ptr %66, align 4, !tbaa !20
  br label %869

869:                                              ; preds = %892, %867
  %870 = load i32, ptr %66, align 4, !tbaa !20
  %871 = load i32, ptr %11, align 4, !tbaa !20
  %872 = icmp ult i32 %870, %871
  br i1 %872, label %874, label %873

873:                                              ; preds = %869
  store i32 20, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  br label %895

874:                                              ; preds = %869
  %875 = load ptr, ptr %19, align 8, !tbaa !5
  %876 = getelementptr inbounds %struct.ocl_ctx, ptr %875, i32 0, i32 6
  %877 = load ptr, ptr %876, align 8, !tbaa !64
  %878 = load i32, ptr %66, align 4, !tbaa !20
  %879 = zext i32 %878 to i64
  %880 = getelementptr inbounds ptr, ptr %877, i64 %879
  %881 = load ptr, ptr %880, align 8, !tbaa !5
  %882 = load ptr, ptr %19, align 8, !tbaa !5
  %883 = getelementptr inbounds %struct.ocl_ctx, ptr %882, i32 0, i32 8
  %884 = load ptr, ptr %883, align 8, !tbaa !63
  %885 = load i32, ptr %66, align 4, !tbaa !20
  %886 = zext i32 %885 to i64
  %887 = getelementptr inbounds ptr, ptr %884, i64 %886
  %888 = load ptr, ptr %887, align 8, !tbaa !5
  %889 = getelementptr inbounds [1 x i64], ptr %65, i64 0, i64 0
  %890 = getelementptr inbounds [1 x i64], ptr %65, i64 0, i64 0
  %891 = call i32 @clEnqueueNDRangeKernel(ptr noundef %881, ptr noundef %888, i32 noundef 1, ptr noundef null, ptr noundef %889, ptr noundef %890, i32 noundef 0, ptr noundef null, ptr noundef null)
  call void @ocl_check_err(i32 noundef %891, ptr noundef @.str.5, i32 noundef 421)
  br label %892

892:                                              ; preds = %874
  %893 = load i32, ptr %66, align 4, !tbaa !20
  %894 = add i32 %893, 1
  store i32 %894, ptr %66, align 4, !tbaa !20
  br label %869, !llvm.loop !66

895:                                              ; preds = %873
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #9
  store i32 0, ptr %67, align 4, !tbaa !20
  br label %896

896:                                              ; preds = %910, %895
  %897 = load i32, ptr %67, align 4, !tbaa !20
  %898 = load i32, ptr %11, align 4, !tbaa !20
  %899 = icmp ult i32 %897, %898
  br i1 %899, label %901, label %900

900:                                              ; preds = %896
  store i32 23, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #9
  br label %913

901:                                              ; preds = %896
  %902 = load ptr, ptr %19, align 8, !tbaa !5
  %903 = getelementptr inbounds %struct.ocl_ctx, ptr %902, i32 0, i32 6
  %904 = load ptr, ptr %903, align 8, !tbaa !64
  %905 = load i32, ptr %67, align 4, !tbaa !20
  %906 = zext i32 %905 to i64
  %907 = getelementptr inbounds ptr, ptr %904, i64 %906
  %908 = load ptr, ptr %907, align 8, !tbaa !5
  %909 = call i32 @clFinish(ptr noundef %908)
  br label %910

910:                                              ; preds = %901
  %911 = load i32, ptr %67, align 4, !tbaa !20
  %912 = add i32 %911, 1
  store i32 %912, ptr %67, align 4, !tbaa !20
  br label %896, !llvm.loop !67

913:                                              ; preds = %900
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #9
  %914 = call i64 (...) @nano_count()
  %915 = load i64, ptr %64, align 8, !tbaa !18
  %916 = sub i64 %914, %915
  store i64 %916, ptr %68, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #9
  %917 = load ptr, ptr %19, align 8, !tbaa !5
  %918 = getelementptr inbounds %struct.ocl_ctx, ptr %917, i32 0, i32 4
  %919 = getelementptr inbounds [20 x %struct.ocl_ctx_buf], ptr %918, i64 0, i64 8
  %920 = getelementptr inbounds %struct.ocl_ctx_buf, ptr %919, i32 0, i32 1
  %921 = load i64, ptr %920, align 8, !tbaa !39
  %922 = call noalias ptr @malloc(i64 noundef %921) #11
  store ptr %922, ptr %69, align 8, !tbaa !5
  %923 = load ptr, ptr %19, align 8, !tbaa !5
  %924 = load ptr, ptr %69, align 8, !tbaa !5
  %925 = call i32 @ocl_ctx_read_buffer(ptr noundef %923, i64 noundef 0, i64 noundef 8, ptr noundef %924)
  call void @ocl_check_err(i32 noundef %925, ptr noundef @.str.5, i32 noundef 429)
  %926 = load ptr, ptr %19, align 8, !tbaa !5
  call void @ocl_ctx_free(ptr noundef %926)
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #9
  store i32 50000000, ptr %71, align 4, !tbaa !20
  %927 = getelementptr inbounds [1 x i32], ptr %71, i64 0, i64 0
  %928 = load ptr, ptr %69, align 8, !tbaa !5
  %929 = call ptr @npy_init(i8 noundef signext 117, i32 noundef 4, i32 noundef 1, ptr noundef %927, ptr noundef %928, i1 noundef zeroext false)
  store ptr %929, ptr %70, align 8, !tbaa !5
  %930 = getelementptr inbounds %struct.sim_result, ptr %0, i32 0, i32 0
  %931 = load ptr, ptr %69, align 8, !tbaa !5
  %932 = getelementptr inbounds i32, ptr %931, i64 0
  %933 = load i32, ptr %932, align 4, !tbaa !20
  store i32 %933, ptr %930, align 8, !tbaa !68
  %934 = getelementptr inbounds %struct.sim_result, ptr %0, i32 0, i32 1
  %935 = load i64, ptr %68, align 8, !tbaa !18
  store i64 %935, ptr %934, align 8, !tbaa !70
  %936 = getelementptr inbounds %struct.sim_result, ptr %0, i32 0, i32 2
  %937 = load ptr, ptr %70, align 8, !tbaa !5
  store ptr %937, ptr %936, align 8, !tbaa !71
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 216, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

declare void @synapse_index_free(ptr noundef) #3

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

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

declare ptr @synapse_index_merge_delays(ptr noundef) #3

declare ptr @ocl_ctx_init(i32 noundef, i32 noundef, i1 noundef zeroext) #3

declare void @ocl_check_err(i32 noundef, ptr noundef, i32 noundef) #3

declare i32 @ocl_ctx_add_queue(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #4

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

declare i32 @ocl_ctx_add_buffer(ptr noundef, ptr noundef byval(%struct.ocl_ctx_buf) align 8) #3

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #5

declare void @mprec_write_double(ptr noundef, i64 noundef, double noundef, i1 noundef zeroext) #3

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

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

declare i32 @ocl_set_kernel_arguments(ptr noundef, i64 noundef, ...) #3

declare i32 @clFlush(ptr noundef) #3

declare i32 @clFinish(ptr noundef) #3

declare i64 @nano_count(...) #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) #6

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

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

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

declare void @ocl_ctx_free(ptr noundef) #3

declare ptr @npy_init(i8 noundef signext, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0,1) }
attributes #11 = { 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, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !12, i64 40, !11, i64 44, !11, i64 48, !12, i64 52, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !7, i64 112, !11, i64 116, !6, i64 120, !11, i64 128, !6, i64 136, !6, i64 144, !11, i64 152, !6, i64 160, !6, i64 168}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !12, i64 40}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!10, !12, i64 52}
!22 = !{!10, !11, i64 48}
!23 = !{!10, !6, i64 168}
!24 = !{!25, !11, i64 20}
!25 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!26 = !{!10, !11, i64 44}
!27 = !{!10, !11, i64 116}
!28 = !{!25, !11, i64 24}
!29 = !{!10, !11, i64 32}
!30 = !{!10, !11, i64 36}
!31 = !{!32, !11, i64 552}
!32 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !19, i64 24, !7, i64 32, !19, i64 512, !6, i64 520, !19, i64 528, !6, i64 536, !6, i64 544, !11, i64 552}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!10, !6, i64 24}
!36 = !{!10, !11, i64 152}
!37 = !{!38, !6, i64 0}
!38 = !{!"", !6, i64 0, !19, i64 8, !19, i64 16}
!39 = !{!38, !19, i64 8}
!40 = !{!38, !19, i64 16}
!41 = !{!25, !11, i64 16}
!42 = distinct !{!42, !34}
!43 = !{!25, !6, i64 8}
!44 = !{!25, !6, i64 0}
!45 = !{!10, !6, i64 120}
!46 = !{!13, !13, i64 0}
!47 = !{!10, !13, i64 96}
!48 = distinct !{!48, !34}
!49 = !{!10, !11, i64 128}
!50 = !{!10, !6, i64 136}
!51 = !{!10, !6, i64 144}
!52 = !{!10, !13, i64 72}
!53 = distinct !{!53, !34}
!54 = distinct !{!54, !34}
!55 = !{!10, !6, i64 160}
!56 = !{!57, !57, i64 0}
!57 = !{!"float", !7, i64 0}
!58 = !{!10, !13, i64 104}
!59 = !{!10, !13, i64 64}
!60 = !{!10, !13, i64 80}
!61 = !{!10, !13, i64 88}
!62 = !{!10, !13, i64 56}
!63 = !{!32, !6, i64 536}
!64 = !{!32, !6, i64 520}
!65 = distinct !{!65, !34}
!66 = distinct !{!66, !34}
!67 = distinct !{!67, !34}
!68 = !{!69, !11, i64 0}
!69 = !{!"", !11, i64 0, !19, i64 8, !6, i64 16}
!70 = !{!69, !19, i64 8}
!71 = !{!69, !6, i64 16}


; 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.sim_result = type { i32, i64, ptr }
%struct.ocl_ctx_buf = type { ptr, i64, i64 }

@JIT_MULTI_KERNELS = external dso_local global [2 x ptr], align 16
@HORIZ_MULTI_KERNELS = external dso_local global [2 x ptr], align 16
@GMEM_MULTI_KERNELS = external dso_local global [2 x ptr], align 16
@DEFAULT_KERNEL = external dso_local global [1 x ptr], align 8
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.sim_config_run_on_opencl = external hidden unnamed_addr constant [50 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [26 x i8], align 1
@__const.sim_config_run_on_opencl.wg_size = external hidden unnamed_addr constant [1 x i64], align 8

; Function Attrs: nounwind uwtable
define dso_local void @sim_config_run_on_opencl(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.sim_result) align 8 %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [512 x i8], align 16
  %6 = alloca [9 x %struct.ocl_ctx_buf], align 16
  %7 = alloca float, align 4
  %8 = alloca double, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca [1 x i64], align 8
  %15 = alloca [1 x i32], align 4
  %16 = load i32, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %17, label %18

17:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 50, ptr noundef nonnull @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #9
  unreachable

18:                                               ; preds = %2
  %19 = getelementptr inbounds i8, ptr %1, i64 40
  %20 = load i8, ptr %19, align 8, !tbaa !13, !range !14, !noundef !15
  %21 = trunc nuw i8 %20 to i1
  %22 = select i1 %21, i64 8, i64 4
  %23 = getelementptr inbounds i8, ptr %1, i64 52
  %24 = load i8, ptr %23, align 4, !tbaa !16, !range !14, !noundef !15
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %31

26:                                               ; preds = %18
  %27 = getelementptr inbounds i8, ptr %1, i64 48
  %28 = load i32, ptr %27, align 8, !tbaa !17
  switch i32 %28, label %30 [
    i32 1, label %31
    i32 2, label %29
  ]

29:                                               ; preds = %26
  br label %31

30:                                               ; preds = %26
  br label %31

31:                                               ; preds = %18, %26, %30, %29
  %.0367 = phi ptr [ @HORIZ_MULTI_KERNELS, %29 ], [ @GMEM_MULTI_KERNELS, %30 ], [ @JIT_MULTI_KERNELS, %26 ], [ @DEFAULT_KERNEL, %18 ]
  %.0 = phi i32 [ 2, %29 ], [ 2, %30 ], [ 2, %26 ], [ 1, %18 ]
  %32 = getelementptr inbounds i8, ptr %1, i64 168
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %33, i64 20
  %35 = load i32, ptr %34, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  %36 = getelementptr inbounds i8, ptr %1, i64 44
  %37 = load i32, ptr %36, align 4, !tbaa !21
  switch i32 %37, label %59 [
    i32 0, label %38
    i32 2, label %42
  ]

38:                                               ; preds = %31
  %39 = getelementptr inbounds i8, ptr %1, i64 116
  %40 = load i32, ptr %39, align 4, !tbaa !22
  store i32 %40, ptr %3, align 4, !tbaa !23
  %41 = zext i32 %40 to i64
  br label %60

42:                                               ; preds = %31
  %43 = getelementptr inbounds i8, ptr %1, i64 116
  %44 = load i32, ptr %43, align 4, !tbaa !22
  store i32 %44, ptr %3, align 4, !tbaa !23
  %45 = icmp eq i32 %44, 77248
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.5, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #9
  unreachable

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %1, i64 48
  %49 = load i32, ptr %48, align 8, !tbaa !17
  switch i32 %49, label %56 [
    i32 2, label %50
    i32 1, label %53
  ]

50:                                               ; preds = %47
  %51 = tail call ptr @synapse_index_frontier_index(ptr noundef nonnull %33, i32 noundef 77248, i32 noundef 16, i32 noundef 8) #10
  %52 = load ptr, ptr %32, align 8, !tbaa !18
  tail call void @synapse_index_free(ptr noundef %52) #10
  store ptr %51, ptr %32, align 8, !tbaa !18
  br label %60

53:                                               ; preds = %47
  %54 = tail call ptr @synapse_index_align_delay_classes(ptr noundef nonnull %33, i32 noundef 77248, i32 noundef 8) #10
  %55 = load ptr, ptr %32, align 8, !tbaa !18
  tail call void @synapse_index_free(ptr noundef %55) #10
  store ptr %54, ptr %32, align 8, !tbaa !18
  br label %60

56:                                               ; preds = %47
  %57 = tail call ptr @synapse_index_merge_delays(ptr noundef nonnull %33) #10
  %58 = load ptr, ptr %32, align 8, !tbaa !18
  tail call void @synapse_index_free(ptr noundef %58) #10
  store ptr %57, ptr %32, align 8, !tbaa !18
  br label %60

59:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.5, i32 noundef 104, ptr noundef nonnull @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #9
  unreachable

60:                                               ; preds = %53, %56, %50, %38
  %61 = phi i64 [ 77248, %53 ], [ 77248, %56 ], [ 77248, %50 ], [ %41, %38 ]
  %62 = phi ptr [ %54, %53 ], [ %57, %56 ], [ %51, %50 ], [ %33, %38 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  %63 = getelementptr inbounds i8, ptr %62, i64 24
  %64 = load i32, ptr %63, align 8, !tbaa !24
  store i32 %64, ptr %4, align 4, !tbaa !23
  %65 = getelementptr inbounds i8, ptr %1, i64 32
  %66 = load i32, ptr %65, align 8, !tbaa !25
  %67 = getelementptr inbounds i8, ptr %1, i64 36
  %68 = load i32, ptr %67, align 4, !tbaa !26
  %69 = tail call ptr @ocl_ctx_init(i32 noundef %66, i32 noundef %68, i1 noundef zeroext true) #10
  %70 = getelementptr inbounds i8, ptr %69, i64 552
  %71 = load i32, ptr %70, align 8, !tbaa !27
  tail call void @ocl_check_err(i32 noundef %71, ptr noundef nonnull @.str.5, i32 noundef 113) #10
  br label %147

72:                                               ; preds = %147
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) #10
  %73 = load i8, ptr %19, align 8, !tbaa !13, !range !14, !noundef !15
  %74 = zext nneg i8 %73 to i32
  %75 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %74, i32 noundef 1, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 16, i32 noundef 16) #10
  %76 = getelementptr inbounds i8, ptr %1, i64 24
  %77 = load ptr, ptr %76, align 8, !tbaa !30
  %78 = zext nneg i32 %.0 to i64
  %79 = call i32 @ocl_ctx_load_kernels(ptr noundef %69, ptr noundef %77, ptr noundef nonnull %5, i64 noundef %78, ptr noundef nonnull %.0367) #10
  call void @ocl_check_err(i32 noundef %79, ptr noundef nonnull @.str.5, i32 noundef 129) #10
  %80 = getelementptr inbounds i8, ptr %1, i64 152
  %81 = load i32, ptr %80, align 8, !tbaa !31
  %82 = load i32, ptr %1, align 8, !tbaa !5
  %. = call i32 @llvm.umin.i32(i32 %81, i32 %82)
  %83 = zext i32 %. to i64
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %6) #10
  store ptr null, ptr %6, align 16, !tbaa !32
  %84 = getelementptr inbounds i8, ptr %6, i64 8
  %85 = select i1 %21, i64 3, i64 2
  %86 = shl nuw nsw i64 %61, %85
  store i64 %86, ptr %84, align 8, !tbaa !34
  %87 = getelementptr inbounds i8, ptr %6, i64 16
  store i64 1, ptr %87, align 16, !tbaa !35
  %88 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr null, ptr %88, align 8, !tbaa !32
  %89 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 %86, ptr %89, align 16, !tbaa !34
  %90 = getelementptr inbounds i8, ptr %6, i64 40
  store i64 4, ptr %90, align 8, !tbaa !35
  %91 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr null, ptr %91, align 16, !tbaa !32
  %92 = getelementptr inbounds i8, ptr %6, i64 56
  store i64 %61, ptr %92, align 8, !tbaa !34
  %93 = getelementptr inbounds i8, ptr %6, i64 64
  store i64 1, ptr %93, align 16, !tbaa !35
  %94 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr null, ptr %94, align 8, !tbaa !32
  %95 = getelementptr inbounds i8, ptr %6, i64 80
  store i64 %86, ptr %95, align 16, !tbaa !34
  %96 = getelementptr inbounds i8, ptr %6, i64 88
  store i64 1, ptr %96, align 8, !tbaa !35
  %97 = getelementptr inbounds i8, ptr %6, i64 96
  store ptr null, ptr %97, align 16, !tbaa !32
  %98 = getelementptr inbounds i8, ptr %6, i64 104
  %99 = getelementptr inbounds i8, ptr %1, i64 116
  %100 = load i32, ptr %99, align 4, !tbaa !22
  %101 = zext i32 %100 to i64
  %102 = mul nuw i64 %101, %83
  store i64 %102, ptr %98, align 8, !tbaa !34
  %103 = getelementptr inbounds i8, ptr %6, i64 112
  store i64 4, ptr %103, align 16, !tbaa !35
  %104 = getelementptr inbounds i8, ptr %6, i64 120
  store ptr null, ptr %104, align 8, !tbaa !32
  %105 = getelementptr inbounds i8, ptr %6, i64 128
  %106 = zext i32 %64 to i64
  %107 = shl nuw nsw i64 %106, 3
  store i64 %107, ptr %105, align 16, !tbaa !34
  %108 = getelementptr inbounds i8, ptr %6, i64 136
  store i64 4, ptr %108, align 8, !tbaa !35
  %109 = getelementptr inbounds i8, ptr %6, i64 144
  store ptr null, ptr %109, align 16, !tbaa !32
  %110 = getelementptr inbounds i8, ptr %6, i64 152
  %111 = load ptr, ptr %32, align 8, !tbaa !18
  %112 = getelementptr inbounds i8, ptr %111, i64 16
  %113 = load i32, ptr %112, align 8, !tbaa !36
  %114 = mul i32 %113, %35
  %115 = zext i32 %114 to i64
  %116 = shl nuw nsw i64 %115, 2
  %117 = add nuw nsw i64 %116, 4
  store i64 %117, ptr %110, align 8, !tbaa !34
  %118 = getelementptr inbounds i8, ptr %6, i64 160
  store i64 4, ptr %118, align 16, !tbaa !35
  %119 = getelementptr inbounds i8, ptr %6, i64 168
  store ptr null, ptr %119, align 8, !tbaa !32
  %120 = getelementptr inbounds i8, ptr %6, i64 176
  %121 = shl i32 %100, 6
  %122 = zext i32 %121 to i64
  %123 = shl nuw nsw i64 %122, 2
  store i64 %123, ptr %120, align 16, !tbaa !34
  %124 = getelementptr inbounds i8, ptr %6, i64 184
  store i64 1, ptr %124, align 8, !tbaa !35
  %125 = getelementptr inbounds i8, ptr %6, i64 192
  store ptr null, ptr %125, align 16, !tbaa !32
  %126 = getelementptr inbounds i8, ptr %6, i64 200
  store i64 200000000, ptr %126, align 8, !tbaa !34
  %127 = getelementptr inbounds i8, ptr %6, i64 208
  store i64 1, ptr %127, align 16, !tbaa !35
  %128 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %6) #10
  call void @ocl_check_err(i32 noundef %128, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %129 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %88) #10
  call void @ocl_check_err(i32 noundef %129, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %130 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %91) #10
  call void @ocl_check_err(i32 noundef %130, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %131 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %94) #10
  call void @ocl_check_err(i32 noundef %131, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %132 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %97) #10
  call void @ocl_check_err(i32 noundef %132, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %133 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %104) #10
  call void @ocl_check_err(i32 noundef %133, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %134 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %109) #10
  call void @ocl_check_err(i32 noundef %134, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %135 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %119) #10
  call void @ocl_check_err(i32 noundef %135, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %136 = call i32 @ocl_ctx_add_buffer(ptr noundef %69, ptr noundef nonnull byval(%struct.ocl_ctx_buf) align 8 %125) #10
  call void @ocl_check_err(i32 noundef %136, ptr noundef nonnull @.str.5, i32 noundef 168) #10
  %137 = load ptr, ptr %32, align 8, !tbaa !18
  %138 = getelementptr inbounds i8, ptr %137, i64 8
  %139 = load ptr, ptr %138, align 8, !tbaa !37
  %140 = call i32 @ocl_ctx_write_buffer(ptr noundef %69, i64 noundef 0, i64 noundef 6, ptr noundef %139) #10
  call void @ocl_check_err(i32 noundef %140, ptr noundef nonnull @.str.5, i32 noundef 174) #10
  %141 = load ptr, ptr %32, align 8, !tbaa !18
  %142 = load ptr, ptr %141, align 8, !tbaa !38
  %143 = call i32 @ocl_ctx_write_buffer(ptr noundef %69, i64 noundef 0, i64 noundef 5, ptr noundef %142) #10
  call void @ocl_check_err(i32 noundef %143, ptr noundef nonnull @.str.5, i32 noundef 179) #10
  %144 = load i32, ptr %3, align 4, !tbaa !23
  %145 = zext i32 %144 to i64
  %146 = call noalias ptr @calloc(i64 noundef %145, i64 noundef %22) #11
  %.not405 = icmp eq i32 %35, 0
  br i1 %.not405, label %._crit_edge, label %.lr.ph

147:                                              ; preds = %60, %147
  %.0368389 = phi i32 [ 0, %60 ], [ %149, %147 ]
  %148 = tail call i32 @ocl_ctx_add_queue(ptr noundef %69) #10
  tail call void @ocl_check_err(i32 noundef %148, ptr noundef nonnull @.str.5, i32 noundef 115) #10
  %149 = add nuw nsw i32 %.0368389, 1
  %exitcond.not = icmp eq i32 %149, %.0
  br i1 %exitcond.not, label %72, label %147, !llvm.loop !39

.lr.ph:                                           ; preds = %72
  %150 = getelementptr inbounds i8, ptr %1, i64 120
  %151 = getelementptr inbounds i8, ptr %1, i64 96
  %wide.trip.count = zext i32 %35 to i64
  br label %159

._crit_edge:                                      ; preds = %159, %72
  %152 = call i32 @ocl_ctx_write_buffer(ptr noundef %69, i64 noundef 0, i64 noundef 0, ptr noundef %146) #10
  call void @ocl_check_err(i32 noundef %152, ptr noundef nonnull @.str.5, i32 noundef 189) #10
  call void @free(ptr noundef %146) #10
  %153 = call noalias ptr @calloc(i64 noundef %145, i64 noundef %22) #11
  %154 = getelementptr inbounds i8, ptr %1, i64 128
  %155 = load i32, ptr %154, align 8, !tbaa !41
  %.not406 = icmp eq i32 %155, 0
  br i1 %.not406, label %._crit_edge401, label %.lr.ph400

.lr.ph400:                                        ; preds = %._crit_edge
  %156 = getelementptr inbounds i8, ptr %1, i64 136
  %157 = getelementptr inbounds i8, ptr %1, i64 144
  %158 = getelementptr inbounds i8, ptr %1, i64 72
  %.pre = load ptr, ptr %157, align 8, !tbaa !42
  br label %197

159:                                              ; preds = %.lr.ph, %159
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %159 ]
  %160 = load ptr, ptr %150, align 8, !tbaa !43
  %161 = getelementptr inbounds double, ptr %160, i64 %indvars.iv
  %162 = load double, ptr %161, align 8, !tbaa !44
  %163 = load double, ptr %151, align 8, !tbaa !45
  %164 = fsub double %162, %163
  call void @mprec_write_double(ptr noundef %146, i64 noundef %indvars.iv, double noundef %164, i1 noundef zeroext %21) #10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond410.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond410.not, label %._crit_edge, label %159, !llvm.loop !46

._crit_edge401:                                   ; preds = %._crit_edge396, %._crit_edge
  %165 = call i32 @ocl_ctx_write_buffer(ptr noundef %69, i64 noundef 0, i64 noundef 1, ptr noundef %153) #10
  call void @ocl_check_err(i32 noundef %165, ptr noundef nonnull @.str.5, i32 noundef 202) #10
  call void @free(ptr noundef %153) #10
  %166 = getelementptr inbounds i8, ptr %1, i64 160
  %167 = load ptr, ptr %166, align 8, !tbaa !47
  %168 = call i32 @ocl_ctx_write_buffer(ptr noundef %69, i64 noundef 0, i64 noundef 4, ptr noundef %167) #10
  call void @ocl_check_err(i32 noundef %168, ptr noundef nonnull @.str.5, i32 noundef 207) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  store float 0.000000e+00, ptr %7, align 4, !tbaa !48
  %169 = call i32 @ocl_ctx_fill_buffer(ptr noundef %69, i64 noundef 0, i64 noundef 7, ptr noundef nonnull %7, i64 noundef 4) #10
  call void @ocl_check_err(i32 noundef %169, ptr noundef nonnull @.str.5, i32 noundef 212) #10
  %170 = getelementptr inbounds i8, ptr %69, i64 32
  %171 = getelementptr inbounds i8, ptr %69, i64 56
  %172 = getelementptr inbounds i8, ptr %69, i64 80
  %173 = getelementptr inbounds i8, ptr %69, i64 104
  %174 = getelementptr inbounds i8, ptr %69, i64 128
  %175 = getelementptr inbounds i8, ptr %69, i64 152
  %176 = getelementptr inbounds i8, ptr %69, i64 176
  %177 = getelementptr inbounds i8, ptr %69, i64 200
  %178 = getelementptr inbounds i8, ptr %69, i64 224
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %179 = getelementptr inbounds i8, ptr %1, i64 104
  %180 = load double, ptr %179, align 8, !tbaa !50
  %181 = getelementptr inbounds i8, ptr %1, i64 96
  %182 = load double, ptr %181, align 8, !tbaa !45
  %183 = fsub double %180, %182
  store double %183, ptr %8, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #10
  %184 = getelementptr inbounds i8, ptr %1, i64 64
  %185 = load double, ptr %184, align 8, !tbaa !51
  %186 = fptrunc double %185 to float
  store float %186, ptr %9, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #10
  %187 = getelementptr inbounds i8, ptr %1, i64 80
  %188 = load double, ptr %187, align 8, !tbaa !52
  %189 = fptrunc double %188 to float
  store float %189, ptr %10, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #10
  %190 = getelementptr inbounds i8, ptr %1, i64 88
  %191 = load double, ptr %190, align 8, !tbaa !53
  %192 = fptrunc double %191 to float
  store float %192, ptr %11, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  %193 = getelementptr inbounds i8, ptr %1, i64 56
  %194 = load double, ptr %193, align 8, !tbaa !54
  %195 = fptrunc double %194 to float
  store float %195, ptr %12, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  %196 = fptrunc double %183 to float
  store float %196, ptr %13, align 4, !tbaa !48
  br i1 %21, label %219, label %218

197:                                              ; preds = %.lr.ph400, %._crit_edge396
  %198 = phi i32 [ %155, %.lr.ph400 ], [ %205, %._crit_edge396 ]
  %199 = phi ptr [ %.pre, %.lr.ph400 ], [ %206, %._crit_edge396 ]
  %indvars.iv411 = phi i64 [ 0, %.lr.ph400 ], [ %indvars.iv.next412, %._crit_edge396 ]
  %.0374398 = phi i32 [ 0, %.lr.ph400 ], [ %.1.lcssa, %._crit_edge396 ]
  %200 = load ptr, ptr %156, align 8, !tbaa !55
  %201 = getelementptr inbounds double, ptr %200, i64 %indvars.iv411
  %202 = load double, ptr %201, align 8, !tbaa !44
  %203 = getelementptr inbounds i32, ptr %199, i64 %indvars.iv411
  %204 = load i32, ptr %203, align 4, !tbaa !23
  %.not407 = icmp eq i32 %204, 0
  br i1 %.not407, label %._crit_edge396, label %.lr.ph395

._crit_edge396.loopexit:                          ; preds = %.lr.ph395
  %.pre429 = load i32, ptr %154, align 8, !tbaa !41
  br label %._crit_edge396

._crit_edge396:                                   ; preds = %._crit_edge396.loopexit, %197
  %205 = phi i32 [ %198, %197 ], [ %.pre429, %._crit_edge396.loopexit ]
  %206 = phi ptr [ %199, %197 ], [ %214, %._crit_edge396.loopexit ]
  %.1.lcssa = phi i32 [ %.0374398, %197 ], [ %213, %._crit_edge396.loopexit ]
  %indvars.iv.next412 = add nuw nsw i64 %indvars.iv411, 1
  %207 = zext i32 %205 to i64
  %208 = icmp ult i64 %indvars.iv.next412, %207
  br i1 %208, label %197, label %._crit_edge401, !llvm.loop !56

.lr.ph395:                                        ; preds = %197, %.lr.ph395
  %.1393 = phi i32 [ %213, %.lr.ph395 ], [ %.0374398, %197 ]
  %.0376392 = phi i32 [ %212, %.lr.ph395 ], [ 0, %197 ]
  %209 = zext i32 %.1393 to i64
  %210 = load double, ptr %158, align 8, !tbaa !57
  %211 = fmul double %202, %210
  call void @mprec_write_double(ptr noundef %153, i64 noundef %209, double noundef %211, i1 noundef zeroext %21) #10
  %212 = add nuw i32 %.0376392, 1
  %213 = add i32 %.1393, 1
  %214 = load ptr, ptr %157, align 8, !tbaa !42
  %215 = getelementptr inbounds i32, ptr %214, i64 %indvars.iv411
  %216 = load i32, ptr %215, align 4, !tbaa !23
  %217 = icmp ult i32 %212, %216
  br i1 %217, label %.lr.ph395, label %._crit_edge396.loopexit, !llvm.loop !58

218:                                              ; preds = %._crit_edge401
  br label %219

219:                                              ; preds = %218, %._crit_edge401
  %.0381 = phi ptr [ %187, %._crit_edge401 ], [ %10, %218 ]
  %.0380 = phi ptr [ %190, %._crit_edge401 ], [ %11, %218 ]
  %.0379 = phi ptr [ %193, %._crit_edge401 ], [ %12, %218 ]
  %.0378 = phi ptr [ %8, %._crit_edge401 ], [ %13, %218 ]
  %.0377 = phi ptr [ %184, %._crit_edge401 ], [ %9, %218 ]
  %220 = getelementptr inbounds i8, ptr %1, i64 112
  %221 = load i32, ptr %36, align 4, !tbaa !21
  %222 = icmp eq i32 %221, 0
  br i1 %222, label %223, label %228

223:                                              ; preds = %219
  %224 = getelementptr inbounds i8, ptr %69, i64 536
  %225 = load ptr, ptr %224, align 8, !tbaa !59
  %226 = load ptr, ptr %225, align 8, !tbaa !60
  %227 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %226, i64 noundef 19, i64 noundef 4, ptr noundef nonnull %3, i64 noundef 4, ptr noundef nonnull %4, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef 4, ptr noundef nonnull %99, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %172, i64 noundef 8, ptr noundef nonnull %173, i64 noundef 8, ptr noundef nonnull %174, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %178, i64 noundef 8, ptr noundef nonnull %171, i64 noundef 8, ptr noundef nonnull %176, i64 noundef 8, ptr noundef nonnull %177) #10
  call void @ocl_check_err(i32 noundef %227, ptr noundef nonnull @.str.5, i32 noundef 281) #10
  br label %274

228:                                              ; preds = %219
  %229 = getelementptr inbounds i8, ptr %1, i64 48
  %230 = load i32, ptr %229, align 8, !tbaa !17
  switch i32 %230, label %273 [
    i32 1, label %231
    i32 2, label %245
    i32 0, label %259
  ]

231:                                              ; preds = %228
  %232 = load i8, ptr %23, align 4, !tbaa !16, !range !14, !noundef !15
  %233 = trunc nuw i8 %232 to i1
  %234 = getelementptr inbounds i8, ptr %69, i64 536
  %235 = load ptr, ptr %234, align 8, !tbaa !59
  %236 = load ptr, ptr %235, align 8, !tbaa !60
  br i1 %233, label %237, label %243

237:                                              ; preds = %231
  %238 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %236, i64 noundef 9, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %174) #10
  call void @ocl_check_err(i32 noundef %238, ptr noundef nonnull @.str.5, i32 noundef 296) #10
  %239 = load ptr, ptr %234, align 8, !tbaa !59
  %240 = getelementptr inbounds i8, ptr %239, i64 8
  %241 = load ptr, ptr %240, align 8, !tbaa !60
  %242 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %241, i64 noundef 4, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %178, i64 noundef 8, ptr noundef nonnull %176) #10
  call void @ocl_check_err(i32 noundef %242, ptr noundef nonnull @.str.5, i32 noundef 304) #10
  br label %274

243:                                              ; preds = %231
  %244 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %236, i64 noundef 12, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %174, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %178, i64 noundef 8, ptr noundef nonnull %176) #10
  call void @ocl_check_err(i32 noundef %244, ptr noundef nonnull @.str.5, i32 noundef 320) #10
  br label %274

245:                                              ; preds = %228
  %246 = load i8, ptr %23, align 4, !tbaa !16, !range !14, !noundef !15
  %247 = trunc nuw i8 %246 to i1
  %248 = getelementptr inbounds i8, ptr %69, i64 536
  %249 = load ptr, ptr %248, align 8, !tbaa !59
  %250 = load ptr, ptr %249, align 8, !tbaa !60
  br i1 %247, label %251, label %257

251:                                              ; preds = %245
  %252 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %250, i64 noundef 9, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %174) #10
  call void @ocl_check_err(i32 noundef %252, ptr noundef nonnull @.str.5, i32 noundef 336) #10
  %253 = load ptr, ptr %248, align 8, !tbaa !59
  %254 = getelementptr inbounds i8, ptr %253, i64 8
  %255 = load ptr, ptr %254, align 8, !tbaa !60
  %256 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %255, i64 noundef 4, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %178, i64 noundef 8, ptr noundef nonnull %176) #10
  call void @ocl_check_err(i32 noundef %256, ptr noundef nonnull @.str.5, i32 noundef 344) #10
  br label %274

257:                                              ; preds = %245
  %258 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %250, i64 noundef 12, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %174, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %178, i64 noundef 8, ptr noundef nonnull %176) #10
  call void @ocl_check_err(i32 noundef %258, ptr noundef nonnull @.str.5, i32 noundef 360) #10
  br label %274

259:                                              ; preds = %228
  %260 = load i8, ptr %23, align 4, !tbaa !16, !range !14, !noundef !15
  %261 = trunc nuw i8 %260 to i1
  %262 = getelementptr inbounds i8, ptr %69, i64 536
  %263 = load ptr, ptr %262, align 8, !tbaa !59
  %264 = load ptr, ptr %263, align 8, !tbaa !60
  br i1 %261, label %265, label %271

265:                                              ; preds = %259
  %266 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %264, i64 noundef 5, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %176, i64 noundef 8, ptr noundef nonnull %177, i64 noundef 8, ptr noundef nonnull %178) #10
  call void @ocl_check_err(i32 noundef %266, ptr noundef nonnull @.str.5, i32 noundef 372) #10
  %267 = load ptr, ptr %262, align 8, !tbaa !59
  %268 = getelementptr inbounds i8, ptr %267, i64 8
  %269 = load ptr, ptr %268, align 8, !tbaa !60
  %270 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %269, i64 noundef 10, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %174, i64 noundef 8, ptr noundef nonnull %177) #10
  call void @ocl_check_err(i32 noundef %270, ptr noundef nonnull @.str.5, i32 noundef 386) #10
  br label %274

271:                                              ; preds = %259
  %272 = call i32 (ptr, i64, ...) @ocl_set_kernel_arguments(ptr noundef %264, i64 noundef 13, i64 noundef 4, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %220, i64 noundef %22, ptr noundef nonnull %.0378, i64 noundef %22, ptr noundef nonnull %.0377, i64 noundef %22, ptr noundef nonnull %.0381, i64 noundef %22, ptr noundef nonnull %.0380, i64 noundef %22, ptr noundef nonnull %.0379, i64 noundef 8, ptr noundef nonnull %170, i64 noundef 8, ptr noundef nonnull %174, i64 noundef 8, ptr noundef nonnull %175, i64 noundef 8, ptr noundef nonnull %176, i64 noundef 8, ptr noundef nonnull %177, i64 noundef 8, ptr noundef nonnull %178) #10
  call void @ocl_check_err(i32 noundef %272, ptr noundef nonnull @.str.5, i32 noundef 403) #10
  br label %274

273:                                              ; preds = %228
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.5, i32 noundef 406, ptr noundef nonnull @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #9
  unreachable

274:                                              ; preds = %243, %237, %271, %265, %251, %257, %223
  %275 = getelementptr inbounds i8, ptr %69, i64 520
  br label %281

276:                                              ; preds = %288
  %indvars.iv.next415 = add nuw nsw i64 %indvars.iv414, 1
  %exitcond418.not = icmp eq i64 %indvars.iv.next415, %78
  br i1 %exitcond418.not, label %277, label %281, !llvm.loop !61

277:                                              ; preds = %276
  %278 = call i64 (...) @nano_count() #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  %279 = load i64, ptr @__const.sim_config_run_on_opencl.wg_size, align 8
  store i64 %279, ptr %14, align 8
  %280 = getelementptr inbounds i8, ptr %69, i64 536
  br label %292

281:                                              ; preds = %274, %276
  %indvars.iv414 = phi i64 [ 0, %274 ], [ %indvars.iv.next415, %276 ]
  %282 = load ptr, ptr %275, align 8, !tbaa !62
  %283 = getelementptr inbounds ptr, ptr %282, i64 %indvars.iv414
  %284 = load ptr, ptr %283, align 8, !tbaa !60
  %285 = call i32 @clFlush(ptr noundef %284) #10
  %286 = icmp eq i32 %285, 0
  br i1 %286, label %288, label %287

287:                                              ; preds = %281
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.5, i32 noundef 410, ptr noundef nonnull @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #9
  unreachable

288:                                              ; preds = %281
  %289 = call i32 @clFinish(ptr noundef %284) #10
  %290 = icmp eq i32 %289, 0
  br i1 %290, label %276, label %291

291:                                              ; preds = %288
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.5, i32 noundef 411, ptr noundef nonnull @__PRETTY_FUNCTION__.sim_config_run_on_opencl) #9
  unreachable

292:                                              ; preds = %277, %292
  %indvars.iv419 = phi i64 [ 0, %277 ], [ %indvars.iv.next420, %292 ]
  %293 = load ptr, ptr %275, align 8, !tbaa !62
  %294 = getelementptr inbounds ptr, ptr %293, i64 %indvars.iv419
  %295 = load ptr, ptr %294, align 8, !tbaa !60
  %296 = load ptr, ptr %280, align 8, !tbaa !59
  %297 = getelementptr inbounds ptr, ptr %296, i64 %indvars.iv419
  %298 = load ptr, ptr %297, align 8, !tbaa !60
  %299 = call i32 @clEnqueueNDRangeKernel(ptr noundef %295, ptr noundef %298, i32 noundef 1, ptr noundef null, ptr noundef nonnull %14, ptr noundef nonnull %14, i32 noundef 0, ptr noundef null, ptr noundef null) #10
  call void @ocl_check_err(i32 noundef %299, ptr noundef nonnull @.str.5, i32 noundef 421) #10
  %indvars.iv.next420 = add nuw nsw i64 %indvars.iv419, 1
  %exitcond423.not = icmp eq i64 %indvars.iv.next420, %78
  br i1 %exitcond423.not, label %.preheader, label %292, !llvm.loop !63

300:                                              ; preds = %.preheader
  %301 = call i64 (...) @nano_count() #10
  %302 = sub i64 %301, %278
  %303 = getelementptr inbounds i8, ptr %69, i64 232
  %304 = load i64, ptr %303, align 8, !tbaa !34
  %305 = call noalias ptr @malloc(i64 noundef %304) #12
  %306 = call i32 @ocl_ctx_read_buffer(ptr noundef nonnull %69, i64 noundef 0, i64 noundef 8, ptr noundef %305) #10
  call void @ocl_check_err(i32 noundef %306, ptr noundef nonnull @.str.5, i32 noundef 429) #10
  call void @ocl_ctx_free(ptr noundef nonnull %69) #10
  store i32 50000000, ptr %15, align 4, !tbaa !23
  %307 = call ptr @npy_init(i8 noundef signext 117, i32 noundef 4, i32 noundef 1, ptr noundef nonnull %15, ptr noundef %305, i1 noundef zeroext false) #10
  %308 = load i32, ptr %305, align 4, !tbaa !23
  store i32 %308, ptr %0, align 8, !tbaa !64
  %309 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %302, ptr %309, align 8, !tbaa !66
  %310 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %307, ptr %310, align 8, !tbaa !67
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  ret void

.preheader:                                       ; preds = %292, %.preheader
  %indvars.iv424 = phi i64 [ %indvars.iv.next425, %.preheader ], [ 0, %292 ]
  %311 = load ptr, ptr %275, align 8, !tbaa !62
  %312 = getelementptr inbounds ptr, ptr %311, i64 %indvars.iv424
  %313 = load ptr, ptr %312, align 8, !tbaa !60
  %314 = call i32 @clFinish(ptr noundef %313) #10
  %indvars.iv.next425 = add nuw nsw i64 %indvars.iv424, 1
  %exitcond428.not = icmp eq i64 %indvars.iv.next425, %78
  br i1 %exitcond428.not, label %300, label %.preheader, !llvm.loop !68
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

declare void @synapse_index_free(ptr noundef) local_unnamed_addr #3

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

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

declare ptr @synapse_index_merge_delays(ptr noundef) local_unnamed_addr #3

declare ptr @ocl_ctx_init(i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @ocl_check_err(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @ocl_ctx_add_queue(ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

declare i32 @ocl_ctx_add_buffer(ptr noundef, ptr noundef byval(%struct.ocl_ctx_buf) align 8) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #5

declare void @mprec_write_double(ptr noundef, i64 noundef, double noundef, i1 noundef zeroext) 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 #6

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

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

declare i32 @clFlush(ptr noundef) local_unnamed_addr #3

declare i32 @clFinish(ptr noundef) local_unnamed_addr #3

declare i64 @nano_count(...) local_unnamed_addr #3

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

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

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

declare void @ocl_ctx_free(ptr noundef) local_unnamed_addr #3

declare ptr @npy_init(i8 noundef signext, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #8

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #6 = { 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 #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind }
attributes #11 = { nounwind allocsize(0,1) }
attributes #12 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !10, i64 24, !7, i64 32, !7, i64 36, !11, i64 40, !7, i64 44, !7, i64 48, !11, i64 52, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !8, i64 112, !7, i64 116, !10, i64 120, !7, i64 128, !10, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 168}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !11, i64 40}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!6, !11, i64 52}
!17 = !{!6, !7, i64 48}
!18 = !{!6, !10, i64 168}
!19 = !{!20, !7, i64 20}
!20 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24}
!21 = !{!6, !7, i64 44}
!22 = !{!6, !7, i64 116}
!23 = !{!7, !7, i64 0}
!24 = !{!20, !7, i64 24}
!25 = !{!6, !7, i64 32}
!26 = !{!6, !7, i64 36}
!27 = !{!28, !7, i64 552}
!28 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !29, i64 24, !8, i64 32, !29, i64 512, !10, i64 520, !29, i64 528, !10, i64 536, !10, i64 544, !7, i64 552}
!29 = !{!"long", !8, i64 0}
!30 = !{!6, !10, i64 24}
!31 = !{!6, !7, i64 152}
!32 = !{!33, !10, i64 0}
!33 = !{!"", !10, i64 0, !29, i64 8, !29, i64 16}
!34 = !{!33, !29, i64 8}
!35 = !{!33, !29, i64 16}
!36 = !{!20, !7, i64 16}
!37 = !{!20, !10, i64 8}
!38 = !{!20, !10, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!6, !7, i64 128}
!42 = !{!6, !10, i64 144}
!43 = !{!6, !10, i64 120}
!44 = !{!12, !12, i64 0}
!45 = !{!6, !12, i64 96}
!46 = distinct !{!46, !40}
!47 = !{!6, !10, i64 160}
!48 = !{!49, !49, i64 0}
!49 = !{!"float", !8, i64 0}
!50 = !{!6, !12, i64 104}
!51 = !{!6, !12, i64 64}
!52 = !{!6, !12, i64 80}
!53 = !{!6, !12, i64 88}
!54 = !{!6, !12, i64 56}
!55 = !{!6, !10, i64 136}
!56 = distinct !{!56, !40}
!57 = !{!6, !12, i64 72}
!58 = distinct !{!58, !40}
!59 = !{!28, !10, i64 536}
!60 = !{!10, !10, i64 0}
!61 = distinct !{!61, !40}
!62 = !{!28, !10, i64 520}
!63 = distinct !{!63, !40}
!64 = !{!65, !7, i64 0}
!65 = !{!"", !7, i64 0, !29, i64 8, !10, i64 16}
!66 = !{!65, !29, i64 8}
!67 = !{!65, !10, i64 16}
!68 = distinct !{!68, !40}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass