; 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_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i32, ptr }
%struct.extension_t = type { ptr, ptr, i32, %struct.dfs_code_t }
%struct.dfs_code_t = type { i16, i16, i32, i32, %struct.edge_label_t, i32 }
%struct.edge_label_t = type { i32, i32 }

@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__.new_subgraph_from_extension = external hidden unnamed_addr constant [68 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1

; 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: inlinehint nounwind uwtable
declare hidden i32 @rightmost_path_search(ptr noundef, i32 noundef, i16 noundef zeroext) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @new_subgraph_from_extension(ptr dead_on_unwind noalias writable sret(%struct.subgraph_t) align 8 %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %1, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.extension_t, ptr %11, i32 0, i32 3
  %13 = getelementptr inbounds %struct.dfs_code_t, ptr %12, i32 0, i32 0
  %14 = load i16, ptr %13, align 4, !tbaa !9
  %15 = zext i16 %14 to i32
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.subgraph_t, ptr %16, i32 0, i32 18
  %18 = load i16, ptr %17, align 8, !tbaa !15
  %19 = zext i16 %18 to i32
  %20 = icmp sle i32 %15, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  br label %23

22:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 1913, ptr noundef @__PRETTY_FUNCTION__.new_subgraph_from_extension) #7
  unreachable

23:                                               ; preds = %21
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.extension_t, ptr %24, i32 0, i32 3
  %26 = getelementptr inbounds %struct.dfs_code_t, ptr %25, i32 0, i32 1
  %27 = load i16, ptr %26, align 2, !tbaa !17
  %28 = zext i16 %27 to i32
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.subgraph_t, ptr %29, i32 0, i32 18
  %31 = load i16, ptr %30, align 8, !tbaa !15
  %32 = zext i16 %31 to i32
  %33 = add nsw i32 %32, 1
  %34 = icmp sle i32 %28, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %23
  br label %37

36:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.5, i32 noundef 1914, ptr noundef @__PRETTY_FUNCTION__.new_subgraph_from_extension) #7
  unreachable

37:                                               ; preds = %35
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 120, i1 false)
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.subgraph_t, ptr %38, i32 0, i32 14
  %40 = load i32, ptr %39, align 8, !tbaa !18
  %41 = add i32 %40, 1
  %42 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 14
  store i32 %41, ptr %42, align 8, !tbaa !18
  %43 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 14
  %44 = load i32, ptr %43, align 8, !tbaa !18
  %45 = zext i32 %44 to i64
  %46 = mul i64 %45, 24
  %47 = call noalias ptr @malloc(i64 noundef %46) #8
  %48 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 0
  store ptr %47, ptr %48, align 8, !tbaa !19
  %49 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !19
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.subgraph_t, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.subgraph_t, ptr %54, i32 0, i32 14
  %56 = load i32, ptr %55, align 8, !tbaa !18
  %57 = zext i32 %56 to i64
  %58 = mul i64 %57, 24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %53, i64 %58, i1 false)
  %59 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 14
  %62 = load i32, ptr %61, align 8, !tbaa !18
  %63 = sub i32 %62, 1
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds %struct.dfs_code_t, ptr %60, i64 %64
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.extension_t, ptr %66, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %67, i64 24, i1 false), !tbaa.struct !20
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.extension_t, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 8, !tbaa !23
  %71 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 10
  store i32 %70, ptr %71, align 8, !tbaa !24
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.extension_t, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !25
  %75 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 5
  store ptr %74, ptr %75, align 8, !tbaa !26
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.extension_t, ptr %76, i32 0, i32 3
  %78 = getelementptr inbounds %struct.dfs_code_t, ptr %77, i32 0, i32 1
  %79 = load i16, ptr %78, align 2, !tbaa !17
  %80 = zext i16 %79 to i32
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.extension_t, ptr %81, i32 0, i32 3
  %83 = getelementptr inbounds %struct.dfs_code_t, ptr %82, i32 0, i32 0
  %84 = load i16, ptr %83, align 4, !tbaa !9
  %85 = zext i16 %84 to i32
  %86 = icmp sgt i32 %80, %85
  br i1 %86, label %87, label %234

87:                                               ; preds = %37
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.extension_t, ptr %88, i32 0, i32 3
  %90 = getelementptr inbounds %struct.dfs_code_t, ptr %89, i32 0, i32 1
  %91 = load i16, ptr %90, align 2, !tbaa !17
  %92 = zext i16 %91 to i32
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.subgraph_t, ptr %93, i32 0, i32 18
  %95 = load i16, ptr %94, align 8, !tbaa !15
  %96 = zext i16 %95 to i32
  %97 = add nsw i32 %96, 1
  %98 = icmp eq i32 %92, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %87
  br label %101

100:                                              ; preds = %87
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.5, i32 noundef 1930, ptr noundef @__PRETTY_FUNCTION__.new_subgraph_from_extension) #7
  unreachable

101:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.subgraph_t, ptr %102, i32 0, i32 2
  %104 = load ptr, ptr %103, align 8, !tbaa !27
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.subgraph_t, ptr %105, i32 0, i32 13
  %107 = load i32, ptr %106, align 4, !tbaa !28
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.extension_t, ptr %108, i32 0, i32 3
  %110 = getelementptr inbounds %struct.dfs_code_t, ptr %109, i32 0, i32 0
  %111 = load i16, ptr %110, align 4, !tbaa !9
  %112 = call i32 @rightmost_path_search(ptr noundef %104, i32 noundef %107, i16 noundef zeroext %111)
  store i32 %112, ptr %6, align 4, !tbaa !22
  %113 = load i32, ptr %6, align 4, !tbaa !22
  %114 = add nsw i32 %113, 2
  %115 = sext i32 %114 to i64
  %116 = mul i64 %115, 2
  %117 = call noalias ptr @malloc(i64 noundef %116) #8
  %118 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 2
  store ptr %117, ptr %118, align 8, !tbaa !27
  %119 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !27
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.subgraph_t, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !27
  %124 = load i32, ptr %6, align 4, !tbaa !22
  %125 = add nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = mul i64 %126, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %120, ptr align 2 %123, i64 %127, i1 false)
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.extension_t, ptr %128, i32 0, i32 3
  %130 = getelementptr inbounds %struct.dfs_code_t, ptr %129, i32 0, i32 1
  %131 = load i16, ptr %130, align 2, !tbaa !17
  %132 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !27
  %134 = load i32, ptr %6, align 4, !tbaa !22
  %135 = add nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i16, ptr %133, i64 %136
  store i16 %131, ptr %137, align 2, !tbaa !21
  %138 = load i32, ptr %6, align 4, !tbaa !22
  %139 = add nsw i32 %138, 2
  %140 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 13
  store i32 %139, ptr %140, align 4, !tbaa !28
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.extension_t, ptr %141, i32 0, i32 3
  %143 = getelementptr inbounds %struct.dfs_code_t, ptr %142, i32 0, i32 1
  %144 = load i16, ptr %143, align 2, !tbaa !17
  %145 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 18
  store i16 %144, ptr %145, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %146 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 18
  %147 = load i16, ptr %146, align 8, !tbaa !15
  %148 = zext i16 %147 to i32
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %7, align 4, !tbaa !22
  %150 = load i32, ptr %7, align 4, !tbaa !22
  %151 = zext i32 %150 to i64
  %152 = mul i64 %151, 4
  %153 = call noalias ptr @malloc(i64 noundef %152) #8
  %154 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 1
  store ptr %153, ptr %154, align 8, !tbaa !29
  %155 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 1
  %156 = load ptr, ptr %155, align 8, !tbaa !29
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.subgraph_t, ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !29
  %160 = load i32, ptr %7, align 4, !tbaa !22
  %161 = sub i32 %160, 1
  %162 = zext i32 %161 to i64
  %163 = mul i64 %162, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %156, ptr align 4 %159, i64 %163, i1 false)
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.extension_t, ptr %164, i32 0, i32 3
  %166 = getelementptr inbounds %struct.dfs_code_t, ptr %165, i32 0, i32 3
  %167 = load i32, ptr %166, align 4, !tbaa !30
  %168 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 1
  %169 = load ptr, ptr %168, align 8, !tbaa !29
  %170 = load i32, ptr %7, align 4, !tbaa !22
  %171 = sub i32 %170, 1
  %172 = zext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %169, i64 %172
  store i32 %167, ptr %173, align 4, !tbaa !22
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.subgraph_t, ptr %174, i32 0, i32 19
  %176 = load i32, ptr %175, align 4, !tbaa !31
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %178, label %228

178:                                              ; preds = %101
  %179 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 19
  store i32 0, ptr %179, align 4, !tbaa !31
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.extension_t, ptr %180, i32 0, i32 3
  %182 = getelementptr inbounds %struct.dfs_code_t, ptr %181, i32 0, i32 0
  %183 = load i16, ptr %182, align 4, !tbaa !9
  %184 = zext i16 %183 to i32
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %213

186:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 1, ptr %8, align 4, !tbaa !22
  br label %187

187:                                              ; preds = %208, %186
  %188 = load i32, ptr %8, align 4, !tbaa !22
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.subgraph_t, ptr %189, i32 0, i32 14
  %191 = load i32, ptr %190, align 8, !tbaa !18
  %192 = icmp ult i32 %188, %191
  br i1 %192, label %194, label %193

193:                                              ; preds = %187
  store i32 2, ptr %9, align 4
  br label %211

194:                                              ; preds = %187
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.subgraph_t, ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !19
  %198 = load i32, ptr %8, align 4, !tbaa !22
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds %struct.dfs_code_t, ptr %197, i64 %199
  %201 = getelementptr inbounds %struct.dfs_code_t, ptr %200, i32 0, i32 0
  %202 = load i16, ptr %201, align 4, !tbaa !32
  %203 = zext i16 %202 to i32
  %204 = icmp eq i32 %203, 0
  br i1 %204, label %205, label %207

205:                                              ; preds = %194
  %206 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 19
  store i32 1, ptr %206, align 4, !tbaa !31
  store i32 2, ptr %9, align 4
  br label %211

207:                                              ; preds = %194
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %8, align 4, !tbaa !22
  %210 = add i32 %209, 1
  store i32 %210, ptr %8, align 4, !tbaa !22
  br label %187, !llvm.loop !33

211:                                              ; preds = %205, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %212

212:                                              ; preds = %211
  br label %227

213:                                              ; preds = %178
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.extension_t, ptr %214, i32 0, i32 3
  %216 = getelementptr inbounds %struct.dfs_code_t, ptr %215, i32 0, i32 0
  %217 = load i16, ptr %216, align 4, !tbaa !9
  %218 = zext i16 %217 to i32
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.subgraph_t, ptr %219, i32 0, i32 18
  %221 = load i16, ptr %220, align 8, !tbaa !15
  %222 = zext i16 %221 to i32
  %223 = icmp ne i32 %218, %222
  br i1 %223, label %224, label %226

224:                                              ; preds = %213
  %225 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 19
  store i32 1, ptr %225, align 4, !tbaa !31
  br label %226

226:                                              ; preds = %224, %213
  br label %227

227:                                              ; preds = %226, %212
  br label %233

228:                                              ; preds = %101
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.subgraph_t, ptr %229, i32 0, i32 19
  %231 = load i32, ptr %230, align 4, !tbaa !31
  %232 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 19
  store i32 %231, ptr %232, align 4, !tbaa !31
  br label %233

233:                                              ; preds = %228, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %279

234:                                              ; preds = %37
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.subgraph_t, ptr %235, i32 0, i32 13
  %237 = load i32, ptr %236, align 4, !tbaa !28
  %238 = zext i32 %237 to i64
  %239 = mul i64 %238, 2
  %240 = call noalias ptr @malloc(i64 noundef %239) #8
  %241 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 2
  store ptr %240, ptr %241, align 8, !tbaa !27
  %242 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 2
  %243 = load ptr, ptr %242, align 8, !tbaa !27
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.subgraph_t, ptr %244, i32 0, i32 2
  %246 = load ptr, ptr %245, align 8, !tbaa !27
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.subgraph_t, ptr %247, i32 0, i32 13
  %249 = load i32, ptr %248, align 4, !tbaa !28
  %250 = zext i32 %249 to i64
  %251 = mul i64 %250, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %243, ptr align 2 %246, i64 %251, i1 false)
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.subgraph_t, ptr %252, i32 0, i32 13
  %254 = load i32, ptr %253, align 4, !tbaa !28
  %255 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 13
  store i32 %254, ptr %255, align 4, !tbaa !28
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.subgraph_t, ptr %256, i32 0, i32 18
  %258 = load i16, ptr %257, align 8, !tbaa !15
  %259 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 18
  store i16 %258, ptr %259, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.subgraph_t, ptr %260, i32 0, i32 18
  %262 = load i16, ptr %261, align 8, !tbaa !15
  %263 = zext i16 %262 to i32
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %10, align 4, !tbaa !22
  %265 = load i32, ptr %10, align 4, !tbaa !22
  %266 = zext i32 %265 to i64
  %267 = mul i64 %266, 4
  %268 = call noalias ptr @malloc(i64 noundef %267) #8
  %269 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 1
  store ptr %268, ptr %269, align 8, !tbaa !29
  %270 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 1
  %271 = load ptr, ptr %270, align 8, !tbaa !29
  %272 = load ptr, ptr %4, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.subgraph_t, ptr %272, i32 0, i32 1
  %274 = load ptr, ptr %273, align 8, !tbaa !29
  %275 = load i32, ptr %10, align 4, !tbaa !22
  %276 = zext i32 %275 to i64
  %277 = mul i64 %276, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %271, ptr align 4 %274, i64 %277, i1 false)
  %278 = getelementptr inbounds %struct.subgraph_t, ptr %0, i32 0, i32 19
  store i32 2, ptr %278, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %279

279:                                              ; preds = %234, %233
  ret void
}

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

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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { noreturn nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !13, i64 20}
!10 = !{!"extension_t", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"dfs_code_t", !13, i64 0, !13, i64 2, !11, i64 4, !11, i64 8, !14, i64 12, !11, i64 20}
!13 = !{!"short", !7, i64 0}
!14 = !{!"edge_label_t", !11, i64 0, !11, i64 4}
!15 = !{!16, !13, i64 104}
!16 = !{!"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, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !13, i64 104, !11, i64 108, !6, i64 112}
!17 = !{!10, !13, i64 22}
!18 = !{!16, !11, i64 88}
!19 = !{!16, !6, i64 0}
!20 = !{i64 0, i64 2, !21, i64 2, i64 2, !21, i64 4, i64 4, !22, i64 8, i64 4, !22, i64 12, i64 4, !22, i64 16, i64 4, !22, i64 20, i64 4, !22}
!21 = !{!13, !13, i64 0}
!22 = !{!11, !11, i64 0}
!23 = !{!10, !11, i64 16}
!24 = !{!16, !11, i64 72}
!25 = !{!10, !6, i64 8}
!26 = !{!16, !6, i64 40}
!27 = !{!16, !6, i64 16}
!28 = !{!16, !11, i64 84}
!29 = !{!16, !6, i64 8}
!30 = !{!10, !11, i64 28}
!31 = !{!16, !11, i64 108}
!32 = !{!12, !13, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; 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.subgraph_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i32, ptr }
%struct.dfs_code_t = type { i16, i16, i32, i32, %struct.edge_label_t, i32 }
%struct.edge_label_t = type { i32, i32 }

@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__.new_subgraph_from_extension = external hidden unnamed_addr constant [68 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1

; 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @rightmost_path_search(ptr noundef, i32 noundef, i16 noundef zeroext) local_unnamed_addr #2

; 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) #3

; Function Attrs: nounwind uwtable
define dso_local void @new_subgraph_from_extension(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.subgraph_t) align 8 %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #4 {
  %4 = getelementptr inbounds i8, ptr %2, i64 20
  %5 = load i16, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 104
  %7 = load i16, ptr %6, align 8, !tbaa !14
  %.not = icmp ugt i16 %5, %7
  br i1 %.not, label %8, label %9

8:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 1913, ptr noundef nonnull @__PRETTY_FUNCTION__.new_subgraph_from_extension) #6
  unreachable

9:                                                ; preds = %3
  %10 = zext i16 %7 to i32
  %11 = getelementptr inbounds i8, ptr %2, i64 22
  %12 = load i16, ptr %11, align 2, !tbaa !16
  %13 = zext i16 %12 to i32
  %14 = add nuw nsw i32 %10, 1
  %.not51 = icmp ult i32 %14, %13
  br i1 %.not51, label %15, label %16

15:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.5, i32 noundef 1914, ptr noundef nonnull @__PRETTY_FUNCTION__.new_subgraph_from_extension) #6
  unreachable

16:                                               ; preds = %9
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %17, i8 0, i64 112, i1 false)
  %18 = getelementptr inbounds i8, ptr %1, i64 88
  %19 = load i32, ptr %18, align 8, !tbaa !17
  %20 = add i32 %19, 1
  %21 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 %20, ptr %21, align 8, !tbaa !17
  %22 = zext i32 %20 to i64
  %23 = mul nuw nsw i64 %22, 24
  %24 = tail call noalias ptr @malloc(i64 noundef %23) #7
  store ptr %24, ptr %0, align 8, !tbaa !18
  %25 = load ptr, ptr %1, align 8, !tbaa !18
  %26 = zext i32 %19 to i64
  %27 = mul nuw nsw i64 %26, 24
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %25, i64 %27, i1 false)
  %28 = getelementptr inbounds %struct.dfs_code_t, ptr %24, i64 %26
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(24) %4, i64 24, i1 false), !tbaa.struct !19
  %29 = getelementptr inbounds i8, ptr %2, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %30, ptr %31, align 8, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %2, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !24
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %33, ptr %34, align 8, !tbaa !25
  %35 = icmp ugt i16 %12, %5
  br i1 %35, label %36, label %88

36:                                               ; preds = %16
  %37 = icmp eq i32 %14, %13
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.5, i32 noundef 1930, ptr noundef nonnull @__PRETTY_FUNCTION__.new_subgraph_from_extension) #6
  unreachable

39:                                               ; preds = %36
  %40 = getelementptr inbounds i8, ptr %1, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %1, i64 84
  %43 = load i32, ptr %42, align 4, !tbaa !27
  %44 = tail call i32 @rightmost_path_search(ptr noundef %41, i32 noundef %43, i16 noundef zeroext %5)
  %45 = add nsw i32 %44, 2
  %46 = sext i32 %45 to i64
  %47 = shl nsw i64 %46, 1
  %48 = tail call noalias ptr @malloc(i64 noundef %47) #7
  %49 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %48, ptr %49, align 8, !tbaa !26
  %50 = load ptr, ptr %40, align 8, !tbaa !26
  %51 = add nsw i32 %44, 1
  %52 = sext i32 %51 to i64
  %53 = shl nsw i64 %52, 1
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %48, ptr align 2 %50, i64 %53, i1 false)
  %54 = load i16, ptr %11, align 2, !tbaa !16
  %55 = getelementptr inbounds i16, ptr %48, i64 %52
  store i16 %54, ptr %55, align 2, !tbaa !20
  %56 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %45, ptr %56, align 4, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %0, i64 104
  store i16 %54, ptr %57, align 8, !tbaa !14
  %58 = zext i16 %54 to i64
  %59 = shl nuw nsw i64 %58, 2
  %60 = add nuw nsw i64 %59, 4
  %61 = tail call noalias ptr @malloc(i64 noundef %60) #7
  %62 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %61, ptr %62, align 8, !tbaa !28
  %63 = getelementptr inbounds i8, ptr %1, i64 8
  %64 = load ptr, ptr %63, align 8, !tbaa !28
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %64, i64 %59, i1 false)
  %65 = getelementptr inbounds i8, ptr %2, i64 28
  %66 = load i32, ptr %65, align 4, !tbaa !29
  %67 = getelementptr inbounds i32, ptr %61, i64 %58
  store i32 %66, ptr %67, align 4, !tbaa !21
  %68 = getelementptr inbounds i8, ptr %1, i64 108
  %69 = load i32, ptr %68, align 4, !tbaa !30
  %70 = icmp eq i32 %69, 0
  %71 = getelementptr inbounds i8, ptr %0, i64 108
  br i1 %70, label %72, label %87

72:                                               ; preds = %39
  store i32 0, ptr %71, align 4, !tbaa !30
  %73 = load i16, ptr %4, align 4, !tbaa !5
  %74 = icmp eq i16 %73, 0
  br i1 %74, label %.preheader, label %84

.preheader:                                       ; preds = %72
  %75 = load i32, ptr %18, align 8, !tbaa !17
  %76 = icmp ugt i32 %75, 1
  br i1 %76, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %77 = load ptr, ptr %1, align 8, !tbaa !18
  %wide.trip.count = zext i32 %75 to i64
  br label %79

78:                                               ; preds = %79
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %79, !llvm.loop !31

79:                                               ; preds = %.lr.ph, %78
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %78 ]
  %80 = getelementptr inbounds %struct.dfs_code_t, ptr %77, i64 %indvars.iv
  %81 = load i16, ptr %80, align 4, !tbaa !33
  %82 = icmp eq i16 %81, 0
  br i1 %82, label %83, label %78

83:                                               ; preds = %79
  store i32 1, ptr %71, align 4, !tbaa !30
  br label %.loopexit

84:                                               ; preds = %72
  %85 = load i16, ptr %6, align 8, !tbaa !14
  %.not52 = icmp eq i16 %73, %85
  br i1 %.not52, label %.loopexit, label %86

86:                                               ; preds = %84
  store i32 1, ptr %71, align 4, !tbaa !30
  br label %.loopexit

87:                                               ; preds = %39
  store i32 %69, ptr %71, align 4, !tbaa !30
  br label %.loopexit

88:                                               ; preds = %16
  %89 = getelementptr inbounds i8, ptr %1, i64 84
  %90 = load i32, ptr %89, align 4, !tbaa !27
  %91 = zext i32 %90 to i64
  %92 = shl nuw nsw i64 %91, 1
  %93 = tail call noalias ptr @malloc(i64 noundef %92) #7
  %94 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %93, ptr %94, align 8, !tbaa !26
  %95 = getelementptr inbounds i8, ptr %1, i64 16
  %96 = load ptr, ptr %95, align 8, !tbaa !26
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %93, ptr align 2 %96, i64 %92, i1 false)
  %97 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %90, ptr %97, align 4, !tbaa !27
  %98 = getelementptr inbounds i8, ptr %0, i64 104
  store i16 %7, ptr %98, align 8, !tbaa !14
  %99 = zext i16 %7 to i64
  %100 = shl nuw nsw i64 %99, 2
  %101 = add nuw nsw i64 %100, 4
  %102 = tail call noalias ptr @malloc(i64 noundef %101) #7
  %103 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %102, ptr %103, align 8, !tbaa !28
  %104 = getelementptr inbounds i8, ptr %1, i64 8
  %105 = load ptr, ptr %104, align 8, !tbaa !28
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %102, ptr noundef nonnull align 4 dereferenceable(1) %105, i64 %101, i1 false)
  %106 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 2, ptr %106, align 4, !tbaa !30
  br label %.loopexit

.loopexit:                                        ; preds = %78, %.preheader, %87, %84, %86, %83, %88
  ret void
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !12, i64 20}
!6 = !{!"extension_t", !7, i64 0, !7, i64 8, !10, i64 16, !11, 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 = !{!"dfs_code_t", !12, i64 0, !12, i64 2, !10, i64 4, !10, i64 8, !13, i64 12, !10, i64 20}
!12 = !{!"short", !8, i64 0}
!13 = !{!"edge_label_t", !10, i64 0, !10, i64 4}
!14 = !{!15, !12, i64 104}
!15 = !{!"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, !12, i64 104, !10, i64 108, !7, i64 112}
!16 = !{!6, !12, i64 22}
!17 = !{!15, !10, i64 88}
!18 = !{!15, !7, i64 0}
!19 = !{i64 0, i64 2, !20, i64 2, i64 2, !20, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21, i64 16, i64 4, !21, i64 20, i64 4, !21}
!20 = !{!12, !12, i64 0}
!21 = !{!10, !10, i64 0}
!22 = !{!6, !10, i64 16}
!23 = !{!15, !10, i64 72}
!24 = !{!6, !7, i64 8}
!25 = !{!15, !7, i64 40}
!26 = !{!15, !7, i64 16}
!27 = !{!15, !10, i64 84}
!28 = !{!15, !7, i64 8}
!29 = !{!6, !10, i64 28}
!30 = !{!15, !10, i64 108}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!11, !12, i64 0}


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