; LLVM IR from bbrister/SIFT3D :: sift3d (sift)

; 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._Image = type { ptr, i32, double, i64, i32, i32, i32, double, double, double, i64, i64, i64, i32, i32 }
%struct._Mat_rm = type { %union.anon, i64, i32, i32, i32, i32 }
%union.anon = type { ptr }

@stderr = external global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [49 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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare void @init_im(ptr noundef) #2

declare void @im_free(ptr noundef) #2

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

44:                                               ; preds = %9
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._Image, ptr %45, i32 0, i32 5
  %47 = load i32, ptr %46, align 4, !tbaa !15
  br label %52

48:                                               ; preds = %9
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._Image, ptr %49, i32 0, i32 5
  %51 = load i32, ptr %50, align 4, !tbaa !15
  br label %52

52:                                               ; preds = %48, %44
  %53 = phi i32 [ %47, %44 ], [ %51, %48 ]
  store i32 %53, ptr %29, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._Image, ptr %54, i32 0, i32 6
  %56 = load i32, ptr %55, align 8, !tbaa !17
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._Image, ptr %57, i32 0, i32 6
  %59 = load i32, ptr %58, align 8, !tbaa !17
  %60 = icmp sgt i32 %56, %59
  br i1 %60, label %61, label %65

61:                                               ; preds = %52
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._Image, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %63, align 8, !tbaa !17
  br label %69

65:                                               ; preds = %52
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._Image, ptr %66, i32 0, i32 6
  %68 = load i32, ptr %67, align 8, !tbaa !17
  br label %69

69:                                               ; preds = %65, %61
  %70 = phi i32 [ %64, %61 ], [ %68, %65 ]
  store i32 %70, ptr %30, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = icmp eq ptr %71, null
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  br label %76

74:                                               ; preds = %69
  %75 = load ptr, ptr %17, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %74, %73
  %77 = phi ptr [ %20, %73 ], [ %75, %74 ]
  store ptr %77, ptr %31, align 8, !tbaa !5
  %78 = load ptr, ptr %17, align 8, !tbaa !5
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %89

80:                                               ; preds = %76
  %81 = load ptr, ptr %18, align 8, !tbaa !5
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %89

83:                                               ; preds = %80
  %84 = load ptr, ptr %19, align 8, !tbaa !5
  %85 = icmp eq ptr %84, null
  br i1 %85, label %86, label %89

86:                                               ; preds = %83
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.17) #4
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

89:                                               ; preds = %83, %80, %76
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %98

92:                                               ; preds = %89
  %93 = load ptr, ptr %18, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %98

95:                                               ; preds = %92
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.18) #4
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

98:                                               ; preds = %92, %89
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %107

101:                                              ; preds = %98
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %107

104:                                              ; preds = %101
  %105 = load ptr, ptr @stderr, align 8, !tbaa !5
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.19) #4
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

107:                                              ; preds = %101, %98
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = icmp eq ptr %108, null
  br i1 %109, label %110, label %116

110:                                              ; preds = %107
  %111 = load ptr, ptr %19, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %116

113:                                              ; preds = %110
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.20) #4
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

116:                                              ; preds = %110, %107
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  %118 = icmp eq ptr %117, null
  br i1 %118, label %119, label %125

119:                                              ; preds = %116
  %120 = load ptr, ptr %19, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %125

122:                                              ; preds = %119
  %123 = load ptr, ptr @stderr, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef @.str.21) #4
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

125:                                              ; preds = %119, %116
  call void @init_im(ptr noundef %20)
  call void @init_im(ptr noundef %21)
  call void @init_im(ptr noundef %22)
  %126 = call i32 @init_Mat_rm(ptr noundef %23, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %137, label %128

128:                                              ; preds = %125
  %129 = call i32 @init_Mat_rm(ptr noundef %26, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %137, label %131

131:                                              ; preds = %128
  %132 = call i32 @init_Mat_rm(ptr noundef %24, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %137, label %134

134:                                              ; preds = %131
  %135 = call i32 @init_Mat_rm(ptr noundef %25, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %138

137:                                              ; preds = %134, %131, %128, %125
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

138:                                              ; preds = %134
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._Image, ptr %139, i32 0, i32 4
  %141 = load i32, ptr %140, align 8, !tbaa !9
  %142 = load i32, ptr %29, align 4, !tbaa !16
  %143 = load i32, ptr %30, align 4, !tbaa !16
  %144 = call i32 @init_im_with_dims(ptr noundef %22, i32 noundef %141, i32 noundef %142, i32 noundef %143, i32 noundef 1)
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %162, label %146

146:                                              ; preds = %138
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._Image, ptr %147, i32 0, i32 4
  %149 = load i32, ptr %148, align 8, !tbaa !9
  %150 = load i32, ptr %29, align 4, !tbaa !16
  %151 = load i32, ptr %30, align 4, !tbaa !16
  %152 = call i32 @init_im_with_dims(ptr noundef %21, i32 noundef %149, i32 noundef %150, i32 noundef %151, i32 noundef 1)
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %162, label %154

154:                                              ; preds = %146
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = call i32 @im_pad(ptr noundef %155, ptr noundef %22)
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %162, label %158

158:                                              ; preds = %154
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = call i32 @im_pad(ptr noundef %159, ptr noundef %21)
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %165

162:                                              ; preds = %158, %154, %146, %138
  %163 = load ptr, ptr @stderr, align 8, !tbaa !5
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.22) #4
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

165:                                              ; preds = %158
  %166 = load ptr, ptr %31, align 8, !tbaa !5
  %167 = call i32 @im_concat(ptr noundef %21, ptr noundef %22, i32 noundef 0, ptr noundef %166)
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %172

169:                                              ; preds = %165
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.23) #4
  br label %260

172:                                              ; preds = %165
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %219

175:                                              ; preds = %172
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = call i32 @convert_Mat_rm(ptr noundef %176, ptr noundef %23, i32 noundef 0)
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %183, label %179

179:                                              ; preds = %175
  %180 = load ptr, ptr %13, align 8, !tbaa !5
  %181 = call i32 @convert_Mat_rm(ptr noundef %180, ptr noundef %24, i32 noundef 0)
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %184

183:                                              ; preds = %179, %175
  br label %260

184:                                              ; preds = %179
  store i32 0, ptr %27, align 4, !tbaa !16
  br label %185

185:                                              ; preds = %204, %184
  %186 = load i32, ptr %27, align 4, !tbaa !16
  %187 = load ptr, ptr %14, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._Mat_rm, ptr %187, i32 0, i32 3
  %189 = load i32, ptr %188, align 4, !tbaa !18
  %190 = icmp slt i32 %186, %189
  br i1 %190, label %191, label %207

191:                                              ; preds = %185
  %192 = load double, ptr %28, align 8, !tbaa !14
  %193 = getelementptr inbounds %struct._Mat_rm, ptr %23, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !20
  %195 = load i32, ptr %27, align 4, !tbaa !16
  %196 = getelementptr inbounds %struct._Mat_rm, ptr %23, i32 0, i32 2
  %197 = load i32, ptr %196, align 8, !tbaa !21
  %198 = mul nsw i32 %195, %197
  %199 = add nsw i32 0, %198
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %194, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !14
  %203 = fadd double %202, %192
  store double %203, ptr %201, align 8, !tbaa !14
  br label %204

204:                                              ; preds = %191
  %205 = load i32, ptr %27, align 4, !tbaa !16
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %27, align 4, !tbaa !16
  br label %185, !llvm.loop !22

207:                                              ; preds = %185
  %208 = call i32 @concat_Mat_rm(ptr noundef %24, ptr noundef %23, ptr noundef %25, i32 noundef 0)
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %211

210:                                              ; preds = %207
  br label %260

211:                                              ; preds = %207
  %212 = load ptr, ptr %31, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct._Image, ptr %212, i32 0, i32 4
  %214 = load ptr, ptr %18, align 8, !tbaa !5
  %215 = call i32 @draw_points(ptr noundef %25, ptr noundef %213, i32 noundef 1, ptr noundef %214)
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %218

217:                                              ; preds = %211
  br label %260

218:                                              ; preds = %211
  br label %219

219:                                              ; preds = %218, %172
  %220 = load ptr, ptr %19, align 8, !tbaa !5
  %221 = icmp ne ptr %220, null
  br i1 %221, label %222, label %259

222:                                              ; preds = %219
  %223 = load ptr, ptr %16, align 8, !tbaa !5
  %224 = call i32 @convert_Mat_rm(ptr noundef %223, ptr noundef %26, i32 noundef 0)
  %225 = icmp ne i32 %224, 0
  br i1 %225, label %226, label %227

226:                                              ; preds = %222
  br label %260

227:                                              ; preds = %222
  store i32 0, ptr %27, align 4, !tbaa !16
  br label %228

228:                                              ; preds = %247, %227
  %229 = load i32, ptr %27, align 4, !tbaa !16
  %230 = load ptr, ptr %16, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._Mat_rm, ptr %230, i32 0, i32 3
  %232 = load i32, ptr %231, align 4, !tbaa !18
  %233 = icmp slt i32 %229, %232
  br i1 %233, label %234, label %250

234:                                              ; preds = %228
  %235 = load double, ptr %28, align 8, !tbaa !14
  %236 = getelementptr inbounds %struct._Mat_rm, ptr %26, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !20
  %238 = load i32, ptr %27, align 4, !tbaa !16
  %239 = getelementptr inbounds %struct._Mat_rm, ptr %26, i32 0, i32 2
  %240 = load i32, ptr %239, align 8, !tbaa !21
  %241 = mul nsw i32 %238, %240
  %242 = add nsw i32 0, %241
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds double, ptr %237, i64 %243
  %245 = load double, ptr %244, align 8, !tbaa !14
  %246 = fadd double %245, %235
  store double %246, ptr %244, align 8, !tbaa !14
  br label %247

247:                                              ; preds = %234
  %248 = load i32, ptr %27, align 4, !tbaa !16
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %27, align 4, !tbaa !16
  br label %228, !llvm.loop !24

250:                                              ; preds = %228
  %251 = load ptr, ptr %15, align 8, !tbaa !5
  %252 = load ptr, ptr %31, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct._Image, ptr %252, i32 0, i32 4
  %254 = load ptr, ptr %19, align 8, !tbaa !5
  %255 = call i32 @draw_lines(ptr noundef %251, ptr noundef %26, ptr noundef %253, ptr noundef %254)
  %256 = icmp ne i32 %255, 0
  br i1 %256, label %257, label %258

257:                                              ; preds = %250
  br label %260

258:                                              ; preds = %250
  br label %259

259:                                              ; preds = %258, %219
  call void @im_free(ptr noundef %20)
  call void @im_free(ptr noundef %21)
  call void @im_free(ptr noundef %22)
  call void @cleanup_Mat_rm(ptr noundef %23)
  call void @cleanup_Mat_rm(ptr noundef %24)
  call void @cleanup_Mat_rm(ptr noundef %25)
  call void @cleanup_Mat_rm(ptr noundef %26)
  store i32 0, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

260:                                              ; preds = %257, %226, %217, %210, %183, %169
  call void @im_free(ptr noundef %20)
  call void @im_free(ptr noundef %21)
  call void @im_free(ptr noundef %22)
  call void @cleanup_Mat_rm(ptr noundef %23)
  call void @cleanup_Mat_rm(ptr noundef %24)
  call void @cleanup_Mat_rm(ptr noundef %25)
  call void @cleanup_Mat_rm(ptr noundef %26)
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %261

261:                                              ; preds = %260, %259, %162, %137, %122, %113, %104, %95, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %20) #4
  %262 = load i32, ptr %10, align 4
  ret i32 %262
}

declare i32 @init_Mat_rm(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare i32 @init_im_with_dims(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare i32 @im_pad(ptr noundef, ptr noundef) #2

declare i32 @im_concat(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @convert_Mat_rm(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @concat_Mat_rm(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @draw_points(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @draw_lines(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @cleanup_Mat_rm(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 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 = { 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 32}
!10 = !{!"_Image", !6, i64 0, !11, i64 8, !12, i64 16, !13, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !11, i64 96, !11, i64 100}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!10, !11, i64 36}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 40}
!18 = !{!19, !11, i64 20}
!19 = !{!"_Mat_rm", !7, i64 0, !13, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!20 = !{!7, !7, i64 0}
!21 = !{!19, !11, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


; 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._Image = type { ptr, i32, double, i64, i32, i32, i32, double, double, double, i64, i64, i64, i32, i32 }
%struct._Mat_rm = type { %union.anon, i64, i32, i32, i32, i32 }
%union.anon = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [49 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 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @init_im(ptr noundef) local_unnamed_addr #2

declare void @im_free(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @draw_matches(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #3 {
  %10 = alloca %struct._Image, align 8
  %11 = alloca %struct._Image, align 8
  %12 = alloca %struct._Image, align 8
  %13 = alloca %struct._Mat_rm, align 8
  %14 = alloca %struct._Mat_rm, align 8
  %15 = alloca %struct._Mat_rm, align 8
  %16 = alloca %struct._Mat_rm, align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #5
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %18 = load i32, ptr %17, align 8, !tbaa !5
  %19 = sitofp i32 %18 to double
  %20 = getelementptr inbounds i8, ptr %1, i64 36
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %0, i64 36
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %. = tail call i32 @llvm.smax.i32(i32 %21, i32 %23)
  %24 = getelementptr inbounds i8, ptr %1, i64 40
  %25 = load i32, ptr %24, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load i32, ptr %26, align 8, !tbaa !14
  %28 = tail call i32 @llvm.smax.i32(i32 %25, i32 %27)
  %29 = icmp eq ptr %6, null
  %30 = select i1 %29, ptr %10, ptr %6
  %31 = icmp eq ptr %7, null
  %32 = icmp eq ptr %8, null
  %33 = and i1 %31, %32
  %or.cond3 = and i1 %29, %33
  br i1 %or.cond3, label %34, label %37

34:                                               ; preds = %9
  %35 = load ptr, ptr @stderr, align 8, !tbaa !15
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.17) #6
  br label %146

37:                                               ; preds = %9
  %38 = icmp eq ptr %2, null
  %39 = icmp ne ptr %7, null
  %or.cond5 = and i1 %38, %39
  br i1 %or.cond5, label %40, label %43

40:                                               ; preds = %37
  %41 = load ptr, ptr @stderr, align 8, !tbaa !15
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.18) #6
  br label %146

43:                                               ; preds = %37
  %44 = icmp eq ptr %3, null
  %or.cond7 = and i1 %44, %39
  br i1 %or.cond7, label %45, label %48

45:                                               ; preds = %43
  %46 = load ptr, ptr @stderr, align 8, !tbaa !15
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.19) #6
  br label %146

48:                                               ; preds = %43
  %49 = icmp eq ptr %4, null
  %50 = icmp ne ptr %8, null
  %or.cond9 = and i1 %49, %50
  br i1 %or.cond9, label %51, label %54

51:                                               ; preds = %48
  %52 = load ptr, ptr @stderr, align 8, !tbaa !15
  %53 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.20) #6
  br label %146

54:                                               ; preds = %48
  %55 = icmp eq ptr %5, null
  %or.cond11 = and i1 %55, %50
  br i1 %or.cond11, label %56, label %59

56:                                               ; preds = %54
  %57 = load ptr, ptr @stderr, align 8, !tbaa !15
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.21) #6
  br label %146

59:                                               ; preds = %54
  call void @init_im(ptr noundef nonnull %10) #5
  call void @init_im(ptr noundef nonnull %11) #5
  call void @init_im(ptr noundef nonnull %12) #5
  %60 = call i32 @init_Mat_rm(ptr noundef nonnull %13, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0) #5
  %.not = icmp eq i32 %60, 0
  br i1 %.not, label %61, label %146

61:                                               ; preds = %59
  %62 = call i32 @init_Mat_rm(ptr noundef nonnull %16, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0) #5
  %.not69 = icmp eq i32 %62, 0
  br i1 %.not69, label %63, label %146

63:                                               ; preds = %61
  %64 = call i32 @init_Mat_rm(ptr noundef nonnull %14, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0) #5
  %.not70 = icmp eq i32 %64, 0
  br i1 %.not70, label %65, label %146

65:                                               ; preds = %63
  %66 = call i32 @init_Mat_rm(ptr noundef nonnull %15, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0) #5
  %.not71 = icmp eq i32 %66, 0
  br i1 %.not71, label %67, label %146

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %1, i64 32
  %69 = load i32, ptr %68, align 8, !tbaa !5
  %70 = call i32 @init_im_with_dims(ptr noundef nonnull %12, i32 noundef %69, i32 noundef %., i32 noundef %28, i32 noundef 1) #5
  %.not72 = icmp eq i32 %70, 0
  br i1 %.not72, label %71, label %78

71:                                               ; preds = %67
  %72 = load i32, ptr %17, align 8, !tbaa !5
  %73 = call i32 @init_im_with_dims(ptr noundef nonnull %11, i32 noundef %72, i32 noundef %., i32 noundef %28, i32 noundef 1) #5
  %.not73 = icmp eq i32 %73, 0
  br i1 %.not73, label %74, label %78

74:                                               ; preds = %71
  %75 = call i32 @im_pad(ptr noundef nonnull %1, ptr noundef nonnull %12) #5
  %.not74 = icmp eq i32 %75, 0
  br i1 %.not74, label %76, label %78

76:                                               ; preds = %74
  %77 = call i32 @im_pad(ptr noundef nonnull %0, ptr noundef nonnull %11) #5
  %.not75 = icmp eq i32 %77, 0
  br i1 %.not75, label %81, label %78

78:                                               ; preds = %76, %74, %71, %67
  %79 = load ptr, ptr @stderr, align 8, !tbaa !15
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.22) #6
  br label %146

81:                                               ; preds = %76
  %82 = call i32 @im_concat(ptr noundef nonnull %11, ptr noundef nonnull %12, i32 noundef 0, ptr noundef nonnull %30) #5
  %.not76 = icmp eq i32 %82, 0
  br i1 %.not76, label %86, label %83

83:                                               ; preds = %81
  %84 = load ptr, ptr @stderr, align 8, !tbaa !15
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.23) #6
  br label %145

86:                                               ; preds = %81
  br i1 %39, label %87, label %117

87:                                               ; preds = %86
  %88 = call i32 @convert_Mat_rm(ptr noundef %3, ptr noundef nonnull %13, i32 noundef 0) #5
  %.not77 = icmp eq i32 %88, 0
  br i1 %.not77, label %89, label %145

89:                                               ; preds = %87
  %90 = call i32 @convert_Mat_rm(ptr noundef %2, ptr noundef nonnull %14, i32 noundef 0) #5
  %.not78 = icmp eq i32 %90, 0
  br i1 %.not78, label %.preheader87, label %145

.preheader87:                                     ; preds = %89
  %91 = getelementptr inbounds i8, ptr %3, i64 20
  %92 = load i32, ptr %91, align 4, !tbaa !16
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader87
  %94 = getelementptr inbounds i8, ptr %13, i64 16
  %95 = load i32, ptr %94, align 8, !tbaa !18
  %96 = sext i32 %95 to i64
  %wide.trip.count = zext nneg i32 %92 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %97 = icmp eq i32 %92, 1
  br i1 %97, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %98

98:                                               ; preds = %98, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %98 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %98 ]
  %99 = load ptr, ptr %13, align 8, !tbaa !19
  %100 = mul nsw i64 %indvars.iv, %96
  %101 = getelementptr inbounds double, ptr %99, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !20
  %103 = fadd double %102, %19
  store double %103, ptr %101, align 8, !tbaa !20
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %104 = load ptr, ptr %13, align 8, !tbaa !19
  %105 = mul nsw i64 %indvars.iv.next, %96
  %106 = getelementptr inbounds double, ptr %104, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !20
  %108 = fadd double %107, %19
  store double %108, ptr %106, align 8, !tbaa !20
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %98, !llvm.loop !21

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

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %109 = load ptr, ptr %13, align 8, !tbaa !19
  %110 = mul nsw i64 %indvars.iv.unr, %96
  %111 = getelementptr inbounds double, ptr %109, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !20
  %113 = fadd double %112, %19
  store double %113, ptr %111, align 8, !tbaa !20
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.preheader87
  %114 = call i32 @concat_Mat_rm(ptr noundef nonnull %14, ptr noundef nonnull %13, ptr noundef nonnull %15, i32 noundef 0) #5
  %.not79 = icmp eq i32 %114, 0
  br i1 %.not79, label %115, label %145

115:                                              ; preds = %._crit_edge
  %.sroa.sel.v.sroa.sel.v.sroa.sel.v = select i1 %29, ptr %10, ptr %6
  %.sroa.sel.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %.sroa.sel.v.sroa.sel.v.sroa.sel.v, i64 32
  %116 = call i32 @draw_points(ptr noundef nonnull %15, ptr noundef nonnull %.sroa.sel.v.sroa.sel.v.sroa.sel, i32 noundef 1, ptr noundef nonnull %7) #5
  %.not80 = icmp eq i32 %116, 0
  br i1 %.not80, label %117, label %145

117:                                              ; preds = %115, %86
  br i1 %50, label %118, label %144

118:                                              ; preds = %117
  %119 = call i32 @convert_Mat_rm(ptr noundef %5, ptr noundef nonnull %16, i32 noundef 0) #5
  %.not81 = icmp eq i32 %119, 0
  br i1 %.not81, label %.preheader, label %145

.preheader:                                       ; preds = %118
  %120 = getelementptr inbounds i8, ptr %5, i64 20
  %121 = load i32, ptr %120, align 4, !tbaa !16
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %.lr.ph90, label %._crit_edge91

.lr.ph90:                                         ; preds = %.preheader
  %123 = getelementptr inbounds i8, ptr %16, i64 16
  %124 = load i32, ptr %123, align 8, !tbaa !18
  %125 = sext i32 %124 to i64
  %wide.trip.count96 = zext nneg i32 %121 to i64
  %xtraiter102 = and i64 %wide.trip.count96, 1
  %126 = icmp eq i32 %121, 1
  br i1 %126, label %._crit_edge91.loopexit.unr-lcssa, label %.lr.ph90.new

.lr.ph90.new:                                     ; preds = %.lr.ph90
  %unroll_iter104 = and i64 %wide.trip.count96, 2147483646
  br label %127

127:                                              ; preds = %127, %.lr.ph90.new
  %indvars.iv93 = phi i64 [ 0, %.lr.ph90.new ], [ %indvars.iv.next94.1, %127 ]
  %niter105 = phi i64 [ 0, %.lr.ph90.new ], [ %niter105.next.1, %127 ]
  %128 = load ptr, ptr %16, align 8, !tbaa !19
  %129 = mul nsw i64 %indvars.iv93, %125
  %130 = getelementptr inbounds double, ptr %128, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !20
  %132 = fadd double %131, %19
  store double %132, ptr %130, align 8, !tbaa !20
  %indvars.iv.next94 = or disjoint i64 %indvars.iv93, 1
  %133 = load ptr, ptr %16, align 8, !tbaa !19
  %134 = mul nsw i64 %indvars.iv.next94, %125
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !20
  %137 = fadd double %136, %19
  store double %137, ptr %135, align 8, !tbaa !20
  %indvars.iv.next94.1 = add nuw nsw i64 %indvars.iv93, 2
  %niter105.next.1 = add i64 %niter105, 2
  %niter105.ncmp.1 = icmp eq i64 %niter105.next.1, %unroll_iter104
  br i1 %niter105.ncmp.1, label %._crit_edge91.loopexit.unr-lcssa, label %127, !llvm.loop !23

._crit_edge91.loopexit.unr-lcssa:                 ; preds = %127, %.lr.ph90
  %indvars.iv93.unr = phi i64 [ 0, %.lr.ph90 ], [ %indvars.iv.next94.1, %127 ]
  %lcmp.mod103.not = icmp eq i64 %xtraiter102, 0
  br i1 %lcmp.mod103.not, label %._crit_edge91, label %._crit_edge91.loopexit.epilog-lcssa

._crit_edge91.loopexit.epilog-lcssa:              ; preds = %._crit_edge91.loopexit.unr-lcssa
  %138 = load ptr, ptr %16, align 8, !tbaa !19
  %139 = mul nsw i64 %indvars.iv93.unr, %125
  %140 = getelementptr inbounds double, ptr %138, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !20
  %142 = fadd double %141, %19
  store double %142, ptr %140, align 8, !tbaa !20
  br label %._crit_edge91

._crit_edge91:                                    ; preds = %._crit_edge91.loopexit.epilog-lcssa, %._crit_edge91.loopexit.unr-lcssa, %.preheader
  %.sroa.sel86.v.sroa.sel.v.sroa.sel.v = select i1 %29, ptr %10, ptr %6
  %.sroa.sel86.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %.sroa.sel86.v.sroa.sel.v.sroa.sel.v, i64 32
  %143 = call i32 @draw_lines(ptr noundef %4, ptr noundef nonnull %16, ptr noundef nonnull %.sroa.sel86.v.sroa.sel.v.sroa.sel, ptr noundef nonnull %8) #5
  %.not82 = icmp eq i32 %143, 0
  br i1 %.not82, label %144, label %145

144:                                              ; preds = %._crit_edge91, %117
  call void @im_free(ptr noundef nonnull %10) #5
  call void @im_free(ptr noundef nonnull %11) #5
  call void @im_free(ptr noundef nonnull %12) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %13) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %14) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %15) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %16) #5
  br label %146

145:                                              ; preds = %._crit_edge91, %118, %115, %._crit_edge, %87, %89, %83
  call void @im_free(ptr noundef nonnull %10) #5
  call void @im_free(ptr noundef nonnull %11) #5
  call void @im_free(ptr noundef nonnull %12) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %13) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %14) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %15) #5
  call void @cleanup_Mat_rm(ptr noundef nonnull %16) #5
  br label %146

146:                                              ; preds = %59, %61, %63, %65, %145, %144, %78, %56, %51, %45, %40, %34
  %.0 = phi i32 [ -1, %34 ], [ -1, %40 ], [ -1, %45 ], [ -1, %51 ], [ -1, %56 ], [ -1, %78 ], [ -1, %145 ], [ 0, %144 ], [ -1, %65 ], [ -1, %63 ], [ -1, %61 ], [ -1, %59 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %10) #5
  ret i32 %.0
}

declare i32 @init_Mat_rm(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @init_im_with_dims(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @im_pad(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @im_concat(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @convert_Mat_rm(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @concat_Mat_rm(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @draw_points(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @draw_lines(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @cleanup_Mat_rm(ptr noundef) local_unnamed_addr #2

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

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 = { "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 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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { cold 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, !10, i64 32}
!6 = !{!"_Image", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !10, i64 96, !10, i64 100}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !10, i64 36}
!14 = !{!6, !10, i64 40}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !10, i64 20}
!17 = !{!"_Mat_rm", !8, i64 0, !12, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!18 = !{!17, !10, i64 16}
!19 = !{!8, !8, i64 0}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


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