; LLVM IR from kalininalab/rinminer :: rinminer (rinminer)

; 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.subgraph_store_t = type { ptr, ptr, i32, i32 }
%struct.thread_data_t = type { ptr, ptr, ptr, ptr, ptr, %struct.embedding_store_t, %struct.embedding_store_t, %struct.embedding_store_t, %struct.extension_store_t, ptr, %struct.rem_edge_store_t, ptr, ptr, i32, %struct.subgraph_store_t, i32 }
%struct.embedding_store_t = type { ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%struct.extension_store_t = type { ptr, ptr, ptr, i32, i32, i32 }
%struct.rem_edge_store_t = type { ptr, ptr, ptr }
%struct.subgraph_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i32, ptr }

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @gspan_step_helper(ptr noundef) #6

; Function Attrs: nounwind uwtable
define dso_local void @gspan_step(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #6 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.subgraph_store_t, ptr %40, i32 0, i32 2
  %42 = load i32, ptr %41, align 8, !tbaa !11
  store i32 %42, ptr %19, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %19, align 4, !tbaa !9
  %45 = icmp ult i32 %43, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %9
  %47 = load i32, ptr %12, align 4, !tbaa !9
  br label %50

48:                                               ; preds = %9
  %49 = load i32, ptr %19, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %48, %46
  %51 = phi i32 [ %47, %46 ], [ %49, %48 ]
  store i32 %51, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = mul i64 %53, 8
  %55 = call noalias ptr @malloc(i64 noundef %54) #10
  store ptr %55, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store volatile i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %79, %50
  %57 = load i32, ptr %22, align 4, !tbaa !9
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = icmp ult i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %82

61:                                               ; preds = %56
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = load i32, ptr %22, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds %struct.thread_data_t, ptr %62, i64 %64
  %66 = getelementptr inbounds %struct.thread_data_t, ptr %65, i32 0, i32 1
  store ptr %21, ptr %66, align 8, !tbaa !13
  %67 = load i32, ptr %19, align 4, !tbaa !9
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = load i32, ptr %22, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds %struct.thread_data_t, ptr %68, i64 %70
  %72 = getelementptr inbounds %struct.thread_data_t, ptr %71, i32 0, i32 15
  store i32 %67, ptr %72, align 8, !tbaa !18
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load i32, ptr %22, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds %struct.thread_data_t, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct.thread_data_t, ptr %77, i32 0, i32 0
  store ptr %73, ptr %78, align 8, !tbaa !19
  br label %79

79:                                               ; preds = %61
  %80 = load i32, ptr %22, align 4, !tbaa !9
  %81 = add i32 %80, 1
  store i32 %81, ptr %22, align 4, !tbaa !9
  br label %56, !llvm.loop !20

82:                                               ; preds = %60
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  call void @mark_output_start(ptr noundef %83)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %99, %82
  %85 = load i32, ptr %23, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = icmp ult i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %102

89:                                               ; preds = %84
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = load i32, ptr %23, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds i64, ptr %90, i64 %92
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = load i32, ptr %23, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds %struct.thread_data_t, ptr %94, i64 %96
  %98 = call i32 @pthread_create(ptr noundef %93, ptr noundef null, ptr noundef @gspan_step_helper, ptr noundef %97) #9
  br label %99

99:                                               ; preds = %89
  %100 = load i32, ptr %23, align 4, !tbaa !9
  %101 = add i32 %100, 1
  store i32 %101, ptr %23, align 4, !tbaa !9
  br label %84, !llvm.loop !22

102:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %124, %102
  %104 = load i32, ptr %25, align 4, !tbaa !9
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = icmp ult i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %127

108:                                              ; preds = %103
  %109 = load ptr, ptr %20, align 8, !tbaa !5
  %110 = load i32, ptr %25, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds i64, ptr %109, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !23
  %114 = call i32 @pthread_join(i64 noundef %113, ptr noundef null)
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = load i32, ptr %25, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds %struct.thread_data_t, ptr %115, i64 %117
  %119 = getelementptr inbounds %struct.thread_data_t, ptr %118, i32 0, i32 14
  %120 = getelementptr inbounds %struct.subgraph_store_t, ptr %119, i32 0, i32 2
  %121 = load i32, ptr %120, align 8, !tbaa !25
  %122 = load i32, ptr %24, align 4, !tbaa !9
  %123 = add i32 %122, %121
  store i32 %123, ptr %24, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %108
  %125 = load i32, ptr %25, align 4, !tbaa !9
  %126 = add i32 %125, 1
  store i32 %126, ptr %25, align 4, !tbaa !9
  br label %103, !llvm.loop !26

127:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %128 = load i32, ptr %24, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = mul i64 %129, 120
  %131 = call noalias ptr @malloc(i64 noundef %130) #10
  store ptr %131, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 0, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %169, %127
  %133 = load i32, ptr %28, align 4, !tbaa !9
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = icmp ult i32 %133, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %172

137:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = load i32, ptr %28, align 4, !tbaa !9
  %140 = zext i32 %139 to i64
  %141 = getelementptr inbounds %struct.thread_data_t, ptr %138, i64 %140
  %142 = getelementptr inbounds %struct.thread_data_t, ptr %141, i32 0, i32 14
  %143 = getelementptr inbounds %struct.subgraph_store_t, ptr %142, i32 0, i32 2
  %144 = load i32, ptr %143, align 8, !tbaa !25
  store i32 %144, ptr %29, align 4, !tbaa !9
  %145 = load ptr, ptr %26, align 8, !tbaa !5
  %146 = load i32, ptr %27, align 4, !tbaa !9
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds %struct.subgraph_t, ptr %145, i64 %147
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = load i32, ptr %28, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds %struct.thread_data_t, ptr %149, i64 %151
  %153 = getelementptr inbounds %struct.thread_data_t, ptr %152, i32 0, i32 14
  %154 = getelementptr inbounds %struct.subgraph_store_t, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !27
  %156 = load i32, ptr %29, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = mul i64 %157, 120
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %148, ptr align 8 %155, i64 %158, i1 false)
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = load i32, ptr %28, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds %struct.thread_data_t, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct.thread_data_t, ptr %162, i32 0, i32 14
  %164 = getelementptr inbounds %struct.subgraph_store_t, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !27
  call void @free(ptr noundef %165) #9
  %166 = load i32, ptr %29, align 4, !tbaa !9
  %167 = load i32, ptr %27, align 4, !tbaa !9
  %168 = add i32 %167, %166
  store i32 %168, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br label %169

169:                                              ; preds = %137
  %170 = load i32, ptr %28, align 4, !tbaa !9
  %171 = add i32 %170, 1
  store i32 %171, ptr %28, align 4, !tbaa !9
  br label %132, !llvm.loop !28

172:                                              ; preds = %136
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %173, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 -2147483648, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.subgraph_store_t, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !29
  %177 = load i32, ptr %19, align 4, !tbaa !9
  %178 = sub i32 %177, 1
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds %struct.subgraph_t, ptr %176, i64 %179
  %181 = getelementptr inbounds %struct.subgraph_t, ptr %180, i32 0, i32 8
  %182 = load i32, ptr %181, align 8, !tbaa !30
  %183 = add i32 %182, 1
  store i32 %183, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %228, %172
  %185 = load i32, ptr %33, align 4, !tbaa !9
  %186 = load i32, ptr %24, align 4, !tbaa !9
  %187 = icmp ult i32 %185, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %231

189:                                              ; preds = %184
  %190 = load i32, ptr %32, align 4, !tbaa !9
  %191 = add i32 %190, 1
  store i32 %191, ptr %32, align 4, !tbaa !9
  %192 = load ptr, ptr %26, align 8, !tbaa !5
  %193 = load i32, ptr %33, align 4, !tbaa !9
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds %struct.subgraph_t, ptr %192, i64 %194
  %196 = getelementptr inbounds %struct.subgraph_t, ptr %195, i32 0, i32 8
  store i32 %190, ptr %196, align 8, !tbaa !30
  %197 = load ptr, ptr %16, align 8, !tbaa !5
  %198 = load ptr, ptr %26, align 8, !tbaa !5
  %199 = load i32, ptr %33, align 4, !tbaa !9
  %200 = zext i32 %199 to i64
  %201 = getelementptr inbounds %struct.subgraph_t, ptr %198, i64 %200
  %202 = getelementptr inbounds %struct.subgraph_t, ptr %201, i32 0, i32 19
  %203 = load i32, ptr %202, align 4, !tbaa !33
  %204 = zext i32 %203 to i64
  %205 = getelementptr inbounds i32, ptr %197, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = add i32 %206, 1
  store i32 %207, ptr %205, align 4, !tbaa !9
  %208 = load ptr, ptr %26, align 8, !tbaa !5
  %209 = load i32, ptr %33, align 4, !tbaa !9
  %210 = zext i32 %209 to i64
  %211 = getelementptr inbounds %struct.subgraph_t, ptr %208, i64 %210
  %212 = getelementptr inbounds %struct.subgraph_t, ptr %211, i32 0, i32 11
  %213 = load i32, ptr %212, align 4, !tbaa !34
  %214 = load i32, ptr %30, align 4, !tbaa !9
  %215 = icmp sgt i32 %213, %214
  br i1 %215, label %216, label %227

216:                                              ; preds = %189
  %217 = load ptr, ptr %26, align 8, !tbaa !5
  %218 = load i32, ptr %33, align 4, !tbaa !9
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds %struct.subgraph_t, ptr %217, i64 %219
  %221 = getelementptr inbounds %struct.subgraph_t, ptr %220, i32 0, i32 11
  %222 = load i32, ptr %221, align 4, !tbaa !34
  store i32 %222, ptr %30, align 4, !tbaa !9
  %223 = load ptr, ptr %26, align 8, !tbaa !5
  %224 = load i32, ptr %33, align 4, !tbaa !9
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds %struct.subgraph_t, ptr %223, i64 %225
  store ptr %226, ptr %31, align 8, !tbaa !5
  br label %227

227:                                              ; preds = %216, %189
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %33, align 4, !tbaa !9
  %230 = add i32 %229, 1
  store i32 %230, ptr %33, align 4, !tbaa !9
  br label %184, !llvm.loop !35

231:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %232 = load i32, ptr %24, align 4, !tbaa !9
  %233 = udiv i32 %232, 3
  %234 = icmp uge i32 1024, %233
  br i1 %234, label %235, label %236

235:                                              ; preds = %231
  br label %239

236:                                              ; preds = %231
  %237 = load i32, ptr %24, align 4, !tbaa !9
  %238 = udiv i32 %237, 3
  br label %239

239:                                              ; preds = %236, %235
  %240 = phi i32 [ 1024, %235 ], [ %238, %236 ]
  store i32 %240, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %241 = load i32, ptr %34, align 4, !tbaa !9
  %242 = zext i32 %241 to i64
  %243 = call noalias ptr @calloc(i64 noundef %242, i64 noundef 8) #11
  store ptr %243, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 0, ptr %36, align 4, !tbaa !9
  br label %244

244:                                              ; preds = %278, %239
  %245 = load i32, ptr %36, align 4, !tbaa !9
  %246 = load i32, ptr %24, align 4, !tbaa !9
  %247 = icmp ult i32 %245, %246
  br i1 %247, label %249, label %248

248:                                              ; preds = %244
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %281

249:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  %250 = load ptr, ptr %26, align 8, !tbaa !5
  %251 = load i32, ptr %36, align 4, !tbaa !9
  %252 = zext i32 %251 to i64
  %253 = getelementptr inbounds %struct.subgraph_t, ptr %250, i64 %252
  %254 = getelementptr inbounds %struct.subgraph_t, ptr %253, i32 0, i32 9
  %255 = load i32, ptr %254, align 4, !tbaa !36
  store i32 %255, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  %256 = load i32, ptr %37, align 4, !tbaa !9
  %257 = load i32, ptr %34, align 4, !tbaa !9
  %258 = urem i32 %256, %257
  store i32 %258, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %259 = load ptr, ptr %35, align 8, !tbaa !5
  %260 = load i32, ptr %38, align 4, !tbaa !9
  %261 = zext i32 %260 to i64
  %262 = getelementptr inbounds ptr, ptr %259, i64 %261
  %263 = load ptr, ptr %262, align 8, !tbaa !5
  store ptr %263, ptr %39, align 8, !tbaa !5
  %264 = load ptr, ptr %26, align 8, !tbaa !5
  %265 = load i32, ptr %36, align 4, !tbaa !9
  %266 = zext i32 %265 to i64
  %267 = getelementptr inbounds %struct.subgraph_t, ptr %264, i64 %266
  %268 = load ptr, ptr %35, align 8, !tbaa !5
  %269 = load i32, ptr %38, align 4, !tbaa !9
  %270 = zext i32 %269 to i64
  %271 = getelementptr inbounds ptr, ptr %268, i64 %270
  store ptr %267, ptr %271, align 8, !tbaa !5
  %272 = load ptr, ptr %39, align 8, !tbaa !5
  %273 = load ptr, ptr %26, align 8, !tbaa !5
  %274 = load i32, ptr %36, align 4, !tbaa !9
  %275 = zext i32 %274 to i64
  %276 = getelementptr inbounds %struct.subgraph_t, ptr %273, i64 %275
  %277 = getelementptr inbounds %struct.subgraph_t, ptr %276, i32 0, i32 20
  store ptr %272, ptr %277, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %278

278:                                              ; preds = %249
  %279 = load i32, ptr %36, align 4, !tbaa !9
  %280 = add i32 %279, 1
  store i32 %280, ptr %36, align 4, !tbaa !9
  br label %244, !llvm.loop !38

281:                                              ; preds = %248
  %282 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %282) #9
  %283 = load ptr, ptr %26, align 8, !tbaa !5
  %284 = load ptr, ptr %15, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.subgraph_store_t, ptr %284, i32 0, i32 0
  store ptr %283, ptr %285, align 8, !tbaa !29
  %286 = load i32, ptr %24, align 4, !tbaa !9
  %287 = load ptr, ptr %15, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.subgraph_store_t, ptr %287, i32 0, i32 2
  store i32 %286, ptr %288, align 8, !tbaa !11
  %289 = load ptr, ptr %35, align 8, !tbaa !5
  %290 = load ptr, ptr %15, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.subgraph_store_t, ptr %290, i32 0, i32 1
  store ptr %289, ptr %291, align 8, !tbaa !39
  %292 = load i32, ptr %34, align 4, !tbaa !9
  %293 = load ptr, ptr %15, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.subgraph_store_t, ptr %293, i32 0, i32 3
  store i32 %292, ptr %294, align 4, !tbaa !40
  %295 = load ptr, ptr %31, align 8, !tbaa !5
  %296 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %295, ptr %296, align 8, !tbaa !5
  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 %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mark_output_start(ptr noundef) #7

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @pthread_join(i64 noundef, ptr noundef) #8

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { inlinehint 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 #8 = { "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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind allocsize(0,1) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"subgraph_store_t", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!13 = !{!14, !6, i64 8}
!14 = !{!"thread_data_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !15, i64 40, !15, i64 96, !15, i64 152, !16, i64 208, !6, i64 248, !17, i64 256, !6, i64 280, !6, i64 288, !10, i64 296, !12, i64 304, !10, i64 328}
!15 = !{!"embedding_store_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!16 = !{!"extension_store_t", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32}
!17 = !{!"rem_edge_store_t", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!14, !10, i64 328}
!19 = !{!14, !6, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!14, !10, i64 320}
!26 = distinct !{!26, !21}
!27 = !{!14, !6, i64 304}
!28 = distinct !{!28, !21}
!29 = !{!12, !6, i64 0}
!30 = !{!31, !10, i64 64}
!31 = !{!"subgraph_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !32, i64 104, !10, i64 108, !6, i64 112}
!32 = !{!"short", !7, i64 0}
!33 = !{!31, !10, i64 108}
!34 = !{!31, !10, i64 76}
!35 = distinct !{!35, !21}
!36 = !{!31, !10, i64 68}
!37 = !{!31, !6, i64 112}
!38 = distinct !{!38, !21}
!39 = !{!12, !6, i64 8}
!40 = !{!12, !10, i64 20}


; 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.thread_data_t = type { ptr, ptr, ptr, ptr, ptr, %struct.embedding_store_t, %struct.embedding_store_t, %struct.embedding_store_t, %struct.extension_store_t, ptr, %struct.rem_edge_store_t, ptr, ptr, i32, %struct.subgraph_store_t, i32 }
%struct.embedding_store_t = type { ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%struct.extension_store_t = type { ptr, ptr, ptr, i32, i32, i32 }
%struct.rem_edge_store_t = type { ptr, ptr, ptr }
%struct.subgraph_store_t = type { ptr, ptr, i32, i32 }
%struct.subgraph_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i32, ptr }

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

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

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

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

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

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

; Function Attrs: 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

; Function Attrs: nounwind uwtable
declare dso_local ptr @gspan_step_helper(ptr noundef) #6

; Function Attrs: nounwind uwtable
define dso_local void @gspan_step(ptr nocapture noundef readnone %0, ptr nocapture noundef readnone %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef %6, ptr nocapture noundef writeonly %7, ptr noundef %8) local_unnamed_addr #6 {
  %10 = alloca i32, align 4
  %11 = getelementptr inbounds i8, ptr %4, i64 16
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = tail call i32 @llvm.umin.i32(i32 %12, i32 %2)
  %14 = zext i32 %13 to i64
  %15 = shl nuw nsw i64 %14, 3
  %16 = tail call noalias ptr @malloc(i64 noundef %15) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #12
  store volatile i32 0, ptr %10, align 4, !tbaa !11
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %._crit_edge.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %9
  %xtraiter = and i64 %14, 3
  %17 = icmp ult i32 %13, 4
  br i1 %17, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %14, 4294967292
  br label %.lr.ph

._crit_edge.thread:                               ; preds = %9
  tail call void @mark_output_start(ptr noundef %8)
  br label %._crit_edge123.thread

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %18 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv.epil
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %10, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %18, i64 328
  store i32 %12, ptr %20, align 8, !tbaa !17
  store ptr %4, ptr %18, align 8, !tbaa !18
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.unr-lcssa
  call void @mark_output_start(ptr noundef %8)
  br i1 %.not, label %._crit_edge123.thread, label %.lr.ph114

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %21 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  store ptr %10, ptr %22, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %21, i64 328
  store i32 %12, ptr %23, align 8, !tbaa !17
  store ptr %4, ptr %21, align 8, !tbaa !18
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %24 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv.next
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  store ptr %10, ptr %25, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %24, i64 328
  store i32 %12, ptr %26, align 8, !tbaa !17
  store ptr %4, ptr %24, align 8, !tbaa !18
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %27 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv.next.1
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  store ptr %10, ptr %28, align 8, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %27, i64 328
  store i32 %12, ptr %29, align 8, !tbaa !17
  store ptr %4, ptr %27, align 8, !tbaa !18
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %30 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv.next.2
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  store ptr %10, ptr %31, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %30, i64 328
  store i32 %12, ptr %32, align 8, !tbaa !17
  store ptr %4, ptr %30, align 8, !tbaa !18
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %.lr.ph, !llvm.loop !21

.preheader:                                       ; preds = %.lr.ph114
  br i1 %.not, label %._crit_edge123.thread, label %.lr.ph117

.lr.ph114:                                        ; preds = %._crit_edge, %.lr.ph114
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %.lr.ph114 ], [ 0, %._crit_edge ]
  %33 = getelementptr inbounds i64, ptr %16, i64 %indvars.iv142
  %34 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv142
  %35 = call i32 @pthread_create(ptr noundef %33, ptr noundef null, ptr noundef nonnull @gspan_step_helper, ptr noundef %34) #12
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond146.not = icmp eq i64 %indvars.iv.next143, %14
  br i1 %exitcond146.not, label %.preheader, label %.lr.ph114, !llvm.loop !23

._crit_edge123.thread:                            ; preds = %._crit_edge, %._crit_edge.thread, %.preheader
  %36 = call noalias ptr @malloc(i64 noundef 0) #11
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %6, i8 0, i64 12, i1 false)
  br label %.thread

._crit_edge118:                                   ; preds = %.lr.ph117
  %37 = zext i32 %45 to i64
  %38 = mul nuw nsw i64 %37, 120
  %39 = call noalias ptr @malloc(i64 noundef %38) #11
  br i1 %.not, label %._crit_edge123, label %.lr.ph122

.lr.ph117:                                        ; preds = %.preheader, %.lr.ph117
  %indvars.iv147 = phi i64 [ %indvars.iv.next148, %.lr.ph117 ], [ 0, %.preheader ]
  %.098116 = phi i32 [ %45, %.lr.ph117 ], [ 0, %.preheader ]
  %40 = getelementptr inbounds i64, ptr %16, i64 %indvars.iv147
  %41 = load i64, ptr %40, align 8, !tbaa !24
  %42 = call i32 @pthread_join(i64 noundef %41, ptr noundef null) #12
  %43 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv147, i32 14, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !26
  %.fr191 = freeze i32 %44
  %45 = add i32 %.fr191, %.098116
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %exitcond151.not = icmp eq i64 %indvars.iv.next148, %14
  br i1 %exitcond151.not, label %._crit_edge118, label %.lr.ph117, !llvm.loop !27

._crit_edge123:                                   ; preds = %.lr.ph122, %._crit_edge118
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %6, i8 0, i64 12, i1 false)
  %.not139 = icmp eq i32 %45, 0
  br i1 %.not139, label %.thread, label %.lr.ph129.preheader

.lr.ph129.preheader:                              ; preds = %._crit_edge123
  %46 = load ptr, ptr %4, align 8, !tbaa !28
  %47 = add i32 %12, -1
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds %struct.subgraph_t, ptr %46, i64 %48, i32 8
  %50 = load i32, ptr %49, align 8, !tbaa !29
  br label %.lr.ph129

.lr.ph122:                                        ; preds = %._crit_edge118, %.lr.ph122
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %.lr.ph122 ], [ 0, %._crit_edge118 ]
  %.0105120 = phi i32 [ %59, %.lr.ph122 ], [ 0, %._crit_edge118 ]
  %51 = getelementptr inbounds %struct.thread_data_t, ptr %3, i64 %indvars.iv152, i32 14
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load i32, ptr %52, align 8, !tbaa !26
  %54 = zext i32 %.0105120 to i64
  %55 = getelementptr inbounds %struct.subgraph_t, ptr %39, i64 %54
  %56 = load ptr, ptr %51, align 8, !tbaa !32
  %57 = zext i32 %53 to i64
  %58 = mul nuw nsw i64 %57, 120
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 8 %56, i64 %58, i1 false)
  call void @free(ptr noundef %56) #12
  %59 = add i32 %53, %.0105120
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond156.not = icmp eq i64 %indvars.iv.next153, %14
  br i1 %exitcond156.not, label %._crit_edge123, label %.lr.ph122, !llvm.loop !33

.thread:                                          ; preds = %._crit_edge123.thread, %._crit_edge123
  %.ph173 = phi ptr [ %36, %._crit_edge123.thread ], [ %39, %._crit_edge123 ]
  %60 = call noalias dereferenceable_or_null(8192) ptr @calloc(i64 noundef 1024, i64 noundef 8) #13
  br label %._crit_edge135

._crit_edge130:                                   ; preds = %.lr.ph129
  %61 = icmp ult i32 %45, 3075
  br i1 %61, label %62, label %64

62:                                               ; preds = %._crit_edge130
  %63 = call noalias dereferenceable_or_null(8192) ptr @calloc(i64 noundef 1024, i64 noundef 8) #13
  br i1 %.not139, label %._crit_edge135, label %.lr.ph134.preheader

64:                                               ; preds = %._crit_edge130
  %65 = udiv i32 %45, 3
  %66 = zext nneg i32 %65 to i64
  %67 = call noalias ptr @calloc(i64 noundef %66, i64 noundef 8) #13
  br label %.lr.ph134.preheader

.lr.ph134.preheader:                              ; preds = %64, %62
  %68 = phi ptr [ %63, %62 ], [ %67, %64 ]
  %69 = phi i32 [ 1024, %62 ], [ %65, %64 ]
  %xtraiter192 = and i64 %37, 1
  %70 = icmp eq i32 %45, 1
  br i1 %70, label %._crit_edge135.loopexit.unr-lcssa, label %.lr.ph134.preheader.new

.lr.ph134.preheader.new:                          ; preds = %.lr.ph134.preheader
  %unroll_iter195 = and i64 %37, 4294967294
  br label %.lr.ph134

.lr.ph129:                                        ; preds = %.lr.ph129.preheader, %.lr.ph129
  %indvars.iv157 = phi i64 [ 0, %.lr.ph129.preheader ], [ %indvars.iv.next158, %.lr.ph129 ]
  %.0101.in126 = phi i32 [ %50, %.lr.ph129.preheader ], [ %.0101, %.lr.ph129 ]
  %.0102125 = phi ptr [ undef, %.lr.ph129.preheader ], [ %spec.select110, %.lr.ph129 ]
  %.0103124 = phi i32 [ -2147483648, %.lr.ph129.preheader ], [ %spec.select, %.lr.ph129 ]
  %.0101 = add i32 %.0101.in126, 1
  %71 = getelementptr inbounds %struct.subgraph_t, ptr %39, i64 %indvars.iv157
  %72 = getelementptr inbounds i8, ptr %71, i64 64
  store i32 %.0101, ptr %72, align 8, !tbaa !29
  %73 = getelementptr inbounds i8, ptr %71, i64 108
  %74 = load i32, ptr %73, align 4, !tbaa !34
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %6, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = add i32 %77, 1
  store i32 %78, ptr %76, align 4, !tbaa !11
  %79 = getelementptr inbounds i8, ptr %71, i64 76
  %80 = load i32, ptr %79, align 4, !tbaa !35
  %81 = icmp sgt i32 %80, %.0103124
  %spec.select = call i32 @llvm.smax.i32(i32 %80, i32 %.0103124)
  %spec.select110 = select i1 %81, ptr %71, ptr %.0102125
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %37
  br i1 %exitcond161.not, label %._crit_edge130, label %.lr.ph129, !llvm.loop !36

._crit_edge135.loopexit.unr-lcssa:                ; preds = %.lr.ph134, %.lr.ph134.preheader
  %indvars.iv162.unr = phi i64 [ 0, %.lr.ph134.preheader ], [ %indvars.iv.next163.1, %.lr.ph134 ]
  %lcmp.mod194.not = icmp eq i64 %xtraiter192, 0
  br i1 %lcmp.mod194.not, label %._crit_edge135, label %.lr.ph134.epil

.lr.ph134.epil:                                   ; preds = %._crit_edge135.loopexit.unr-lcssa
  %82 = getelementptr inbounds %struct.subgraph_t, ptr %39, i64 %indvars.iv162.unr
  %83 = getelementptr inbounds i8, ptr %82, i64 68
  %84 = load i32, ptr %83, align 4, !tbaa !37
  %85 = urem i32 %84, %69
  %86 = zext nneg i32 %85 to i64
  %87 = getelementptr inbounds ptr, ptr %68, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !38
  store ptr %82, ptr %87, align 8, !tbaa !38
  %89 = getelementptr inbounds i8, ptr %82, i64 112
  store ptr %88, ptr %89, align 8, !tbaa !39
  br label %._crit_edge135

._crit_edge135:                                   ; preds = %.lr.ph134.epil, %._crit_edge135.loopexit.unr-lcssa, %62, %.thread
  %90 = phi ptr [ %60, %.thread ], [ %63, %62 ], [ %68, %._crit_edge135.loopexit.unr-lcssa ], [ %68, %.lr.ph134.epil ]
  %91 = phi i32 [ 1024, %.thread ], [ 1024, %62 ], [ %69, %._crit_edge135.loopexit.unr-lcssa ], [ %69, %.lr.ph134.epil ]
  %.098.lcssa168171180188 = phi i32 [ 0, %.thread ], [ %45, %62 ], [ %45, %._crit_edge135.loopexit.unr-lcssa ], [ %45, %.lr.ph134.epil ]
  %92 = phi ptr [ %.ph173, %.thread ], [ %39, %62 ], [ %39, %._crit_edge135.loopexit.unr-lcssa ], [ %39, %.lr.ph134.epil ]
  %.0102.lcssa182187 = phi ptr [ undef, %.thread ], [ %spec.select110, %62 ], [ %spec.select110, %._crit_edge135.loopexit.unr-lcssa ], [ %spec.select110, %.lr.ph134.epil ]
  call void @free(ptr noundef %16) #12
  store ptr %92, ptr %5, align 8, !tbaa !28
  %93 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 %.098.lcssa168171180188, ptr %93, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %90, ptr %94, align 8, !tbaa !40
  %95 = getelementptr inbounds i8, ptr %5, i64 20
  store i32 %91, ptr %95, align 4, !tbaa !41
  store ptr %.0102.lcssa182187, ptr %7, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #12
  ret void

.lr.ph134:                                        ; preds = %.lr.ph134, %.lr.ph134.preheader.new
  %indvars.iv162 = phi i64 [ 0, %.lr.ph134.preheader.new ], [ %indvars.iv.next163.1, %.lr.ph134 ]
  %niter196 = phi i64 [ 0, %.lr.ph134.preheader.new ], [ %niter196.next.1, %.lr.ph134 ]
  %96 = getelementptr inbounds %struct.subgraph_t, ptr %39, i64 %indvars.iv162
  %97 = getelementptr inbounds i8, ptr %96, i64 68
  %98 = load i32, ptr %97, align 4, !tbaa !37
  %99 = urem i32 %98, %69
  %100 = zext nneg i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %68, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !38
  store ptr %96, ptr %101, align 8, !tbaa !38
  %103 = getelementptr inbounds i8, ptr %96, i64 112
  store ptr %102, ptr %103, align 8, !tbaa !39
  %indvars.iv.next163 = or disjoint i64 %indvars.iv162, 1
  %104 = getelementptr inbounds %struct.subgraph_t, ptr %39, i64 %indvars.iv.next163
  %105 = getelementptr inbounds i8, ptr %104, i64 68
  %106 = load i32, ptr %105, align 4, !tbaa !37
  %107 = urem i32 %106, %69
  %108 = zext nneg i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %68, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !38
  store ptr %104, ptr %109, align 8, !tbaa !38
  %111 = getelementptr inbounds i8, ptr %104, i64 112
  store ptr %110, ptr %111, align 8, !tbaa !39
  %indvars.iv.next163.1 = add nuw nsw i64 %indvars.iv162, 2
  %niter196.next.1 = add i64 %niter196, 2
  %niter196.ncmp.1 = icmp eq i64 %niter196.next.1, %unroll_iter195
  br i1 %niter196.ncmp.1, label %._crit_edge135.loopexit.unr-lcssa, label %.lr.ph134, !llvm.loop !42
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mark_output_start(ptr noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #8

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #9

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

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { inlinehint 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 #8 = { 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 #9 = { "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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { nounwind }
attributes #13 = { nounwind allocsize(0,1) }

!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, !10, i64 16}
!6 = !{!"subgraph_store_t", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !7, i64 8}
!13 = !{!"thread_data_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !14, i64 40, !14, i64 96, !14, i64 152, !15, i64 208, !7, i64 248, !16, i64 256, !7, i64 280, !7, i64 288, !10, i64 296, !6, i64 304, !10, i64 328}
!14 = !{!"embedding_store_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!15 = !{!"extension_store_t", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32}
!16 = !{!"rem_edge_store_t", !7, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!13, !10, i64 328}
!18 = !{!13, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!25, !25, i64 0}
!25 = !{!"long", !8, i64 0}
!26 = !{!13, !10, i64 320}
!27 = distinct !{!27, !22}
!28 = !{!6, !7, i64 0}
!29 = !{!30, !10, i64 64}
!30 = !{!"subgraph_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !31, i64 104, !10, i64 108, !7, i64 112}
!31 = !{!"short", !8, i64 0}
!32 = !{!13, !7, i64 304}
!33 = distinct !{!33, !22}
!34 = !{!30, !10, i64 108}
!35 = !{!30, !10, i64 76}
!36 = distinct !{!36, !22}
!37 = !{!30, !10, i64 68}
!38 = !{!7, !7, i64 0}
!39 = !{!30, !7, i64 112}
!40 = !{!6, !7, i64 8}
!41 = !{!6, !10, i64 20}
!42 = distinct !{!42, !22}


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