; LLVM IR from theck01/offbrand_lib :: apps/minlog/src/tests (NCube_test)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %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 ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %16 = call ptr @createNCube(i32 noundef 0, i8 noundef zeroext 0)
  store ptr %16, ptr %2, align 8, !tbaa !5
  %17 = call ptr @createNCube(i32 noundef 1, i8 noundef zeroext 0)
  store ptr %17, ptr %3, align 8, !tbaa !5
  %18 = call ptr @createNCube(i32 noundef 2, i8 noundef zeroext 0)
  store ptr %18, ptr %4, align 8, !tbaa !5
  %19 = call ptr @createNCube(i32 noundef 3, i8 noundef zeroext 1)
  store ptr %19, ptr %5, align 8, !tbaa !5
  %20 = call ptr @createNCube(i32 noundef 5, i8 noundef zeroext 1)
  store ptr %20, ptr %6, align 8, !tbaa !5
  %21 = call ptr @createNCube(i32 noundef 7, i8 noundef zeroext 1)
  store ptr %21, ptr %7, align 8, !tbaa !5
  %22 = call ptr @createNCube(i32 noundef 13, i8 noundef zeroext 1)
  store ptr %22, ptr %8, align 8, !tbaa !5
  %23 = call ptr @createNCube(i32 noundef 15, i8 noundef zeroext 1)
  store ptr %23, ptr %9, align 8, !tbaa !5
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %47

26:                                               ; preds = %0
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %47

29:                                               ; preds = %26
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %47

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

35:                                               ; preds = %32
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %47

38:                                               ; preds = %35
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %47

41:                                               ; preds = %38
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %50, label %47

47:                                               ; preds = %44, %41, %38, %35, %32, %29, %26, %0
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str) #6
  call void @exit(i32 noundef 1) #7
  unreachable

50:                                               ; preds = %44
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call zeroext i8 @isNCubePrimeImplicant(ptr noundef %51)
  %53 = icmp ne i8 %52, 0
  br i1 %53, label %54, label %57

54:                                               ; preds = %50
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.1) #6
  call void @exit(i32 noundef 1) #7
  unreachable

57:                                               ; preds = %50
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = call ptr @mergeNCubes(ptr noundef %58, ptr noundef %59)
  store ptr %60, ptr %10, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %65, label %62

62:                                               ; preds = %57
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.2) #6
  call void @exit(i32 noundef 1) #7
  unreachable

65:                                               ; preds = %57
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = call ptr @mergeNCubes(ptr noundef %66, ptr noundef %67)
  store ptr %68, ptr %11, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %73, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.3) #6
  call void @exit(i32 noundef 1) #7
  unreachable

73:                                               ; preds = %65
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = call ptr @mergeNCubes(ptr noundef %74, ptr noundef %75)
  store ptr %76, ptr %12, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %81

78:                                               ; preds = %73
  %79 = load ptr, ptr @stderr, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.4) #6
  call void @exit(i32 noundef 1) #7
  unreachable

81:                                               ; preds = %73
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = call ptr @mergeNCubes(ptr noundef %82, ptr noundef %83)
  store ptr %84, ptr %12, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %89

86:                                               ; preds = %81
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.5) #6
  call void @exit(i32 noundef 1) #7
  unreachable

89:                                               ; preds = %81
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = call ptr @mergeNCubes(ptr noundef %90, ptr noundef %91)
  store ptr %92, ptr %12, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %97, label %94

94:                                               ; preds = %89
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.6) #6
  call void @exit(i32 noundef 1) #7
  unreachable

97:                                               ; preds = %89
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = call ptr @mergeNCubes(ptr noundef %98, ptr noundef %99)
  store ptr %100, ptr %13, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %105, label %102

102:                                              ; preds = %97
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.7) #6
  call void @exit(i32 noundef 1) #7
  unreachable

105:                                              ; preds = %97
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = call ptr @mergeNCubes(ptr noundef %106, ptr noundef %107)
  store ptr %108, ptr %14, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %113, label %110

110:                                              ; preds = %105
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.8) #6
  call void @exit(i32 noundef 1) #7
  unreachable

113:                                              ; preds = %105
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = call ptr @mergeNCubes(ptr noundef %114, ptr noundef %115)
  store ptr %116, ptr %15, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %121, label %118

118:                                              ; preds = %113
  %119 = load ptr, ptr @stderr, align 8, !tbaa !5
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.9) #6
  call void @exit(i32 noundef 1) #7
  unreachable

121:                                              ; preds = %113
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = call zeroext i8 @nCubeCoversTerm(ptr noundef %122, i32 noundef 3)
  %124 = icmp ne i8 %123, 0
  br i1 %124, label %128, label %125

125:                                              ; preds = %121
  %126 = load ptr, ptr @stderr, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.10) #6
  call void @exit(i32 noundef 1) #7
  unreachable

128:                                              ; preds = %121
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = call zeroext i8 @nCubeCoversTerm(ptr noundef %129, i32 noundef 15)
  %131 = icmp ne i8 %130, 0
  br i1 %131, label %132, label %135

132:                                              ; preds = %128
  %133 = load ptr, ptr @stderr, align 8, !tbaa !5
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.11) #6
  call void @exit(i32 noundef 1) #7
  unreachable

135:                                              ; preds = %128
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = call zeroext i8 @isNCubePrimeImplicant(ptr noundef %136)
  %138 = zext i8 %137 to i32
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %149, label %140

140:                                              ; preds = %135
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = call zeroext i8 @isNCubePrimeImplicant(ptr noundef %141)
  %143 = zext i8 %142 to i32
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %149, label %145

145:                                              ; preds = %140
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = call zeroext i8 @isNCubePrimeImplicant(ptr noundef %146)
  %148 = icmp ne i8 %147, 0
  br i1 %148, label %152, label %149

149:                                              ; preds = %145, %140, %135
  %150 = load ptr, ptr @stderr, align 8, !tbaa !5
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef @.str.12) #6
  call void @exit(i32 noundef 1) #7
  unreachable

152:                                              ; preds = %145
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  %154 = call zeroext i8 @isNCubePrimeImplicant(ptr noundef %153)
  %155 = icmp ne i8 %154, 0
  br i1 %155, label %156, label %159

156:                                              ; preds = %152
  %157 = load ptr, ptr @stderr, align 8, !tbaa !5
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.13) #6
  call void @exit(i32 noundef 1) #7
  unreachable

159:                                              ; preds = %152
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = call zeroext i8 @isNCubeEssential(ptr noundef %160)
  %162 = icmp ne i8 %161, 0
  br i1 %162, label %163, label %166

163:                                              ; preds = %159
  %164 = load ptr, ptr @stderr, align 8, !tbaa !5
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef @.str.14) #6
  call void @exit(i32 noundef 1) #7
  unreachable

166:                                              ; preds = %159
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  call void @markNCubeAsEssential(ptr noundef %167)
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = call zeroext i8 @isNCubeEssential(ptr noundef %168)
  %170 = icmp ne i8 %169, 0
  br i1 %170, label %174, label %171

171:                                              ; preds = %166
  %172 = load ptr, ptr @stderr, align 8, !tbaa !5
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef @.str.15) #6
  call void @exit(i32 noundef 1) #7
  unreachable

174:                                              ; preds = %166
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = call ptr @nCubeStr(ptr noundef %175, i8 noundef zeroext 1, i8 noundef zeroext 3)
  %177 = call i32 @strcmp(ptr noundef %176, ptr noundef @.str.16) #8
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %182

179:                                              ; preds = %174
  %180 = load ptr, ptr @stderr, align 8, !tbaa !5
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.17) #6
  call void @exit(i32 noundef 1) #7
  unreachable

182:                                              ; preds = %174
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = call ptr @nCubeStr(ptr noundef %183, i8 noundef zeroext 0, i8 noundef zeroext 5)
  %185 = call i32 @strcmp(ptr noundef %184, ptr noundef @.str.18) #8
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %194

187:                                              ; preds = %182
  %188 = load ptr, ptr @stderr, align 8, !tbaa !5
  %189 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.19) #6
  %190 = load ptr, ptr @stderr, align 8, !tbaa !5
  %191 = load ptr, ptr %14, align 8, !tbaa !5
  %192 = call ptr @nCubeStr(ptr noundef %191, i8 noundef zeroext 0, i8 noundef zeroext 5)
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.20, ptr noundef %192) #6
  call void @exit(i32 noundef 1) #7
  unreachable

194:                                              ; preds = %182
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  ret i32 0
}

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

declare ptr @createNCube(i32 noundef, i8 noundef zeroext) #2

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

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

declare zeroext i8 @isNCubePrimeImplicant(ptr noundef) #2

declare ptr @mergeNCubes(ptr noundef, ptr noundef) #2

declare zeroext i8 @nCubeCoversTerm(ptr noundef, i32 noundef) #2

declare zeroext i8 @isNCubeEssential(ptr noundef) #2

declare void @markNCubeAsEssential(ptr noundef) #2

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

declare ptr @nCubeStr(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) #2

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

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

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


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call ptr @createNCube(i32 noundef 0, i8 noundef zeroext 0) #5
  %2 = tail call ptr @createNCube(i32 noundef 1, i8 noundef zeroext 0) #5
  %3 = tail call ptr @createNCube(i32 noundef 2, i8 noundef zeroext 0) #5
  %4 = tail call ptr @createNCube(i32 noundef 3, i8 noundef zeroext 1) #5
  %5 = tail call ptr @createNCube(i32 noundef 5, i8 noundef zeroext 1) #5
  %6 = tail call ptr @createNCube(i32 noundef 7, i8 noundef zeroext 1) #5
  %7 = tail call ptr @createNCube(i32 noundef 13, i8 noundef zeroext 1) #5
  %8 = tail call ptr @createNCube(i32 noundef 15, i8 noundef zeroext 1) #5
  %9 = insertelement <8 x ptr> poison, ptr %1, i64 0
  %10 = insertelement <8 x ptr> %9, ptr %2, i64 1
  %11 = insertelement <8 x ptr> %10, ptr %3, i64 2
  %12 = insertelement <8 x ptr> %11, ptr %4, i64 3
  %13 = insertelement <8 x ptr> %12, ptr %5, i64 4
  %14 = insertelement <8 x ptr> %13, ptr %6, i64 5
  %15 = insertelement <8 x ptr> %14, ptr %7, i64 6
  %16 = insertelement <8 x ptr> %15, ptr %8, i64 7
  %.fr = freeze <8 x ptr> %16
  %17 = icmp eq <8 x ptr> %.fr, zeroinitializer
  %18 = bitcast <8 x i1> %17 to i8
  %19 = icmp eq i8 %18, 0
  br i1 %19, label %23, label %20

20:                                               ; preds = %0
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

23:                                               ; preds = %0
  %24 = tail call zeroext i8 @isNCubePrimeImplicant(ptr noundef nonnull %4) #5
  %.not = icmp eq i8 %24, 0
  br i1 %.not, label %28, label %25

25:                                               ; preds = %23
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.1) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

28:                                               ; preds = %23
  %29 = tail call ptr @mergeNCubes(ptr noundef nonnull %1, ptr noundef nonnull %2) #5
  %.not56 = icmp eq ptr %29, null
  br i1 %.not56, label %30, label %33

30:                                               ; preds = %28
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.2) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

33:                                               ; preds = %28
  %34 = tail call ptr @mergeNCubes(ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %.not57 = icmp eq ptr %34, null
  br i1 %.not57, label %35, label %38

35:                                               ; preds = %33
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.3) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

38:                                               ; preds = %33
  %39 = tail call ptr @mergeNCubes(ptr noundef nonnull %5, ptr noundef nonnull %8) #5
  %.not58 = icmp eq ptr %39, null
  br i1 %.not58, label %43, label %40

40:                                               ; preds = %38
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.4) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

43:                                               ; preds = %38
  %44 = tail call ptr @mergeNCubes(ptr noundef nonnull %5, ptr noundef nonnull %29) #5
  %.not59 = icmp eq ptr %44, null
  br i1 %.not59, label %48, label %45

45:                                               ; preds = %43
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.5) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

48:                                               ; preds = %43
  %49 = tail call ptr @mergeNCubes(ptr noundef nonnull %5, ptr noundef nonnull %6) #5
  %.not60 = icmp eq ptr %49, null
  br i1 %.not60, label %50, label %53

50:                                               ; preds = %48
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.6) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

53:                                               ; preds = %48
  %54 = tail call ptr @mergeNCubes(ptr noundef nonnull %7, ptr noundef nonnull %8) #5
  %.not61 = icmp eq ptr %54, null
  br i1 %.not61, label %55, label %58

55:                                               ; preds = %53
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.7) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

58:                                               ; preds = %53
  %59 = tail call ptr @mergeNCubes(ptr noundef nonnull %29, ptr noundef nonnull %34) #5
  %.not62 = icmp eq ptr %59, null
  br i1 %.not62, label %60, label %63

60:                                               ; preds = %58
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.8) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

63:                                               ; preds = %58
  %64 = tail call ptr @mergeNCubes(ptr noundef nonnull %49, ptr noundef nonnull %54) #5
  %.not63 = icmp eq ptr %64, null
  br i1 %.not63, label %65, label %68

65:                                               ; preds = %63
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.9) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

68:                                               ; preds = %63
  %69 = tail call zeroext i8 @nCubeCoversTerm(ptr noundef nonnull %59, i32 noundef 3) #5
  %.not64 = icmp eq i8 %69, 0
  br i1 %.not64, label %70, label %73

70:                                               ; preds = %68
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.10) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

73:                                               ; preds = %68
  %74 = tail call zeroext i8 @nCubeCoversTerm(ptr noundef nonnull %59, i32 noundef 15) #5
  %.not65 = icmp eq i8 %74, 0
  br i1 %.not65, label %78, label %75

75:                                               ; preds = %73
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.11) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

78:                                               ; preds = %73
  %79 = tail call zeroext i8 @isNCubePrimeImplicant(ptr noundef nonnull %8) #5
  %.not66 = icmp eq i8 %79, 0
  br i1 %.not66, label %80, label %84

80:                                               ; preds = %78
  %81 = tail call zeroext i8 @isNCubePrimeImplicant(ptr noundef nonnull %34) #5
  %.not67 = icmp eq i8 %81, 0
  br i1 %.not67, label %82, label %84

82:                                               ; preds = %80
  %83 = tail call zeroext i8 @isNCubePrimeImplicant(ptr noundef nonnull %59) #5
  %.not68 = icmp eq i8 %83, 0
  br i1 %.not68, label %84, label %87

84:                                               ; preds = %82, %80, %78
  %85 = load ptr, ptr @stderr, align 8, !tbaa !5
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.12) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

87:                                               ; preds = %82
  %88 = tail call zeroext i8 @isNCubePrimeImplicant(ptr noundef nonnull %64) #5
  %.not69 = icmp eq i8 %88, 0
  br i1 %.not69, label %92, label %89

89:                                               ; preds = %87
  %90 = load ptr, ptr @stderr, align 8, !tbaa !5
  %91 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef nonnull @.str.13) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

92:                                               ; preds = %87
  %93 = tail call zeroext i8 @isNCubeEssential(ptr noundef nonnull %59) #5
  %.not70 = icmp eq i8 %93, 0
  br i1 %.not70, label %97, label %94

94:                                               ; preds = %92
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef nonnull @.str.14) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

97:                                               ; preds = %92
  tail call void @markNCubeAsEssential(ptr noundef nonnull %59) #5
  %98 = tail call zeroext i8 @isNCubeEssential(ptr noundef nonnull %59) #5
  %.not71 = icmp eq i8 %98, 0
  br i1 %.not71, label %99, label %102

99:                                               ; preds = %97
  %100 = load ptr, ptr @stderr, align 8, !tbaa !5
  %101 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.15) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

102:                                              ; preds = %97
  %103 = tail call ptr @nCubeStr(ptr noundef nonnull %59, i8 noundef zeroext 1, i8 noundef zeroext 3) #5
  %104 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %103, ptr noundef nonnull dereferenceable(1) @.str.16) #8
  %.not72 = icmp eq i32 %104, 0
  br i1 %.not72, label %108, label %105

105:                                              ; preds = %102
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef nonnull @.str.17) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

108:                                              ; preds = %102
  %109 = tail call ptr @nCubeStr(ptr noundef nonnull %59, i8 noundef zeroext 0, i8 noundef zeroext 5) #5
  %110 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %109, ptr noundef nonnull dereferenceable(1) @.str.18) #8
  %.not73 = icmp eq i32 %110, 0
  br i1 %.not73, label %117, label %111

111:                                              ; preds = %108
  %112 = load ptr, ptr @stderr, align 8, !tbaa !5
  %113 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef nonnull @.str.19) #6
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = tail call ptr @nCubeStr(ptr noundef nonnull %59, i8 noundef zeroext 0, i8 noundef zeroext 5) #5
  %116 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef nonnull @.str.20, ptr noundef %115) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

117:                                              ; preds = %108
  %118 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  ret i32 0
}

declare ptr @createNCube(i32 noundef, i8 noundef zeroext) local_unnamed_addr #1

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

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

declare zeroext i8 @isNCubePrimeImplicant(ptr noundef) local_unnamed_addr #1

declare ptr @mergeNCubes(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @nCubeCoversTerm(ptr noundef, i32 noundef) local_unnamed_addr #1

declare zeroext i8 @isNCubeEssential(ptr noundef) local_unnamed_addr #1

declare void @markNCubeAsEssential(ptr noundef) local_unnamed_addr #1

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

declare ptr @nCubeStr(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #1

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 #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 = { cold nounwind }
attributes #7 = { noreturn nounwind }
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"}


; Effective O3 passes: GlobalDCEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass