; LLVM IR from theck01/offbrand_lib :: apps/minlog/src/funct (minlog_funct)

; 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.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [45 x i8], align 1
@__PRETTY_FUNCTION__.findLargestPrimeImplicants = external hidden unnamed_addr constant [73 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [38 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare void @obvector_store_at_index(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @obvector_length(ptr noundef) #2

declare ptr @ob_release(ptr noundef) #2

declare i32 @getTermValue(ptr noundef) #2

declare ptr @obvector_obj_at_index(ptr noundef, i64 noundef) #2

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

21:                                               ; preds = %2
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call i32 @obvector_length(ptr noundef %22)
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %21
  br label %27

26:                                               ; preds = %21, %2
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 168, ptr noundef @__PRETTY_FUNCTION__.findLargestPrimeImplicants) #5
  unreachable

27:                                               ; preds = %25
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call i32 @obvector_length(ptr noundef %28)
  store i32 %29, ptr %8, align 4, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call i32 @obvector_length(ptr noundef %30)
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call i32 @obvector_length(ptr noundef %32)
  %34 = add i32 %31, %33
  %35 = call ptr @obvector_new(i32 noundef %34)
  store ptr %35, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %61, %27
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = icmp ult i32 %37, %38
  br i1 %39, label %40, label %64

40:                                               ; preds = %36
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = zext i32 %42 to i64
  %44 = call ptr @obvector_obj_at_index(ptr noundef %41, i64 noundef %43)
  store ptr %44, ptr %18, align 8, !tbaa !5
  %45 = load ptr, ptr %18, align 8, !tbaa !5
  %46 = call zeroext i8 @ob_has_class(ptr noundef %45, ptr noundef @.str.19)
  %47 = icmp ne i8 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  br label %50

49:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 179, ptr noundef @__PRETTY_FUNCTION__.findLargestPrimeImplicants) #5
  unreachable

50:                                               ; preds = %48
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  %52 = call i32 @getTermValue(ptr noundef %51)
  %53 = call ptr @createNCube(i32 noundef %52, i8 noundef zeroext 0)
  store ptr %53, ptr %15, align 8, !tbaa !5
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = load ptr, ptr %15, align 8, !tbaa !5
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = call i32 @obvector_length(ptr noundef %56)
  %58 = zext i32 %57 to i64
  call void @obvector_store_at_index(ptr noundef %54, ptr noundef %55, i64 noundef %58)
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = call ptr @ob_release(ptr noundef %59)
  br label %61

61:                                               ; preds = %50
  %62 = load i32, ptr %5, align 4, !tbaa !9
  %63 = add i32 %62, 1
  store i32 %63, ptr %5, align 4, !tbaa !9
  br label %36, !llvm.loop !11

64:                                               ; preds = %36
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %99

67:                                               ; preds = %64
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = call i32 @obvector_length(ptr noundef %68)
  store i32 %69, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %95, %67
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = icmp ult i32 %71, %72
  br i1 %73, label %74, label %98

74:                                               ; preds = %70
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load i32, ptr %5, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = call ptr @obvector_obj_at_index(ptr noundef %75, i64 noundef %77)
  store ptr %78, ptr %18, align 8, !tbaa !5
  %79 = load ptr, ptr %18, align 8, !tbaa !5
  %80 = call zeroext i8 @ob_has_class(ptr noundef %79, ptr noundef @.str.19)
  %81 = icmp ne i8 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %74
  br label %84

83:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 200, ptr noundef @__PRETTY_FUNCTION__.findLargestPrimeImplicants) #5
  unreachable

84:                                               ; preds = %82
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = call i32 @getTermValue(ptr noundef %85)
  %87 = call ptr @createNCube(i32 noundef %86, i8 noundef zeroext 1)
  store ptr %87, ptr %15, align 8, !tbaa !5
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = call i32 @obvector_length(ptr noundef %90)
  %92 = zext i32 %91 to i64
  call void @obvector_store_at_index(ptr noundef %88, ptr noundef %89, i64 noundef %92)
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = call ptr @ob_release(ptr noundef %93)
  br label %95

95:                                               ; preds = %84
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = add i32 %96, 1
  store i32 %97, ptr %5, align 4, !tbaa !9
  br label %70, !llvm.loop !13

98:                                               ; preds = %70
  br label %99

99:                                               ; preds = %98, %64
  %100 = call ptr @obvector_new(i32 noundef 1)
  store ptr %100, ptr %12, align 8, !tbaa !5
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = call i32 @obvector_length(ptr noundef %103)
  %105 = zext i32 %104 to i64
  call void @obvector_store_at_index(ptr noundef %101, ptr noundef %102, i64 noundef %105)
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = call ptr @ob_release(ptr noundef %106)
  store i32 0, ptr %7, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %171, %99
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %111, label %181

111:                                              ; preds = %108
  store i32 -1, ptr %10, align 4, !tbaa !9
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = call ptr @obvector_obj_at_index(ptr noundef %112, i64 noundef %114)
  store ptr %115, ptr %14, align 8, !tbaa !5
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = call i32 @obvector_length(ptr noundef %116)
  %118 = udiv i32 %117, 4
  %119 = call ptr @obvector_new(i32 noundef %118)
  store ptr %119, ptr %13, align 8, !tbaa !5
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = call i32 @obvector_length(ptr noundef %120)
  store i32 %121, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %168, %111
  %123 = load i32, ptr %5, align 4, !tbaa !9
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = sub i32 %124, 1
  %126 = icmp ult i32 %123, %125
  br i1 %126, label %127, label %171

127:                                              ; preds = %122
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = load i32, ptr %5, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = call ptr @obvector_obj_at_index(ptr noundef %128, i64 noundef %130)
  store ptr %131, ptr %16, align 8, !tbaa !5
  %132 = load i32, ptr %5, align 4, !tbaa !9
  %133 = add i32 %132, 1
  store i32 %133, ptr %6, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %164, %127
  %135 = load i32, ptr %6, align 4, !tbaa !9
  %136 = load i32, ptr %8, align 4, !tbaa !9
  %137 = icmp ult i32 %135, %136
  br i1 %137, label %138, label %167

138:                                              ; preds = %134
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = load i32, ptr %6, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = call ptr @obvector_obj_at_index(ptr noundef %139, i64 noundef %141)
  store ptr %142, ptr %17, align 8, !tbaa !5
  %143 = load ptr, ptr %16, align 8, !tbaa !5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = call ptr @mergeNCubes(ptr noundef %143, ptr noundef %144)
  store ptr %145, ptr %15, align 8, !tbaa !5
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %163

147:                                              ; preds = %138
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = call zeroext i8 @obvector_find_obj(ptr noundef %148, ptr noundef %149)
  %151 = icmp ne i8 %150, 0
  br i1 %151, label %160, label %152

152:                                              ; preds = %147
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = call i32 @obvector_length(ptr noundef %155)
  %157 = zext i32 %156 to i64
  call void @obvector_store_at_index(ptr noundef %153, ptr noundef %154, i64 noundef %157)
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %10, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %152, %147
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = call ptr @ob_release(ptr noundef %161)
  br label %163

163:                                              ; preds = %160, %138
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %6, align 4, !tbaa !9
  %166 = add i32 %165, 1
  store i32 %166, ptr %6, align 4, !tbaa !9
  br label %134, !llvm.loop !14

167:                                              ; preds = %134
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %5, align 4, !tbaa !9
  %170 = add i32 %169, 1
  store i32 %170, ptr %5, align 4, !tbaa !9
  br label %122, !llvm.loop !15

171:                                              ; preds = %122
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  %175 = call i32 @obvector_length(ptr noundef %174)
  %176 = zext i32 %175 to i64
  call void @obvector_store_at_index(ptr noundef %172, ptr noundef %173, i64 noundef %176)
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = call ptr @ob_release(ptr noundef %177)
  %179 = load i32, ptr %7, align 4, !tbaa !9
  %180 = add i32 %179, 1
  store i32 %180, ptr %7, align 4, !tbaa !9
  br label %108, !llvm.loop !16

181:                                              ; preds = %108
  %182 = call ptr @obvector_new(i32 noundef 1)
  store ptr %182, ptr %11, align 8, !tbaa !5
  %183 = load ptr, ptr %12, align 8, !tbaa !5
  %184 = call i32 @obvector_length(ptr noundef %183)
  store i32 %184, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %219, %181
  %186 = load i32, ptr %5, align 4, !tbaa !9
  %187 = load i32, ptr %8, align 4, !tbaa !9
  %188 = icmp ult i32 %186, %187
  br i1 %188, label %189, label %222

189:                                              ; preds = %185
  %190 = load ptr, ptr %12, align 8, !tbaa !5
  %191 = load i32, ptr %5, align 4, !tbaa !9
  %192 = zext i32 %191 to i64
  %193 = call ptr @obvector_obj_at_index(ptr noundef %190, i64 noundef %192)
  store ptr %193, ptr %13, align 8, !tbaa !5
  %194 = load ptr, ptr %13, align 8, !tbaa !5
  %195 = call i32 @obvector_length(ptr noundef %194)
  store i32 %195, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %215, %189
  %197 = load i32, ptr %6, align 4, !tbaa !9
  %198 = load i32, ptr %9, align 4, !tbaa !9
  %199 = icmp ult i32 %197, %198
  br i1 %199, label %200, label %218

200:                                              ; preds = %196
  %201 = load ptr, ptr %13, align 8, !tbaa !5
  %202 = load i32, ptr %6, align 4, !tbaa !9
  %203 = zext i32 %202 to i64
  %204 = call ptr @obvector_obj_at_index(ptr noundef %201, i64 noundef %203)
  store ptr %204, ptr %15, align 8, !tbaa !5
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = call zeroext i8 @isNCubePrimeImplicant(ptr noundef %205)
  %207 = icmp ne i8 %206, 0
  br i1 %207, label %208, label %214

208:                                              ; preds = %200
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = load ptr, ptr %15, align 8, !tbaa !5
  %211 = load ptr, ptr %11, align 8, !tbaa !5
  %212 = call i32 @obvector_length(ptr noundef %211)
  %213 = zext i32 %212 to i64
  call void @obvector_store_at_index(ptr noundef %209, ptr noundef %210, i64 noundef %213)
  br label %214

214:                                              ; preds = %208, %200
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %6, align 4, !tbaa !9
  %217 = add i32 %216, 1
  store i32 %217, ptr %6, align 4, !tbaa !9
  br label %196, !llvm.loop !17

218:                                              ; preds = %196
  br label %219

219:                                              ; preds = %218
  %220 = load i32, ptr %5, align 4, !tbaa !9
  %221 = add i32 %220, 1
  store i32 %221, ptr %5, align 4, !tbaa !9
  br label %185, !llvm.loop !18

222:                                              ; preds = %185
  %223 = load ptr, ptr %12, align 8, !tbaa !5
  %224 = call ptr @ob_release(ptr noundef %223)
  %225 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret ptr %225
}

declare ptr @obvector_new(i32 noundef) #2

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

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

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

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

declare zeroext i8 @isNCubePrimeImplicant(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 }
attributes #5 = { noreturn 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; 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.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [45 x i8], align 1
@__PRETTY_FUNCTION__.findLargestPrimeImplicants = external hidden unnamed_addr constant [73 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @obvector_store_at_index(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @obvector_length(ptr noundef) local_unnamed_addr #1

declare ptr @ob_release(ptr noundef) local_unnamed_addr #1

declare i32 @getTermValue(ptr noundef) local_unnamed_addr #1

declare ptr @obvector_obj_at_index(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @findLargestPrimeImplicants(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %5, label %3

3:                                                ; preds = %2
  %4 = tail call i32 @obvector_length(ptr noundef nonnull %0) #3
  %.not90 = icmp eq i32 %4, 0
  br i1 %.not90, label %5, label %6

5:                                                ; preds = %3, %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.1, i32 noundef 168, ptr noundef nonnull @__PRETTY_FUNCTION__.findLargestPrimeImplicants) #4
  unreachable

6:                                                ; preds = %3
  %7 = tail call i32 @obvector_length(ptr noundef nonnull %0) #3
  %8 = tail call i32 @obvector_length(ptr noundef nonnull %0) #3
  %9 = tail call i32 @obvector_length(ptr noundef %1) #3
  %10 = add i32 %9, %8
  %11 = tail call ptr @obvector_new(i32 noundef %10) #3
  %.not121 = icmp eq i32 %7, 0
  br i1 %.not121, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %6
  %wide.trip.count = zext i32 %7 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %15
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %15 ]
  %12 = tail call ptr @obvector_obj_at_index(ptr noundef nonnull %0, i64 noundef %indvars.iv) #3
  %13 = tail call zeroext i8 @ob_has_class(ptr noundef %12, ptr noundef nonnull @.str.19) #3
  %.not96 = icmp eq i8 %13, 0
  br i1 %.not96, label %14, label %15

14:                                               ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 179, ptr noundef nonnull @__PRETTY_FUNCTION__.findLargestPrimeImplicants) #4
  unreachable

15:                                               ; preds = %.lr.ph
  %16 = tail call i32 @getTermValue(ptr noundef %12) #3
  %17 = tail call ptr @createNCube(i32 noundef %16, i8 noundef zeroext 0) #3
  %18 = tail call i32 @obvector_length(ptr noundef %11) #3
  %19 = zext i32 %18 to i64
  tail call void @obvector_store_at_index(ptr noundef %11, ptr noundef %17, i64 noundef %19) #3
  %20 = tail call ptr @ob_release(ptr noundef %17) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %15, %6
  %.not91 = icmp eq ptr %1, null
  br i1 %.not91, label %.loopexit97, label %21

21:                                               ; preds = %._crit_edge
  %22 = tail call i32 @obvector_length(ptr noundef nonnull %1) #3
  %.not122 = icmp eq i32 %22, 0
  br i1 %.not122, label %.loopexit97, label %.lr.ph101.preheader

.lr.ph101.preheader:                              ; preds = %21
  %wide.trip.count130 = zext i32 %22 to i64
  br label %.lr.ph101

.lr.ph101:                                        ; preds = %.lr.ph101.preheader, %26
  %indvars.iv127 = phi i64 [ 0, %.lr.ph101.preheader ], [ %indvars.iv.next128, %26 ]
  %23 = tail call ptr @obvector_obj_at_index(ptr noundef nonnull %1, i64 noundef %indvars.iv127) #3
  %24 = tail call zeroext i8 @ob_has_class(ptr noundef %23, ptr noundef nonnull @.str.19) #3
  %.not95 = icmp eq i8 %24, 0
  br i1 %.not95, label %25, label %26

25:                                               ; preds = %.lr.ph101
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 200, ptr noundef nonnull @__PRETTY_FUNCTION__.findLargestPrimeImplicants) #4
  unreachable

26:                                               ; preds = %.lr.ph101
  %27 = tail call i32 @getTermValue(ptr noundef %23) #3
  %28 = tail call ptr @createNCube(i32 noundef %27, i8 noundef zeroext 1) #3
  %29 = tail call i32 @obvector_length(ptr noundef %11) #3
  %30 = zext i32 %29 to i64
  tail call void @obvector_store_at_index(ptr noundef %11, ptr noundef %28, i64 noundef %30) #3
  %31 = tail call ptr @ob_release(ptr noundef %28) #3
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next128, %wide.trip.count130
  br i1 %exitcond131.not, label %.loopexit97, label %.lr.ph101, !llvm.loop !7

.loopexit97:                                      ; preds = %26, %21, %._crit_edge
  %32 = tail call ptr @obvector_new(i32 noundef 1) #3
  %33 = tail call i32 @obvector_length(ptr noundef %32) #3
  %34 = zext i32 %33 to i64
  tail call void @obvector_store_at_index(ptr noundef %32, ptr noundef %11, i64 noundef %34) #3
  %35 = tail call ptr @ob_release(ptr noundef %11) #3
  br label %36

36:                                               ; preds = %.loopexit97, %._crit_edge110
  %.082112 = phi i32 [ 0, %.loopexit97 ], [ %61, %._crit_edge110 ]
  %37 = zext i32 %.082112 to i64
  %38 = tail call ptr @obvector_obj_at_index(ptr noundef %32, i64 noundef %37) #3
  %39 = tail call i32 @obvector_length(ptr noundef %38) #3
  %40 = lshr i32 %39, 2
  %41 = tail call ptr @obvector_new(i32 noundef %40) #3
  %42 = tail call i32 @obvector_length(ptr noundef %38) #3
  %43 = add i32 %42, -1
  %.not123 = icmp eq i32 %43, 0
  br i1 %.not123, label %._crit_edge110, label %.lr.ph109.preheader

.lr.ph109.preheader:                              ; preds = %36
  %44 = zext i32 %42 to i64
  %wide.trip.count141 = zext i32 %43 to i64
  br label %.lr.ph109

.loopexit:                                        ; preds = %57, %.lr.ph109
  %.285.lcssa = phi i32 [ %.184106, %.lr.ph109 ], [ %.4, %57 ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count141
  br i1 %exitcond142.not, label %._crit_edge110, label %.lr.ph109, !llvm.loop !8

.lr.ph109:                                        ; preds = %.lr.ph109.preheader, %.loopexit
  %indvars.iv138 = phi i64 [ 0, %.lr.ph109.preheader ], [ %indvars.iv.next139, %.loopexit ]
  %indvars.iv132 = phi i64 [ 1, %.lr.ph109.preheader ], [ %indvars.iv.next133, %.loopexit ]
  %.184106 = phi i32 [ -1, %.lr.ph109.preheader ], [ %.285.lcssa, %.loopexit ]
  %45 = tail call ptr @obvector_obj_at_index(ptr noundef %38, i64 noundef %indvars.iv138) #3
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %46 = icmp ult i64 %indvars.iv.next139, %44
  br i1 %46, label %.lr.ph105, label %.loopexit

.lr.ph105:                                        ; preds = %.lr.ph109, %57
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %57 ], [ %indvars.iv132, %.lr.ph109 ]
  %.285102 = phi i32 [ %.4, %57 ], [ %.184106, %.lr.ph109 ]
  %47 = tail call ptr @obvector_obj_at_index(ptr noundef %38, i64 noundef %indvars.iv134) #3
  %48 = tail call ptr @mergeNCubes(ptr noundef %45, ptr noundef %47) #3
  %.not93 = icmp eq ptr %48, null
  br i1 %.not93, label %57, label %49

49:                                               ; preds = %.lr.ph105
  %50 = tail call zeroext i8 @obvector_find_obj(ptr noundef %41, ptr noundef nonnull %48) #3
  %.not94 = icmp eq i8 %50, 0
  br i1 %.not94, label %51, label %55

51:                                               ; preds = %49
  %52 = tail call i32 @obvector_length(ptr noundef %41) #3
  %53 = zext i32 %52 to i64
  tail call void @obvector_store_at_index(ptr noundef %41, ptr noundef nonnull %48, i64 noundef %53) #3
  %54 = add nsw i32 %.285102, 1
  br label %55

55:                                               ; preds = %51, %49
  %.386 = phi i32 [ %.285102, %49 ], [ %54, %51 ]
  %56 = tail call ptr @ob_release(ptr noundef nonnull %48) #3
  br label %57

57:                                               ; preds = %.lr.ph105, %55
  %.4 = phi i32 [ %.386, %55 ], [ %.285102, %.lr.ph105 ]
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next135 to i32
  %exitcond137.not = icmp eq i32 %42, %lftr.wideiv
  br i1 %exitcond137.not, label %.loopexit, label %.lr.ph105, !llvm.loop !9

._crit_edge110:                                   ; preds = %.loopexit, %36
  %.184.lcssa = phi i32 [ -1, %36 ], [ %.285.lcssa, %.loopexit ]
  %58 = tail call i32 @obvector_length(ptr noundef %32) #3
  %59 = zext i32 %58 to i64
  tail call void @obvector_store_at_index(ptr noundef %32, ptr noundef %41, i64 noundef %59) #3
  %60 = tail call ptr @ob_release(ptr noundef %41) #3
  %61 = add i32 %.082112, 1
  %62 = icmp sgt i32 %.184.lcssa, 0
  br i1 %62, label %36, label %63, !llvm.loop !10

63:                                               ; preds = %._crit_edge110
  %64 = tail call ptr @obvector_new(i32 noundef 1) #3
  %65 = tail call i32 @obvector_length(ptr noundef %32) #3
  %.not124 = icmp eq i32 %65, 0
  br i1 %.not124, label %._crit_edge120, label %.lr.ph119.preheader

.lr.ph119.preheader:                              ; preds = %63
  %wide.trip.count151 = zext i32 %65 to i64
  br label %.lr.ph119

.lr.ph119:                                        ; preds = %.lr.ph119.preheader, %._crit_edge116
  %indvars.iv148 = phi i64 [ 0, %.lr.ph119.preheader ], [ %indvars.iv.next149, %._crit_edge116 ]
  %66 = tail call ptr @obvector_obj_at_index(ptr noundef %32, i64 noundef %indvars.iv148) #3
  %67 = tail call i32 @obvector_length(ptr noundef %66) #3
  %.not125 = icmp eq i32 %67, 0
  br i1 %.not125, label %._crit_edge116, label %.lr.ph115.preheader

.lr.ph115.preheader:                              ; preds = %.lr.ph119
  %wide.trip.count146 = zext i32 %67 to i64
  br label %.lr.ph115

.lr.ph115:                                        ; preds = %.lr.ph115.preheader, %73
  %indvars.iv143 = phi i64 [ 0, %.lr.ph115.preheader ], [ %indvars.iv.next144, %73 ]
  %68 = tail call ptr @obvector_obj_at_index(ptr noundef %66, i64 noundef %indvars.iv143) #3
  %69 = tail call zeroext i8 @isNCubePrimeImplicant(ptr noundef %68) #3
  %.not92 = icmp eq i8 %69, 0
  br i1 %.not92, label %73, label %70

70:                                               ; preds = %.lr.ph115
  %71 = tail call i32 @obvector_length(ptr noundef %64) #3
  %72 = zext i32 %71 to i64
  tail call void @obvector_store_at_index(ptr noundef %64, ptr noundef %68, i64 noundef %72) #3
  br label %73

73:                                               ; preds = %.lr.ph115, %70
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond147.not = icmp eq i64 %indvars.iv.next144, %wide.trip.count146
  br i1 %exitcond147.not, label %._crit_edge116, label %.lr.ph115, !llvm.loop !11

._crit_edge116:                                   ; preds = %73, %.lr.ph119
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %._crit_edge120, label %.lr.ph119, !llvm.loop !12

._crit_edge120:                                   ; preds = %._crit_edge116, %63
  %74 = tail call ptr @ob_release(ptr noundef %32) #3
  ret ptr %64
}

declare ptr @obvector_new(i32 noundef) local_unnamed_addr #1

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

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

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

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

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

attributes #0 = { 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 #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 = { 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 #3 = { nounwind }
attributes #4 = { noreturn 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}


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