; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (sparse)

; 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.sparse_numerical = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@__func__.sp_num_alloc = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sp_num_alloc(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [2048 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca [2048 x i8], align 16
  %14 = alloca [2048 x i8], align 16
  %15 = alloca i32, align 4
  %16 = alloca [2048 x i8], align 16
  %17 = alloca i32, align 4
  %18 = alloca [2048 x i8], align 16
  %19 = alloca i32, align 4
  %20 = alloca [2048 x i8], align 16
  %21 = alloca i32, align 4
  %22 = alloca [2048 x i8], align 16
  %23 = alloca i32, align 4
  %24 = alloca [2048 x i8], align 16
  %25 = alloca i32, align 4
  %26 = alloca [2048 x i8], align 16
  %27 = alloca i32, align 4
  %28 = alloca [2048 x i8], align 16
  %29 = alloca i32, align 4
  %30 = alloca [2048 x i8], align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %31 = call noalias ptr @malloc(i64 noundef 80) #5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %31, ptr %32, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %41

36:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 80, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %11) #4
  %37 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  %38 = load i32, ptr %10, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %37, ptr noundef @.str, ptr noundef @.str.6, i32 noundef %38)
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %39, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 39, ptr noundef %40)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %11) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %300

41:                                               ; preds = %3
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  %45 = mul nsw i32 %42, %44
  store i32 %45, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = sdiv i32 %46, 2
  store i32 %47, ptr %8, align 4, !tbaa !9
  %48 = load i32, ptr %6, align 4, !tbaa !9
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.sparse_numerical, ptr %50, i32 0, i32 0
  store i32 %48, ptr %51, align 8, !tbaa !11
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.sparse_numerical, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call i32 @sp_mat_alloc(ptr noundef %54, i32 noundef %55, i32 noundef %56, i32 noundef %57, ptr noundef %58)
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %66

61:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 2048, ptr %13) #4
  %62 = getelementptr inbounds [2048 x i8], ptr %13, i64 0, i64 0
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %62, ptr noundef @.str.7, ptr noundef @.str.8, ptr noundef %63)
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds [2048 x i8], ptr %13, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %64, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 44, ptr noundef %65)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %13) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %300

66:                                               ; preds = %41
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.sparse_numerical, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call i32 @sp_mat_alloc(ptr noundef %69, i32 noundef %70, i32 noundef %71, i32 noundef %72, ptr noundef %73)
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %81

76:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 2048, ptr %14) #4
  %77 = getelementptr inbounds [2048 x i8], ptr %14, i64 0, i64 0
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %77, ptr noundef @.str.7, ptr noundef @.str.9, ptr noundef %78)
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds [2048 x i8], ptr %14, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %79, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 46, ptr noundef %80)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %14) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %300

81:                                               ; preds = %66
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = mul i64 %83, 8
  %85 = call noalias ptr @malloc(i64 noundef %84) #5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.sparse_numerical, ptr %87, i32 0, i32 3
  store ptr %85, ptr %88, align 8, !tbaa !13
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.sparse_numerical, ptr %90, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !13
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %103

94:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = mul i64 %96, 8
  %98 = trunc i64 %97 to i32
  store i32 %98, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %16) #4
  %99 = getelementptr inbounds [2048 x i8], ptr %16, i64 0, i64 0
  %100 = load i32, ptr %15, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %99, ptr noundef @.str, ptr noundef @.str.10, i32 noundef %100)
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds [2048 x i8], ptr %16, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %101, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 47, ptr noundef %102)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %16) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %300

103:                                              ; preds = %81
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = mul nsw i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = mul i64 %107, 4
  %109 = call noalias ptr @malloc(i64 noundef %108) #5
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.sparse_numerical, ptr %111, i32 0, i32 3
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = getelementptr inbounds ptr, ptr %113, i64 0
  store ptr %109, ptr %114, align 8, !tbaa !5
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.sparse_numerical, ptr %116, i32 0, i32 3
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = getelementptr inbounds ptr, ptr %118, i64 0
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  br i1 %121, label %122, label %133

122:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %123 = load i32, ptr %6, align 4, !tbaa !9
  %124 = load i32, ptr %6, align 4, !tbaa !9
  %125 = mul nsw i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = mul i64 %126, 4
  %128 = trunc i64 %127 to i32
  store i32 %128, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %18) #4
  %129 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %130 = load i32, ptr %17, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %129, ptr noundef @.str, ptr noundef @.str.11, i32 noundef %130)
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %131, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 49, ptr noundef %132)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %18) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %300

133:                                              ; preds = %103
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %158, %133
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = load i32, ptr %6, align 4, !tbaa !9
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %138, label %161

138:                                              ; preds = %134
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.sparse_numerical, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = load i32, ptr %9, align 4, !tbaa !9
  %144 = sub nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds ptr, ptr %142, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = load i32, ptr %6, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.sparse_numerical, ptr %152, i32 0, i32 3
  %154 = load ptr, ptr %153, align 8, !tbaa !13
  %155 = load i32, ptr %9, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds ptr, ptr %154, i64 %156
  store ptr %150, ptr %157, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %138
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %9, align 4, !tbaa !9
  br label %134, !llvm.loop !14

161:                                              ; preds = %134
  %162 = load i32, ptr %6, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = mul i64 %163, 4
  %165 = call noalias ptr @malloc(i64 noundef %164) #5
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.sparse_numerical, ptr %167, i32 0, i32 4
  store ptr %165, ptr %168, align 8, !tbaa !16
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.sparse_numerical, ptr %170, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !16
  %173 = icmp eq ptr %172, null
  br i1 %173, label %174, label %183

174:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %175 = load i32, ptr %6, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = mul i64 %176, 4
  %178 = trunc i64 %177 to i32
  store i32 %178, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %20) #4
  %179 = getelementptr inbounds [2048 x i8], ptr %20, i64 0, i64 0
  %180 = load i32, ptr %19, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %179, ptr noundef @.str, ptr noundef @.str.12, i32 noundef %180)
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = getelementptr inbounds [2048 x i8], ptr %20, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %181, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 52, ptr noundef %182)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %20) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %300

183:                                              ; preds = %161
  %184 = load i32, ptr %6, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = mul i64 %185, 4
  %187 = call noalias ptr @malloc(i64 noundef %186) #5
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.sparse_numerical, ptr %189, i32 0, i32 5
  store ptr %187, ptr %190, align 8, !tbaa !17
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.sparse_numerical, ptr %192, i32 0, i32 5
  %194 = load ptr, ptr %193, align 8, !tbaa !17
  %195 = icmp eq ptr %194, null
  br i1 %195, label %196, label %205

196:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %197 = load i32, ptr %6, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = mul i64 %198, 4
  %200 = trunc i64 %199 to i32
  store i32 %200, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %22) #4
  %201 = getelementptr inbounds [2048 x i8], ptr %22, i64 0, i64 0
  %202 = load i32, ptr %21, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %201, ptr noundef @.str, ptr noundef @.str.13, i32 noundef %202)
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = getelementptr inbounds [2048 x i8], ptr %22, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %203, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 53, ptr noundef %204)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %22) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %300

205:                                              ; preds = %183
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = mul i64 %207, 4
  %209 = call noalias ptr @malloc(i64 noundef %208) #5
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = load ptr, ptr %210, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.sparse_numerical, ptr %211, i32 0, i32 6
  store ptr %209, ptr %212, align 8, !tbaa !18
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.sparse_numerical, ptr %214, i32 0, i32 6
  %216 = load ptr, ptr %215, align 8, !tbaa !18
  %217 = icmp eq ptr %216, null
  br i1 %217, label %218, label %227

218:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %219 = load i32, ptr %6, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = mul i64 %220, 4
  %222 = trunc i64 %221 to i32
  store i32 %222, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %24) #4
  %223 = getelementptr inbounds [2048 x i8], ptr %24, i64 0, i64 0
  %224 = load i32, ptr %23, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %223, ptr noundef @.str, ptr noundef @.str.14, i32 noundef %224)
  %225 = load ptr, ptr %7, align 8, !tbaa !5
  %226 = getelementptr inbounds [2048 x i8], ptr %24, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %225, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 54, ptr noundef %226)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %24) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %300

227:                                              ; preds = %205
  %228 = load i32, ptr %6, align 4, !tbaa !9
  %229 = add nsw i32 %228, 1
  %230 = sext i32 %229 to i64
  %231 = mul i64 %230, 4
  %232 = call noalias ptr @malloc(i64 noundef %231) #5
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = load ptr, ptr %233, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.sparse_numerical, ptr %234, i32 0, i32 7
  store ptr %232, ptr %235, align 8, !tbaa !19
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.sparse_numerical, ptr %237, i32 0, i32 7
  %239 = load ptr, ptr %238, align 8, !tbaa !19
  %240 = icmp eq ptr %239, null
  br i1 %240, label %241, label %251

241:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %242 = load i32, ptr %6, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  %244 = sext i32 %243 to i64
  %245 = mul i64 %244, 4
  %246 = trunc i64 %245 to i32
  store i32 %246, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %26) #4
  %247 = getelementptr inbounds [2048 x i8], ptr %26, i64 0, i64 0
  %248 = load i32, ptr %25, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %247, ptr noundef @.str, ptr noundef @.str.15, i32 noundef %248)
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = getelementptr inbounds [2048 x i8], ptr %26, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %249, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 56, ptr noundef %250)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %26) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %300

251:                                              ; preds = %227
  %252 = load i32, ptr %6, align 4, !tbaa !9
  %253 = sext i32 %252 to i64
  %254 = mul i64 %253, 8
  %255 = call noalias ptr @malloc(i64 noundef %254) #5
  %256 = load ptr, ptr %5, align 8, !tbaa !5
  %257 = load ptr, ptr %256, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.sparse_numerical, ptr %257, i32 0, i32 9
  store ptr %255, ptr %258, align 8, !tbaa !20
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = load ptr, ptr %259, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.sparse_numerical, ptr %260, i32 0, i32 9
  %262 = load ptr, ptr %261, align 8, !tbaa !20
  %263 = icmp eq ptr %262, null
  br i1 %263, label %264, label %273

264:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %265 = load i32, ptr %6, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = mul i64 %266, 8
  %268 = trunc i64 %267 to i32
  store i32 %268, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %28) #4
  %269 = getelementptr inbounds [2048 x i8], ptr %28, i64 0, i64 0
  %270 = load i32, ptr %27, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %269, ptr noundef @.str, ptr noundef @.str.16, i32 noundef %270)
  %271 = load ptr, ptr %7, align 8, !tbaa !5
  %272 = getelementptr inbounds [2048 x i8], ptr %28, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %271, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 57, ptr noundef %272)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %28) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %300

273:                                              ; preds = %251
  %274 = load i32, ptr %6, align 4, !tbaa !9
  %275 = add nsw i32 %274, 1
  %276 = mul nsw i32 8, %275
  %277 = sext i32 %276 to i64
  %278 = mul i64 %277, 4
  %279 = call noalias ptr @malloc(i64 noundef %278) #5
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  %281 = load ptr, ptr %280, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.sparse_numerical, ptr %281, i32 0, i32 8
  store ptr %279, ptr %282, align 8, !tbaa !21
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = load ptr, ptr %283, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.sparse_numerical, ptr %284, i32 0, i32 8
  %286 = load ptr, ptr %285, align 8, !tbaa !21
  %287 = icmp eq ptr %286, null
  br i1 %287, label %288, label %299

288:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %289 = load i32, ptr %6, align 4, !tbaa !9
  %290 = add nsw i32 %289, 1
  %291 = mul nsw i32 8, %290
  %292 = sext i32 %291 to i64
  %293 = mul i64 %292, 4
  %294 = trunc i64 %293 to i32
  store i32 %294, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %30) #4
  %295 = getelementptr inbounds [2048 x i8], ptr %30, i64 0, i64 0
  %296 = load i32, ptr %29, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %295, ptr noundef @.str, ptr noundef @.str.17, i32 noundef %296)
  %297 = load ptr, ptr %7, align 8, !tbaa !5
  %298 = getelementptr inbounds [2048 x i8], ptr %30, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %297, ptr noundef @.str.2, ptr noundef @__func__.sp_num_alloc, i32 noundef 58, ptr noundef %298)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %30) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %300

299:                                              ; preds = %273
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %300

300:                                              ; preds = %299, %288, %264, %241, %218, %196, %174, %122, %94, %76, %61, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %301 = load i32, ptr %4, align 4
  ret i32 %301
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"sparse_numerical", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!13 = !{!12, !6, i64 24}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!12, !6, i64 32}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 48}
!19 = !{!12, !6, i64 56}
!20 = !{!12, !6, i64 72}
!21 = !{!12, !6, i64 64}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@__func__.sp_num_alloc = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

declare void @class_protect_sprintf(ptr noundef, 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) #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @sp_num_alloc(ptr nocapture noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca [2048 x i8], align 16
  %5 = alloca [2048 x i8], align 16
  %6 = alloca [2048 x i8], align 16
  %7 = alloca [2048 x i8], align 16
  %8 = alloca [2048 x i8], align 16
  %9 = alloca [2048 x i8], align 16
  %10 = alloca [2048 x i8], align 16
  %11 = alloca [2048 x i8], align 16
  %12 = alloca [2048 x i8], align 16
  %13 = alloca [2048 x i8], align 16
  %14 = alloca [2048 x i8], align 16
  %15 = tail call noalias dereferenceable_or_null(80) ptr @malloc(i64 noundef 80) #4
  store ptr %15, ptr %0, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %4) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.6, i32 noundef 80) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 39, ptr noundef nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #5
  br label %157

18:                                               ; preds = %3
  %19 = add nsw i32 %1, 1
  %20 = mul nsw i32 %19, %1
  %21 = sdiv i32 %20, 2
  store i32 %1, ptr %15, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %15, i64 8
  %23 = tail call i32 @sp_mat_alloc(ptr noundef nonnull %22, i32 noundef %1, i32 noundef %1, i32 noundef %21, ptr noundef %2)
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %26

25:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %5) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, ptr noundef %2) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 44, ptr noundef nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %5) #5
  br label %157

26:                                               ; preds = %18
  %27 = load ptr, ptr %0, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = tail call i32 @sp_mat_alloc(ptr noundef nonnull %28, i32 noundef %1, i32 noundef %1, i32 noundef %21, ptr noundef %2)
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %6) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.9, ptr noundef %2) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 46, ptr noundef nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %6) #5
  br label %157

32:                                               ; preds = %26
  %33 = sext i32 %1 to i64
  %34 = shl nsw i64 %33, 3
  %35 = tail call noalias ptr @malloc(i64 noundef %34) #4
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 24
  store ptr %35, ptr %37, align 8, !tbaa !12
  %38 = load ptr, ptr %0, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load ptr, ptr %39, align 8, !tbaa !12
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %44

42:                                               ; preds = %32
  %43 = trunc i64 %34 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %7) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str, ptr noundef nonnull @.str.10, i32 noundef %43) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 47, ptr noundef nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %7) #5
  br label %157

44:                                               ; preds = %32
  %45 = mul nsw i32 %1, %1
  %46 = zext nneg i32 %45 to i64
  %47 = shl nuw nsw i64 %46, 2
  %48 = tail call noalias ptr @malloc(i64 noundef %47) #4
  store ptr %48, ptr %40, align 8, !tbaa !5
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 24
  %51 = load ptr, ptr %50, align 8, !tbaa !12
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %58, label %.preheader

.preheader:                                       ; preds = %44
  %54 = icmp sgt i32 %1, 1
  br i1 %54, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %1 to i64
  %55 = add nsw i64 %wide.trip.count, -1
  %56 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %55, 3
  %57 = icmp ult i64 %56, 3
  br i1 %57, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %55, -4
  br label %.lr.ph

58:                                               ; preds = %44
  %59 = trunc i64 %47 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %8) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.11, i32 noundef %59) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 49, ptr noundef nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %8) #5
  br label %157

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %60 = load ptr, ptr %0, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !12
  %63 = getelementptr ptr, ptr %62, i64 %indvars.iv
  %64 = getelementptr i8, ptr %63, i64 -8
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds i32, ptr %65, i64 %33
  store ptr %66, ptr %63, align 8, !tbaa !5
  %67 = load ptr, ptr %0, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 24
  %69 = load ptr, ptr %68, align 8, !tbaa !12
  %70 = getelementptr ptr, ptr %69, i64 %indvars.iv
  %71 = getelementptr i8, ptr %70, i64 8
  %72 = load ptr, ptr %70, align 8, !tbaa !5
  %73 = getelementptr inbounds i32, ptr %72, i64 %33
  store ptr %73, ptr %71, align 8, !tbaa !5
  %74 = load ptr, ptr %0, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %74, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !12
  %77 = getelementptr ptr, ptr %76, i64 %indvars.iv
  %78 = getelementptr i8, ptr %77, i64 16
  %79 = getelementptr i8, ptr %77, i64 8
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds i32, ptr %80, i64 %33
  store ptr %81, ptr %78, align 8, !tbaa !5
  %82 = load ptr, ptr %0, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 24
  %84 = load ptr, ptr %83, align 8, !tbaa !12
  %85 = getelementptr ptr, ptr %84, i64 %indvars.iv
  %86 = getelementptr i8, ptr %85, i64 24
  %87 = getelementptr i8, ptr %85, i64 16
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds i32, ptr %88, i64 %33
  store ptr %89, ptr %86, align 8, !tbaa !5
  %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.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !13

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 1, %.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.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %90 = load ptr, ptr %0, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 24
  %92 = load ptr, ptr %91, align 8, !tbaa !12
  %93 = getelementptr ptr, ptr %92, i64 %indvars.iv.epil
  %94 = getelementptr i8, ptr %93, i64 -8
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds i32, ptr %95, i64 %33
  store ptr %96, ptr %93, align 8, !tbaa !5
  %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.loopexit, label %.lr.ph.epil, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %97 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %49, %.preheader ]
  %98 = shl nsw i64 %33, 2
  %99 = tail call noalias ptr @malloc(i64 noundef %98) #4
  %100 = getelementptr inbounds i8, ptr %97, i64 32
  store ptr %99, ptr %100, align 8, !tbaa !17
  %101 = load ptr, ptr %0, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i64 32
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = icmp eq ptr %103, null
  br i1 %104, label %105, label %107

105:                                              ; preds = %._crit_edge
  %106 = trunc i64 %98 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %9) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str, ptr noundef nonnull @.str.12, i32 noundef %106) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 52, ptr noundef nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %9) #5
  br label %157

107:                                              ; preds = %._crit_edge
  %108 = tail call noalias ptr @malloc(i64 noundef %98) #4
  %109 = getelementptr inbounds i8, ptr %101, i64 40
  store ptr %108, ptr %109, align 8, !tbaa !18
  %110 = load ptr, ptr %0, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 40
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %116

114:                                              ; preds = %107
  %115 = trunc i64 %98 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %10) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str, ptr noundef nonnull @.str.13, i32 noundef %115) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 53, ptr noundef nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %10) #5
  br label %157

116:                                              ; preds = %107
  %117 = tail call noalias ptr @malloc(i64 noundef %98) #4
  %118 = getelementptr inbounds i8, ptr %110, i64 48
  store ptr %117, ptr %118, align 8, !tbaa !19
  %119 = load ptr, ptr %0, align 8, !tbaa !5
  %120 = getelementptr inbounds i8, ptr %119, i64 48
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = icmp eq ptr %121, null
  br i1 %122, label %123, label %125

123:                                              ; preds = %116
  %124 = trunc i64 %98 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %11) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %11, ptr noundef nonnull @.str, ptr noundef nonnull @.str.14, i32 noundef %124) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 54, ptr noundef nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %11) #5
  br label %157

125:                                              ; preds = %116
  %126 = sext i32 %19 to i64
  %127 = shl nsw i64 %126, 2
  %128 = tail call noalias ptr @malloc(i64 noundef %127) #4
  %129 = getelementptr inbounds i8, ptr %119, i64 56
  store ptr %128, ptr %129, align 8, !tbaa !20
  %130 = load ptr, ptr %0, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 56
  %132 = load ptr, ptr %131, align 8, !tbaa !20
  %133 = icmp eq ptr %132, null
  br i1 %133, label %134, label %136

134:                                              ; preds = %125
  %135 = trunc i64 %127 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %12) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %12, ptr noundef nonnull @.str, ptr noundef nonnull @.str.15, i32 noundef %135) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 56, ptr noundef nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %12) #5
  br label %157

136:                                              ; preds = %125
  %137 = tail call noalias ptr @malloc(i64 noundef %34) #4
  %138 = getelementptr inbounds i8, ptr %130, i64 72
  store ptr %137, ptr %138, align 8, !tbaa !21
  %139 = load ptr, ptr %0, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 72
  %141 = load ptr, ptr %140, align 8, !tbaa !21
  %142 = icmp eq ptr %141, null
  br i1 %142, label %143, label %145

143:                                              ; preds = %136
  %144 = trunc i64 %34 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %13) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %13, ptr noundef nonnull @.str, ptr noundef nonnull @.str.16, i32 noundef %144) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 57, ptr noundef nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %13) #5
  br label %157

145:                                              ; preds = %136
  %146 = shl nsw i32 %19, 3
  %147 = sext i32 %146 to i64
  %148 = shl nsw i64 %147, 2
  %149 = tail call noalias ptr @malloc(i64 noundef %148) #4
  %150 = getelementptr inbounds i8, ptr %139, i64 64
  store ptr %149, ptr %150, align 8, !tbaa !22
  %151 = load ptr, ptr %0, align 8, !tbaa !5
  %152 = getelementptr inbounds i8, ptr %151, i64 64
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = icmp eq ptr %153, null
  br i1 %154, label %155, label %157

155:                                              ; preds = %145
  %156 = trunc i64 %148 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %14) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %14, ptr noundef nonnull @.str, ptr noundef nonnull @.str.17, i32 noundef %156) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.sp_num_alloc, i32 noundef 58, ptr noundef nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %14) #5
  br label %157

157:                                              ; preds = %145, %155, %143, %134, %123, %114, %105, %58, %42, %31, %25, %17
  %.0 = phi i32 [ 1, %17 ], [ 1, %25 ], [ 1, %31 ], [ 1, %42 ], [ 1, %58 ], [ 1, %105 ], [ 1, %114 ], [ 1, %123 ], [ 1, %134 ], [ 1, %143 ], [ 1, %155 ], [ 0, %145 ]
  ret i32 %.0
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind allocsize(0) }
attributes #5 = { 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, !11, i64 0}
!10 = !{!"sparse_numerical", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 24}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = !{!10, !6, i64 32}
!18 = !{!10, !6, i64 40}
!19 = !{!10, !6, i64 48}
!20 = !{!10, !6, i64 56}
!21 = !{!10, !6, i64 72}
!22 = !{!10, !6, i64 64}


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