; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/core/src/c_src (simplemat)

; 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.BmpFileHeader = type <{ i16, i32, i16, i16, i32 }>
%struct.BmpInfoHeader = type { i32, i32, i32, i16, i16, i32, i32, i32, i32, i32, i32 }
%struct.SIMPLE_MAT = type { i32, i32, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

declare i32 @printf(ptr noundef, ...) #1

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

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

; 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
declare void @free(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local void @smwrite_bmp(ptr noundef %0, ptr noundef %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.BmpFileHeader, align 1
  %15 = alloca %struct.BmpInfoHeader, align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %2
  br label %31

27:                                               ; preds = %2
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #7
  unreachable

31:                                               ; preds = %26
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %31
  br label %39

35:                                               ; preds = %31
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #7
  unreachable

39:                                               ; preds = %34
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %40, i32 0, i32 2
  %42 = load i32, ptr %41, align 8, !tbaa !9
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %39
  br label %49

45:                                               ; preds = %39
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #7
  unreachable

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = call noalias ptr @fopen(ptr noundef %50, ptr noundef @.str.13)
  store ptr %51, ptr %5, align 8, !tbaa !5
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %55

54:                                               ; preds = %49
  br label %59

55:                                               ; preds = %49
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #7
  unreachable

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 4, !tbaa !12
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %67

64:                                               ; preds = %59
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = call ptr @sm_gray2rgb(ptr noundef %65)
  store ptr %66, ptr %6, align 8, !tbaa !5
  br label %69

67:                                               ; preds = %59
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %68, ptr %6, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %67, %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %70, i32 0, i32 5
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  store ptr %72, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !14
  store i32 %75, ptr %8, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !16
  store i32 %78, ptr %9, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 3, ptr %10, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 24, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !15
  %79 = load i32, ptr %11, align 4, !tbaa !15
  %80 = icmp eq i32 %79, 8
  br i1 %80, label %81, label %82

81:                                               ; preds = %69
  store i32 1024, ptr %12, align 4, !tbaa !15
  br label %82

82:                                               ; preds = %81, %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %83 = load i32, ptr %8, align 4, !tbaa !15
  %84 = load i32, ptr %11, align 4, !tbaa !15
  %85 = mul nsw i32 %83, %84
  %86 = sdiv i32 %85, 8
  %87 = add nsw i32 %86, 3
  %88 = sdiv i32 %87, 4
  %89 = mul nsw i32 %88, 4
  store i32 %89, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 14, ptr %14) #8
  %90 = getelementptr inbounds %struct.BmpFileHeader, ptr %14, i32 0, i32 0
  store i16 19778, ptr %90, align 1, !tbaa !17
  %91 = load i32, ptr %12, align 4, !tbaa !15
  %92 = sext i32 %91 to i64
  %93 = add i64 54, %92
  %94 = load i32, ptr %13, align 4, !tbaa !15
  %95 = load i32, ptr %9, align 4, !tbaa !15
  %96 = mul nsw i32 %94, %95
  %97 = sext i32 %96 to i64
  %98 = add i64 %93, %97
  %99 = trunc i64 %98 to i32
  %100 = getelementptr inbounds %struct.BmpFileHeader, ptr %14, i32 0, i32 1
  store i32 %99, ptr %100, align 1, !tbaa !20
  %101 = getelementptr inbounds %struct.BmpFileHeader, ptr %14, i32 0, i32 2
  store i16 0, ptr %101, align 1, !tbaa !21
  %102 = getelementptr inbounds %struct.BmpFileHeader, ptr %14, i32 0, i32 3
  store i16 0, ptr %102, align 1, !tbaa !22
  %103 = load i32, ptr %12, align 4, !tbaa !15
  %104 = add nsw i32 54, %103
  %105 = getelementptr inbounds %struct.BmpFileHeader, ptr %14, i32 0, i32 4
  store i32 %104, ptr %105, align 1, !tbaa !23
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = call i64 @fwrite(ptr noundef %14, i64 noundef 14, i64 noundef 1, ptr noundef %106)
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #8
  %108 = load i32, ptr %11, align 4, !tbaa !15
  %109 = trunc i32 %108 to i16
  %110 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 4
  store i16 %109, ptr %110, align 1, !tbaa !24
  %111 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 10
  store i32 0, ptr %111, align 1, !tbaa !26
  %112 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 9
  store i32 0, ptr %112, align 1, !tbaa !27
  %113 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 5
  store i32 0, ptr %113, align 1, !tbaa !28
  %114 = load i32, ptr %9, align 4, !tbaa !15
  %115 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 2
  store i32 %114, ptr %115, align 1, !tbaa !29
  %116 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 3
  store i16 1, ptr %116, align 1, !tbaa !30
  %117 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 0
  store i32 40, ptr %117, align 1, !tbaa !31
  %118 = load i32, ptr %13, align 4, !tbaa !15
  %119 = load i32, ptr %9, align 4, !tbaa !15
  %120 = mul nsw i32 %118, %119
  %121 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 6
  store i32 %120, ptr %121, align 1, !tbaa !32
  %122 = load i32, ptr %8, align 4, !tbaa !15
  %123 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 1
  store i32 %122, ptr %123, align 1, !tbaa !33
  %124 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 7
  store i32 100, ptr %124, align 1, !tbaa !34
  %125 = getelementptr inbounds %struct.BmpInfoHeader, ptr %15, i32 0, i32 8
  store i32 100, ptr %125, align 1, !tbaa !35
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call i64 @fwrite(ptr noundef %15, i64 noundef 40, i64 noundef 1, ptr noundef %126)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !15
  br label %128

128:                                              ; preds = %224, %82
  %129 = load i32, ptr %16, align 4, !tbaa !15
  %130 = load i32, ptr %9, align 4, !tbaa !15
  %131 = sdiv i32 %130, 2
  %132 = icmp slt i32 %129, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %128
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %227

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !15
  br label %135

135:                                              ; preds = %220, %134
  %136 = load i32, ptr %18, align 4, !tbaa !15
  %137 = load i32, ptr %8, align 4, !tbaa !15
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %223

140:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !15
  br label %141

141:                                              ; preds = %216, %140
  %142 = load i32, ptr %19, align 4, !tbaa !15
  %143 = load i32, ptr %10, align 4, !tbaa !15
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %219

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = load i32, ptr %16, align 4, !tbaa !15
  %149 = load i32, ptr %8, align 4, !tbaa !15
  %150 = mul nsw i32 %148, %149
  %151 = load i32, ptr %10, align 4, !tbaa !15
  %152 = mul nsw i32 %150, %151
  %153 = load i32, ptr %18, align 4, !tbaa !15
  %154 = load i32, ptr %10, align 4, !tbaa !15
  %155 = mul nsw i32 %153, %154
  %156 = add nsw i32 %152, %155
  %157 = load i32, ptr %19, align 4, !tbaa !15
  %158 = add nsw i32 %156, %157
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i8, ptr %147, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !36
  %162 = zext i8 %161 to i32
  store i32 %162, ptr %20, align 4, !tbaa !15
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = load i32, ptr %9, align 4, !tbaa !15
  %165 = load i32, ptr %16, align 4, !tbaa !15
  %166 = sub nsw i32 %164, %165
  %167 = sub nsw i32 %166, 1
  %168 = load i32, ptr %8, align 4, !tbaa !15
  %169 = mul nsw i32 %167, %168
  %170 = load i32, ptr %10, align 4, !tbaa !15
  %171 = mul nsw i32 %169, %170
  %172 = load i32, ptr %18, align 4, !tbaa !15
  %173 = load i32, ptr %10, align 4, !tbaa !15
  %174 = mul nsw i32 %172, %173
  %175 = add nsw i32 %171, %174
  %176 = add nsw i32 %175, 2
  %177 = load i32, ptr %19, align 4, !tbaa !15
  %178 = sub nsw i32 %176, %177
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i8, ptr %163, i64 %179
  %181 = load i8, ptr %180, align 1, !tbaa !36
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load i32, ptr %16, align 4, !tbaa !15
  %184 = load i32, ptr %8, align 4, !tbaa !15
  %185 = mul nsw i32 %183, %184
  %186 = load i32, ptr %10, align 4, !tbaa !15
  %187 = mul nsw i32 %185, %186
  %188 = load i32, ptr %18, align 4, !tbaa !15
  %189 = load i32, ptr %10, align 4, !tbaa !15
  %190 = mul nsw i32 %188, %189
  %191 = add nsw i32 %187, %190
  %192 = load i32, ptr %19, align 4, !tbaa !15
  %193 = add nsw i32 %191, %192
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i8, ptr %182, i64 %194
  store i8 %181, ptr %195, align 1, !tbaa !36
  %196 = load i32, ptr %20, align 4, !tbaa !15
  %197 = trunc i32 %196 to i8
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = load i32, ptr %9, align 4, !tbaa !15
  %200 = load i32, ptr %16, align 4, !tbaa !15
  %201 = sub nsw i32 %199, %200
  %202 = sub nsw i32 %201, 1
  %203 = load i32, ptr %8, align 4, !tbaa !15
  %204 = mul nsw i32 %202, %203
  %205 = load i32, ptr %10, align 4, !tbaa !15
  %206 = mul nsw i32 %204, %205
  %207 = load i32, ptr %18, align 4, !tbaa !15
  %208 = load i32, ptr %10, align 4, !tbaa !15
  %209 = mul nsw i32 %207, %208
  %210 = add nsw i32 %206, %209
  %211 = add nsw i32 %210, 2
  %212 = load i32, ptr %19, align 4, !tbaa !15
  %213 = sub nsw i32 %211, %212
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i8, ptr %198, i64 %214
  store i8 %197, ptr %215, align 1, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %216

216:                                              ; preds = %146
  %217 = load i32, ptr %19, align 4, !tbaa !15
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %19, align 4, !tbaa !15
  br label %141, !llvm.loop !37

219:                                              ; preds = %145
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %18, align 4, !tbaa !15
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %18, align 4, !tbaa !15
  br label %135, !llvm.loop !39

223:                                              ; preds = %139
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %16, align 4, !tbaa !15
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %16, align 4, !tbaa !15
  br label %128, !llvm.loop !40

227:                                              ; preds = %133
  %228 = load i32, ptr %13, align 4, !tbaa !15
  %229 = load i32, ptr %8, align 4, !tbaa !15
  %230 = load i32, ptr %11, align 4, !tbaa !15
  %231 = mul nsw i32 %229, %230
  %232 = sdiv i32 %231, 8
  %233 = icmp sgt i32 %228, %232
  br i1 %233, label %234, label %273

234:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %235 = load i32, ptr %9, align 4, !tbaa !15
  %236 = load i32, ptr %13, align 4, !tbaa !15
  %237 = mul nsw i32 %235, %236
  %238 = sext i32 %237 to i64
  %239 = call noalias ptr @malloc(i64 noundef %238) #9
  store ptr %239, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %240 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %240, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !15
  br label %241

241:                                              ; preds = %261, %234
  %242 = load i32, ptr %23, align 4, !tbaa !15
  %243 = load i32, ptr %9, align 4, !tbaa !15
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %264

246:                                              ; preds = %241
  %247 = load ptr, ptr %22, align 8, !tbaa !5
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  %249 = load i32, ptr %8, align 4, !tbaa !15
  %250 = mul nsw i32 %249, 3
  %251 = sext i32 %250 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %247, ptr align 1 %248, i64 %251, i1 false)
  %252 = load i32, ptr %8, align 4, !tbaa !15
  %253 = mul nsw i32 %252, 3
  %254 = load ptr, ptr %7, align 8, !tbaa !5
  %255 = sext i32 %253 to i64
  %256 = getelementptr inbounds i8, ptr %254, i64 %255
  store ptr %256, ptr %7, align 8, !tbaa !5
  %257 = load i32, ptr %13, align 4, !tbaa !15
  %258 = load ptr, ptr %22, align 8, !tbaa !5
  %259 = sext i32 %257 to i64
  %260 = getelementptr inbounds i8, ptr %258, i64 %259
  store ptr %260, ptr %22, align 8, !tbaa !5
  br label %261

261:                                              ; preds = %246
  %262 = load i32, ptr %23, align 4, !tbaa !15
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %23, align 4, !tbaa !15
  br label %241, !llvm.loop !41

264:                                              ; preds = %245
  %265 = load ptr, ptr %21, align 8, !tbaa !5
  %266 = load i32, ptr %9, align 4, !tbaa !15
  %267 = load i32, ptr %13, align 4, !tbaa !15
  %268 = mul nsw i32 %266, %267
  %269 = sext i32 %268 to i64
  %270 = load ptr, ptr %5, align 8, !tbaa !5
  %271 = call i64 @fwrite(ptr noundef %265, i64 noundef %269, i64 noundef 1, ptr noundef %270)
  %272 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %272) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %281

273:                                              ; preds = %227
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = load i32, ptr %9, align 4, !tbaa !15
  %276 = load i32, ptr %13, align 4, !tbaa !15
  %277 = mul nsw i32 %275, %276
  %278 = sext i32 %277 to i64
  %279 = load ptr, ptr %5, align 8, !tbaa !5
  %280 = call i64 @fwrite(ptr noundef %274, i64 noundef %278, i64 noundef 1, ptr noundef %279)
  br label %281

281:                                              ; preds = %273, %264
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = call i32 @fclose(ptr noundef %282)
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 14, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void
}

declare ptr @sm_gray2rgb(ptr noundef) #1

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 12}
!13 = !{!10, !6, i64 24}
!14 = !{!10, !11, i64 4}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"BmpFileHeader", !19, i64 0, !11, i64 2, !19, i64 6, !19, i64 8, !11, i64 10}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !11, i64 2}
!21 = !{!18, !19, i64 6}
!22 = !{!18, !19, i64 8}
!23 = !{!18, !11, i64 10}
!24 = !{!25, !19, i64 14}
!25 = !{!"BmpInfoHeader", !11, i64 0, !11, i64 4, !11, i64 8, !19, i64 12, !19, i64 14, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!26 = !{!25, !11, i64 36}
!27 = !{!25, !11, i64 32}
!28 = !{!25, !11, i64 16}
!29 = !{!25, !11, i64 8}
!30 = !{!25, !19, i64 12}
!31 = !{!25, !11, i64 0}
!32 = !{!25, !11, i64 20}
!33 = !{!25, !11, i64 4}
!34 = !{!25, !11, i64 24}
!35 = !{!25, !11, i64 28}
!36 = !{!7, !7, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}
!40 = distinct !{!40, !38}
!41 = distinct !{!41, !38}


; 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.BmpFileHeader = type <{ i16, i32, i16, i16, i32 }>
%struct.BmpInfoHeader = type { i32, i32, i32, i16, i16, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

; 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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local void @smwrite_bmp(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #6 {
  %3 = alloca %struct.BmpFileHeader, align 2
  %4 = alloca %struct.BmpInfoHeader, align 4
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %5, label %9

5:                                                ; preds = %2
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #8
  unreachable

9:                                                ; preds = %2
  %.not101 = icmp eq ptr %1, null
  br i1 %.not101, label %10, label %14

10:                                               ; preds = %9
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #8
  unreachable

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %22, label %18

18:                                               ; preds = %14
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #8
  unreachable

22:                                               ; preds = %14
  %23 = tail call noalias ptr @fopen(ptr noundef nonnull %0, ptr noundef nonnull @.str.13)
  %.not102 = icmp eq ptr %23, null
  br i1 %.not102, label %24, label %28

24:                                               ; preds = %22
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #8
  unreachable

28:                                               ; preds = %22
  %29 = getelementptr inbounds i8, ptr %1, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  %33 = tail call ptr @sm_gray2rgb(ptr noundef nonnull %1) #9
  br label %34

34:                                               ; preds = %28, %32
  %.091 = phi ptr [ %33, %32 ], [ %1, %28 ]
  %35 = getelementptr inbounds i8, ptr %.091, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %.091, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = load i32, ptr %.091, align 8, !tbaa !14
  %40 = mul nsw i32 %38, 3
  %41 = add nsw i32 %40, 3
  %42 = sdiv i32 %41, 4
  %43 = shl nsw i32 %42, 2
  call void @llvm.lifetime.start.p0(i64 14, ptr nonnull %3) #9
  store i16 19778, ptr %3, align 2, !tbaa !15
  %44 = mul nsw i32 %43, %39
  %45 = sext i32 %44 to i64
  %46 = add i32 %44, 54
  %47 = getelementptr inbounds i8, ptr %3, i64 2
  store i32 %46, ptr %47, align 2, !tbaa !18
  %48 = getelementptr inbounds i8, ptr %3, i64 6
  store i16 0, ptr %48, align 2, !tbaa !19
  %49 = getelementptr inbounds i8, ptr %3, i64 8
  store i16 0, ptr %49, align 2, !tbaa !20
  %50 = getelementptr inbounds i8, ptr %3, i64 10
  store i32 54, ptr %50, align 2, !tbaa !21
  %51 = call i64 @fwrite(ptr noundef nonnull %3, i64 noundef 14, i64 noundef 1, ptr noundef nonnull %23)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #9
  %52 = getelementptr inbounds i8, ptr %4, i64 14
  store i16 24, ptr %52, align 2, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %4, i64 36
  store i32 0, ptr %53, align 4, !tbaa !24
  %54 = getelementptr inbounds i8, ptr %4, i64 32
  store i32 0, ptr %54, align 4, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 0, ptr %55, align 4, !tbaa !26
  %56 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %39, ptr %56, align 4, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %4, i64 12
  store i16 1, ptr %57, align 4, !tbaa !28
  store i32 40, ptr %4, align 4, !tbaa !29
  %58 = getelementptr inbounds i8, ptr %4, i64 20
  store i32 %44, ptr %58, align 4, !tbaa !30
  %59 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 %38, ptr %59, align 4, !tbaa !31
  %60 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 100, ptr %60, align 4, !tbaa !32
  %61 = getelementptr inbounds i8, ptr %4, i64 28
  store i32 100, ptr %61, align 4, !tbaa !33
  %62 = call i64 @fwrite(ptr noundef nonnull %4, i64 noundef 40, i64 noundef 1, ptr noundef nonnull %23)
  %63 = icmp sgt i32 %39, 1
  %64 = icmp sgt i32 %38, 0
  %or.cond = select i1 %63, i1 %64, i1 false
  br i1 %or.cond, label %.preheader103.us.preheader, label %._crit_edge107

.preheader103.us.preheader:                       ; preds = %34
  %65 = lshr i32 %39, 1
  %66 = zext nneg i32 %38 to i64
  %wide.trip.count117 = zext nneg i32 %65 to i64
  %invariant.gep = getelementptr i8, ptr %36, i64 1
  %invariant.gep120 = getelementptr i8, ptr %36, i64 1
  %invariant.gep122 = getelementptr i8, ptr %36, i64 2
  %invariant.gep125 = getelementptr i8, ptr %36, i64 2
  br label %.preheader103.us

.preheader103.us:                                 ; preds = %.preheader103.us.preheader, %._crit_edge.us
  %indvars.iv114 = phi i64 [ 0, %.preheader103.us.preheader ], [ %indvars.iv.next115, %._crit_edge.us ]
  %67 = mul nuw nsw i64 %indvars.iv114, %66
  %68 = trunc nuw nsw i64 %indvars.iv114 to i32
  %69 = xor i32 %68, -1
  %70 = add nsw i32 %39, %69
  %71 = mul nsw i32 %70, %38
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader103.us, %.preheader.us
  %indvars.iv = phi i64 [ 0, %.preheader103.us ], [ %indvars.iv.next, %.preheader.us ]
  %72 = add nuw nsw i64 %indvars.iv, %67
  %73 = trunc nuw nsw i64 %indvars.iv to i32
  %74 = add i32 %71, %73
  %75 = mul i32 %74, 3
  %sext = mul i64 %72, 12884901888
  %76 = ashr exact i64 %sext, 32
  %77 = getelementptr inbounds i8, ptr %36, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !34
  %79 = sext i32 %75 to i64
  %gep126 = getelementptr i8, ptr %invariant.gep125, i64 %79
  %80 = load i8, ptr %gep126, align 1, !tbaa !34
  store i8 %80, ptr %77, align 1, !tbaa !34
  store i8 %78, ptr %gep126, align 1, !tbaa !34
  %gep = getelementptr i8, ptr %invariant.gep, i64 %76
  %81 = load i8, ptr %gep, align 1, !tbaa !34
  %82 = sext i32 %75 to i64
  %gep121 = getelementptr i8, ptr %invariant.gep120, i64 %82
  %83 = load i8, ptr %gep121, align 1, !tbaa !34
  store i8 %83, ptr %gep, align 1, !tbaa !34
  store i8 %81, ptr %gep121, align 1, !tbaa !34
  %gep123 = getelementptr i8, ptr %invariant.gep122, i64 %76
  %84 = load i8, ptr %gep123, align 1, !tbaa !34
  %85 = sext i32 %75 to i64
  %86 = getelementptr inbounds i8, ptr %36, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !34
  store i8 %87, ptr %gep123, align 1, !tbaa !34
  store i8 %84, ptr %86, align 1, !tbaa !34
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %66
  br i1 %exitcond.not, label %._crit_edge.us, label %.preheader.us, !llvm.loop !35

._crit_edge.us:                                   ; preds = %.preheader.us
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next115, %wide.trip.count117
  br i1 %exitcond118.not, label %._crit_edge107, label %.preheader103.us, !llvm.loop !37

._crit_edge107:                                   ; preds = %._crit_edge.us, %34
  %88 = icmp sgt i32 %43, %40
  br i1 %88, label %89, label %107

89:                                               ; preds = %._crit_edge107
  %90 = tail call noalias ptr @malloc(i64 noundef %45) #10
  %91 = icmp sgt i32 %39, 0
  br i1 %91, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %89
  %92 = sext i32 %40 to i64
  %93 = sext i32 %43 to i64
  %xtraiter = and i32 %39, 3
  %94 = icmp ult i32 %39, 4
  br i1 %94, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i32 %39, 2147483644
  br label %98

._crit_edge.loopexit.unr-lcssa:                   ; preds = %98, %.lr.ph
  %.090109.unr = phi ptr [ %90, %.lr.ph ], [ %106, %98 ]
  %.092108.unr = phi ptr [ %36, %.lr.ph ], [ %105, %98 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.090109.epil = phi ptr [ %96, %.epil.preheader ], [ %.090109.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.092108.epil = phi ptr [ %95, %.epil.preheader ], [ %.092108.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.090109.epil, ptr align 1 %.092108.epil, i64 %92, i1 false)
  %95 = getelementptr inbounds i8, ptr %.092108.epil, i64 %92
  %96 = getelementptr inbounds i8, ptr %.090109.epil, i64 %93
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !38

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %89
  %97 = tail call i64 @fwrite(ptr noundef %90, i64 noundef %45, i64 noundef 1, ptr noundef nonnull %23)
  tail call void @free(ptr noundef %90) #9
  br label %109

98:                                               ; preds = %98, %.lr.ph.new
  %.090109 = phi ptr [ %90, %.lr.ph.new ], [ %106, %98 ]
  %.092108 = phi ptr [ %36, %.lr.ph.new ], [ %105, %98 ]
  %niter = phi i32 [ 0, %.lr.ph.new ], [ %niter.next.3, %98 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.090109, ptr align 1 %.092108, i64 %92, i1 false)
  %99 = getelementptr inbounds i8, ptr %.092108, i64 %92
  %100 = getelementptr inbounds i8, ptr %.090109, i64 %93
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %100, ptr align 1 %99, i64 %92, i1 false)
  %101 = getelementptr inbounds i8, ptr %99, i64 %92
  %102 = getelementptr inbounds i8, ptr %100, i64 %93
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %102, ptr align 1 %101, i64 %92, i1 false)
  %103 = getelementptr inbounds i8, ptr %101, i64 %92
  %104 = getelementptr inbounds i8, ptr %102, i64 %93
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %104, ptr align 1 %103, i64 %92, i1 false)
  %105 = getelementptr inbounds i8, ptr %103, i64 %92
  %106 = getelementptr inbounds i8, ptr %104, i64 %93
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %98, !llvm.loop !40

107:                                              ; preds = %._crit_edge107
  %108 = tail call i64 @fwrite(ptr noundef %36, i64 noundef %45, i64 noundef 1, ptr noundef nonnull %23)
  br label %109

109:                                              ; preds = %107, %._crit_edge
  %110 = tail call i32 @fclose(ptr noundef nonnull %23)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 14, ptr nonnull %3) #9
  ret void
}

declare ptr @sm_gray2rgb(ptr noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 12}
!12 = !{!6, !10, i64 24}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"BmpFileHeader", !17, i64 0, !7, i64 2, !17, i64 6, !17, i64 8, !7, i64 10}
!17 = !{!"short", !8, i64 0}
!18 = !{!16, !7, i64 2}
!19 = !{!16, !17, i64 6}
!20 = !{!16, !17, i64 8}
!21 = !{!16, !7, i64 10}
!22 = !{!23, !17, i64 14}
!23 = !{!"BmpInfoHeader", !7, i64 0, !7, i64 4, !7, i64 8, !17, i64 12, !17, i64 14, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36}
!24 = !{!23, !7, i64 36}
!25 = !{!23, !7, i64 32}
!26 = !{!23, !7, i64 16}
!27 = !{!23, !7, i64 8}
!28 = !{!23, !17, i64 12}
!29 = !{!23, !7, i64 0}
!30 = !{!23, !7, i64 20}
!31 = !{!23, !7, i64 4}
!32 = !{!23, !7, i64 24}
!33 = !{!23, !7, i64 28}
!34 = !{!8, !8, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.unroll.disable"}
!40 = distinct !{!40, !36}


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