; LLVM IR from ayazhassan/RT-CUDA-GUI-Development :: RTCUDAGUI (mmio)

; 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"

@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 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 [10 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 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: nounwind uwtable
define dso_local i32 @mm_read_banner(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1025 x i8], align 16
  %7 = alloca [64 x i8], align 16
  %8 = alloca [64 x i8], align 16
  %9 = alloca [64 x i8], align 16
  %10 = alloca [64 x i8], align 16
  %11 = alloca [64 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %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 i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1025, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds [4 x i8], ptr %22, i64 0, i64 2
  store i8 32, ptr %23, align 1, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds [4 x i8], ptr %24, i64 0, i64 1
  store i8 32, ptr %25, align 1, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds [4 x i8], ptr %26, i64 0, i64 0
  store i8 32, ptr %27, align 1, !tbaa !9
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds [4 x i8], ptr %28, i64 0, i64 3
  store i8 71, ptr %29, align 1, !tbaa !9
  %30 = getelementptr inbounds [1025 x i8], ptr %6, i64 0, i64 0
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call ptr @fgets(ptr noundef %30, i32 noundef 1025, ptr noundef %31)
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %2
  store i32 12, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

35:                                               ; preds = %2
  %36 = getelementptr inbounds [1025 x i8], ptr %6, i64 0, i64 0
  %37 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 0
  %38 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %39 = getelementptr inbounds [64 x i8], ptr %9, i64 0, i64 0
  %40 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  %41 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %42 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %36, ptr noundef @.str.7, ptr noundef %37, ptr noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %41) #6
  %43 = icmp ne i32 %42, 5
  br i1 %43, label %44, label %45

44:                                               ; preds = %35
  store i32 12, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

45:                                               ; preds = %35
  %46 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  store ptr %46, ptr %12, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %53, %45
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = sext i8 %49 to i32
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %68

52:                                               ; preds = %47
  br label %53

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %54 = call ptr @__ctype_tolower_loc() #7
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %58 = sext i8 %57 to i32
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr %55, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !10
  store i32 %61, ptr %14, align 4, !tbaa !10
  %62 = load i32, ptr %14, align 4, !tbaa !10
  store i32 %62, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %63 = load i32, ptr %15, align 4, !tbaa !10
  %64 = trunc i32 %63 to i8
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %64, ptr %65, align 1, !tbaa !9
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i32 1
  store ptr %67, ptr %12, align 8, !tbaa !5
  br label %47, !llvm.loop !12

68:                                               ; preds = %47
  %69 = getelementptr inbounds [64 x i8], ptr %9, i64 0, i64 0
  store ptr %69, ptr %12, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %76, %68
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i8, ptr %71, align 1, !tbaa !9
  %73 = sext i8 %72 to i32
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %91

75:                                               ; preds = %70
  br label %76

76:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %77 = call ptr @__ctype_tolower_loc() #7
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %78, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !10
  store i32 %84, ptr %16, align 4, !tbaa !10
  %85 = load i32, ptr %16, align 4, !tbaa !10
  store i32 %85, ptr %17, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %86 = load i32, ptr %17, align 4, !tbaa !10
  %87 = trunc i32 %86 to i8
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %87, ptr %88, align 1, !tbaa !9
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %12, align 8, !tbaa !5
  br label %70, !llvm.loop !14

91:                                               ; preds = %70
  %92 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  store ptr %92, ptr %12, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %99, %91
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = load i8, ptr %94, align 1, !tbaa !9
  %96 = sext i8 %95 to i32
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %114

98:                                               ; preds = %93
  br label %99

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %100 = call ptr @__ctype_tolower_loc() #7
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = load i8, ptr %102, align 1, !tbaa !9
  %104 = sext i8 %103 to i32
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %101, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !10
  store i32 %107, ptr %18, align 4, !tbaa !10
  %108 = load i32, ptr %18, align 4, !tbaa !10
  store i32 %108, ptr %19, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %109 = load i32, ptr %19, align 4, !tbaa !10
  %110 = trunc i32 %109 to i8
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %110, ptr %111, align 1, !tbaa !9
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i32 1
  store ptr %113, ptr %12, align 8, !tbaa !5
  br label %93, !llvm.loop !15

114:                                              ; preds = %93
  %115 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  store ptr %115, ptr %12, align 8, !tbaa !5
  br label %116

116:                                              ; preds = %122, %114
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load i8, ptr %117, align 1, !tbaa !9
  %119 = sext i8 %118 to i32
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %137

121:                                              ; preds = %116
  br label %122

122:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %123 = call ptr @__ctype_tolower_loc() #7
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = load i8, ptr %125, align 1, !tbaa !9
  %127 = sext i8 %126 to i32
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %124, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !10
  store i32 %130, ptr %20, align 4, !tbaa !10
  %131 = load i32, ptr %20, align 4, !tbaa !10
  store i32 %131, ptr %21, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %132 = load i32, ptr %21, align 4, !tbaa !10
  %133 = trunc i32 %132 to i8
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %133, ptr %134, align 1, !tbaa !9
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i32 1
  store ptr %136, ptr %12, align 8, !tbaa !5
  br label %116, !llvm.loop !16

137:                                              ; preds = %116
  %138 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 0
  %139 = call i32 @strncmp(ptr noundef %138, ptr noundef @.str.8, i64 noundef 14) #8
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %142

141:                                              ; preds = %137
  store i32 14, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

142:                                              ; preds = %137
  %143 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %144 = call i32 @strcmp(ptr noundef %143, ptr noundef @.str.9) #8
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %147

146:                                              ; preds = %142
  store i32 15, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

147:                                              ; preds = %142
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds [4 x i8], ptr %148, i64 0, i64 0
  store i8 77, ptr %149, align 1, !tbaa !9
  %150 = getelementptr inbounds [64 x i8], ptr %9, i64 0, i64 0
  %151 = call i32 @strcmp(ptr noundef %150, ptr noundef @.str.10) #8
  %152 = icmp eq i32 %151, 0
  br i1 %152, label %153, label %156

153:                                              ; preds = %147
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds [4 x i8], ptr %154, i64 0, i64 1
  store i8 67, ptr %155, align 1, !tbaa !9
  br label %165

156:                                              ; preds = %147
  %157 = getelementptr inbounds [64 x i8], ptr %9, i64 0, i64 0
  %158 = call i32 @strcmp(ptr noundef %157, ptr noundef @.str.11) #8
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %163

160:                                              ; preds = %156
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds [4 x i8], ptr %161, i64 0, i64 1
  store i8 65, ptr %162, align 1, !tbaa !9
  br label %164

163:                                              ; preds = %156
  store i32 15, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

164:                                              ; preds = %160
  br label %165

165:                                              ; preds = %164, %153
  %166 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  %167 = call i32 @strcmp(ptr noundef %166, ptr noundef @.str.12) #8
  %168 = icmp eq i32 %167, 0
  br i1 %168, label %169, label %172

169:                                              ; preds = %165
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds [4 x i8], ptr %170, i64 0, i64 2
  store i8 82, ptr %171, align 1, !tbaa !9
  br label %197

172:                                              ; preds = %165
  %173 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  %174 = call i32 @strcmp(ptr noundef %173, ptr noundef @.str.13) #8
  %175 = icmp eq i32 %174, 0
  br i1 %175, label %176, label %179

176:                                              ; preds = %172
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds [4 x i8], ptr %177, i64 0, i64 2
  store i8 67, ptr %178, align 1, !tbaa !9
  br label %196

179:                                              ; preds = %172
  %180 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  %181 = call i32 @strcmp(ptr noundef %180, ptr noundef @.str.14) #8
  %182 = icmp eq i32 %181, 0
  br i1 %182, label %183, label %186

183:                                              ; preds = %179
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds [4 x i8], ptr %184, i64 0, i64 2
  store i8 80, ptr %185, align 1, !tbaa !9
  br label %195

186:                                              ; preds = %179
  %187 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  %188 = call i32 @strcmp(ptr noundef %187, ptr noundef @.str.15) #8
  %189 = icmp eq i32 %188, 0
  br i1 %189, label %190, label %193

190:                                              ; preds = %186
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds [4 x i8], ptr %191, i64 0, i64 2
  store i8 73, ptr %192, align 1, !tbaa !9
  br label %194

193:                                              ; preds = %186
  store i32 15, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

194:                                              ; preds = %190
  br label %195

195:                                              ; preds = %194, %183
  br label %196

196:                                              ; preds = %195, %176
  br label %197

197:                                              ; preds = %196, %169
  %198 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %199 = call i32 @strcmp(ptr noundef %198, ptr noundef @.str.16) #8
  %200 = icmp eq i32 %199, 0
  br i1 %200, label %201, label %204

201:                                              ; preds = %197
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds [4 x i8], ptr %202, i64 0, i64 3
  store i8 71, ptr %203, align 1, !tbaa !9
  br label %229

204:                                              ; preds = %197
  %205 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %206 = call i32 @strcmp(ptr noundef %205, ptr noundef @.str.17) #8
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %211

208:                                              ; preds = %204
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds [4 x i8], ptr %209, i64 0, i64 3
  store i8 83, ptr %210, align 1, !tbaa !9
  br label %228

211:                                              ; preds = %204
  %212 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %213 = call i32 @strcmp(ptr noundef %212, ptr noundef @.str.18) #8
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %218

215:                                              ; preds = %211
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds [4 x i8], ptr %216, i64 0, i64 3
  store i8 72, ptr %217, align 1, !tbaa !9
  br label %227

218:                                              ; preds = %211
  %219 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %220 = call i32 @strcmp(ptr noundef %219, ptr noundef @.str.19) #8
  %221 = icmp eq i32 %220, 0
  br i1 %221, label %222, label %225

222:                                              ; preds = %218
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = getelementptr inbounds [4 x i8], ptr %223, i64 0, i64 3
  store i8 75, ptr %224, align 1, !tbaa !9
  br label %226

225:                                              ; preds = %218
  store i32 15, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

226:                                              ; preds = %222
  br label %227

227:                                              ; preds = %226, %215
  br label %228

228:                                              ; preds = %227, %208
  br label %229

229:                                              ; preds = %228, %201
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %230

230:                                              ; preds = %229, %225, %193, %163, %146, %141, %44, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1025, ptr %6) #6
  %231 = load i32, ptr %3, align 4
  ret i32 %231
}

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

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_tolower_loc() #4

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #5

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

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


; 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.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 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 [10 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 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: nofree nounwind uwtable
define dso_local range(i32 0, 16) i32 @mm_read_banner(ptr nocapture noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #1 {
  %3 = alloca [1025 x i8], align 16
  %4 = alloca [64 x i8], align 16
  %5 = alloca [64 x i8], align 16
  %6 = alloca [64 x i8], align 16
  %7 = alloca [64 x i8], align 16
  %8 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1025, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #5
  %9 = getelementptr inbounds i8, ptr %1, i64 2
  %10 = getelementptr inbounds i8, ptr %1, i64 1
  %11 = getelementptr inbounds i8, ptr %1, i64 3
  store <4 x i8> <i8 32, i8 32, i8 32, i8 71>, ptr %1, align 1, !tbaa !5
  %12 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1025, ptr noundef %0)
  %13 = icmp eq ptr %12, null
  br i1 %13, label %93, label %14

14:                                               ; preds = %2
  %15 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.7, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #5
  %.not = icmp eq i32 %15, 5
  br i1 %.not, label %.preheader53, label %93

.preheader53:                                     ; preds = %14
  %16 = load i8, ptr %5, align 16, !tbaa !5
  %.not4554 = icmp eq i8 %16, 0
  br i1 %.not4554, label %.preheader52, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader53
  %17 = tail call ptr @__ctype_tolower_loc() #6
  br label %20

.preheader52:                                     ; preds = %20, %.preheader53
  %18 = load i8, ptr %6, align 16, !tbaa !5
  %.not4656 = icmp eq i8 %18, 0
  br i1 %.not4656, label %.preheader51, label %.lr.ph58

.lr.ph58:                                         ; preds = %.preheader52
  %19 = tail call ptr @__ctype_tolower_loc() #6
  br label %31

20:                                               ; preds = %.lr.ph, %20
  %21 = phi i8 [ %16, %.lr.ph ], [ %28, %20 ]
  %.04055 = phi ptr [ %5, %.lr.ph ], [ %27, %20 ]
  %22 = load ptr, ptr %17, align 8, !tbaa !8
  %23 = sext i8 %21 to i64
  %24 = getelementptr inbounds i32, ptr %22, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !10
  %26 = trunc i32 %25 to i8
  store i8 %26, ptr %.04055, align 1, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %.04055, i64 1
  %28 = load i8, ptr %27, align 1, !tbaa !5
  %.not45 = icmp eq i8 %28, 0
  br i1 %.not45, label %.preheader52, label %20, !llvm.loop !12

.preheader51:                                     ; preds = %31, %.preheader52
  %29 = load i8, ptr %7, align 16, !tbaa !5
  %.not4759 = icmp eq i8 %29, 0
  br i1 %.not4759, label %.preheader, label %.lr.ph61

.lr.ph61:                                         ; preds = %.preheader51
  %30 = tail call ptr @__ctype_tolower_loc() #6
  br label %42

31:                                               ; preds = %.lr.ph58, %31
  %32 = phi i8 [ %18, %.lr.ph58 ], [ %39, %31 ]
  %.157 = phi ptr [ %6, %.lr.ph58 ], [ %38, %31 ]
  %33 = load ptr, ptr %19, align 8, !tbaa !8
  %34 = sext i8 %32 to i64
  %35 = getelementptr inbounds i32, ptr %33, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !10
  %37 = trunc i32 %36 to i8
  store i8 %37, ptr %.157, align 1, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %.157, i64 1
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %.not46 = icmp eq i8 %39, 0
  br i1 %.not46, label %.preheader51, label %31, !llvm.loop !14

.preheader:                                       ; preds = %42, %.preheader51
  %40 = load i8, ptr %8, align 16, !tbaa !5
  %.not4862 = icmp eq i8 %40, 0
  br i1 %.not4862, label %._crit_edge, label %.lr.ph64

.lr.ph64:                                         ; preds = %.preheader
  %41 = tail call ptr @__ctype_tolower_loc() #6
  br label %51

42:                                               ; preds = %.lr.ph61, %42
  %43 = phi i8 [ %29, %.lr.ph61 ], [ %50, %42 ]
  %.260 = phi ptr [ %7, %.lr.ph61 ], [ %49, %42 ]
  %44 = load ptr, ptr %30, align 8, !tbaa !8
  %45 = sext i8 %43 to i64
  %46 = getelementptr inbounds i32, ptr %44, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !10
  %48 = trunc i32 %47 to i8
  store i8 %48, ptr %.260, align 1, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %.260, i64 1
  %50 = load i8, ptr %49, align 1, !tbaa !5
  %.not47 = icmp eq i8 %50, 0
  br i1 %.not47, label %.preheader, label %42, !llvm.loop !15

51:                                               ; preds = %.lr.ph64, %51
  %52 = phi i8 [ %40, %.lr.ph64 ], [ %59, %51 ]
  %.363 = phi ptr [ %8, %.lr.ph64 ], [ %58, %51 ]
  %53 = load ptr, ptr %41, align 8, !tbaa !8
  %54 = sext i8 %52 to i64
  %55 = getelementptr inbounds i32, ptr %53, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !10
  %57 = trunc i32 %56 to i8
  store i8 %57, ptr %.363, align 1, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %.363, i64 1
  %59 = load i8, ptr %58, align 1, !tbaa !5
  %.not48 = icmp eq i8 %59, 0
  br i1 %.not48, label %._crit_edge, label %51, !llvm.loop !16

._crit_edge:                                      ; preds = %51, %.preheader
  %60 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef 14) #7
  %.not49 = icmp eq i32 %60, 0
  br i1 %.not49, label %61, label %93

61:                                               ; preds = %._crit_edge
  %62 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.9) #7
  %.not50 = icmp eq i32 %62, 0
  br i1 %.not50, label %63, label %93

63:                                               ; preds = %61
  store i8 77, ptr %1, align 1, !tbaa !5
  %64 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.10) #7
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %69, label %66

66:                                               ; preds = %63
  %67 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.11) #7
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %93

69:                                               ; preds = %66, %63
  %storemerge = phi i8 [ 67, %63 ], [ 65, %66 ]
  store i8 %storemerge, ptr %10, align 1, !tbaa !5
  %70 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.12) #7
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %81, label %72

72:                                               ; preds = %69
  %73 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.13) #7
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %81, label %75

75:                                               ; preds = %72
  %76 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.14) #7
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %81, label %78

78:                                               ; preds = %75
  %79 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.15) #7
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %93

81:                                               ; preds = %78, %75, %72, %69
  %.sink = phi i8 [ 82, %69 ], [ 67, %72 ], [ 80, %75 ], [ 73, %78 ]
  store i8 %.sink, ptr %9, align 1, !tbaa !5
  %82 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.16) #7
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %.sink.split, label %84

84:                                               ; preds = %81
  %85 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.17) #7
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %.sink.split, label %87

87:                                               ; preds = %84
  %88 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.18) #7
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %.sink.split, label %90

90:                                               ; preds = %87
  %91 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.19) #7
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %.sink.split, label %93

.sink.split:                                      ; preds = %90, %87, %84, %81
  %.sink65 = phi i8 [ 71, %81 ], [ 83, %84 ], [ 72, %87 ], [ 75, %90 ]
  store i8 %.sink65, ptr %11, align 1, !tbaa !5
  br label %93

93:                                               ; preds = %.sink.split, %90, %78, %66, %61, %._crit_edge, %14, %2
  %.0 = phi i32 [ 12, %2 ], [ 12, %14 ], [ 14, %._crit_edge ], [ 15, %61 ], [ 15, %66 ], [ 15, %78 ], [ 15, %90 ], [ 0, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1025, ptr nonnull %3) #5
  ret i32 %.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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_tolower_loc() local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

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

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass