; LLVM IR from themisvaltinos/Partitioned-Hash-Join :: tests (test_query)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.join_relation = type { ptr, i32 }
%struct.tuple = type { i32, i32 }
%struct.row_ids = type { i32, i32, ptr }
%struct.relation = type { ptr, i64, i64 }

@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.testBuildJoinRelation = external hidden unnamed_addr constant [33 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @acutest_check_(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #0

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

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

; Function Attrs: noreturn nounwind uwtable
declare dso_local void @acutest_abort_() #2

declare i32 @fclose(ptr noundef) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @_parseRelation(ptr noundef) #0

declare ptr @memAlloc(i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local void @testBuildJoinRelation() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  %7 = call noalias ptr @fopen(ptr noundef @.str.74, ptr noundef @.str.36)
  store ptr %7, ptr %1, align 8, !tbaa !5
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %0
  br label %12

11:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.54, ptr noundef @.str.38, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__.testBuildJoinRelation) #7
  unreachable

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = call ptr @_parseRelation(ptr noundef %13)
  store ptr %14, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = call i32 @fclose(ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %17 = call ptr @memAlloc(i32 noundef 8, i32 noundef 1, i1 noundef zeroext true, ptr noundef null)
  store ptr %17, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %18 = call ptr @memAlloc(i32 noundef 8, i32 noundef 1, i1 noundef zeroext true, ptr noundef null)
  store ptr %18, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds ptr, ptr %19, i64 0
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds ptr, ptr %22, i64 0
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = call ptr @buildJoinRelation(ptr noundef %21, ptr noundef %24, ptr noundef %25, i32 noundef 0)
  store ptr %26, ptr %5, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %12
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.join_relation, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = icmp eq i32 %30, 3
  %32 = zext i1 %31 to i32
  %33 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %32, ptr noundef @.str.38, i32 noundef 114, ptr noundef @.str.5, ptr noundef @.str.75)
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %36, label %35

35:                                               ; preds = %27
  call void @acutest_abort_() #8
  unreachable

36:                                               ; preds = %27
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.join_relation, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !12
  %43 = getelementptr inbounds %struct.tuple, ptr %42, i64 0
  %44 = getelementptr inbounds %struct.tuple, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 4, !tbaa !13
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %55

47:                                               ; preds = %39
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.join_relation, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !12
  %51 = getelementptr inbounds %struct.tuple, ptr %50, i64 0
  %52 = getelementptr inbounds %struct.tuple, ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !15
  %54 = icmp eq i32 %53, 19
  br label %55

55:                                               ; preds = %47, %39
  %56 = phi i1 [ false, %39 ], [ %54, %47 ]
  %57 = zext i1 %56 to i32
  %58 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %57, ptr noundef @.str.38, i32 noundef 115, ptr noundef @.str.5, ptr noundef @.str.76)
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  call void @acutest_abort_() #8
  unreachable

61:                                               ; preds = %55
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.join_relation, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !12
  %68 = getelementptr inbounds %struct.tuple, ptr %67, i64 1
  %69 = getelementptr inbounds %struct.tuple, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = icmp eq i32 %70, 1
  br i1 %71, label %72, label %80

72:                                               ; preds = %64
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.join_relation, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !12
  %76 = getelementptr inbounds %struct.tuple, ptr %75, i64 1
  %77 = getelementptr inbounds %struct.tuple, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = icmp eq i32 %78, 44444
  br label %80

80:                                               ; preds = %72, %64
  %81 = phi i1 [ false, %64 ], [ %79, %72 ]
  %82 = zext i1 %81 to i32
  %83 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %82, ptr noundef @.str.38, i32 noundef 116, ptr noundef @.str.5, ptr noundef @.str.77)
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %86, label %85

85:                                               ; preds = %80
  call void @acutest_abort_() #8
  unreachable

86:                                               ; preds = %80
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.join_relation, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !12
  %93 = getelementptr inbounds %struct.tuple, ptr %92, i64 2
  %94 = getelementptr inbounds %struct.tuple, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 4, !tbaa !13
  %96 = icmp eq i32 %95, 2
  br i1 %96, label %97, label %105

97:                                               ; preds = %89
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.join_relation, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !12
  %101 = getelementptr inbounds %struct.tuple, ptr %100, i64 2
  %102 = getelementptr inbounds %struct.tuple, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !15
  %104 = icmp eq i32 %103, 30001
  br label %105

105:                                              ; preds = %97, %89
  %106 = phi i1 [ false, %89 ], [ %104, %97 ]
  %107 = zext i1 %106 to i32
  %108 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %107, ptr noundef @.str.38, i32 noundef 117, ptr noundef @.str.5, ptr noundef @.str.78)
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %111, label %110

110:                                              ; preds = %105
  call void @acutest_abort_() #8
  unreachable

111:                                              ; preds = %105
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  call void @destroyJoinRelation(ptr noundef %114)
  %115 = call ptr @memAlloc(i32 noundef 16, i32 noundef 1, i1 noundef zeroext false, ptr noundef null)
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds ptr, ptr %116, i64 0
  store ptr %115, ptr %117, align 8, !tbaa !5
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds ptr, ptr %118, i64 0
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.row_ids, ptr %120, i32 0, i32 0
  store i32 2, ptr %121, align 8, !tbaa !16
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds ptr, ptr %122, i64 0
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.row_ids, ptr %124, i32 0, i32 1
  store i32 2, ptr %125, align 4, !tbaa !18
  %126 = call ptr @memAlloc(i32 noundef 4, i32 noundef 2, i1 noundef zeroext false, ptr noundef null)
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds ptr, ptr %127, i64 0
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.row_ids, ptr %129, i32 0, i32 2
  store ptr %126, ptr %130, align 8, !tbaa !19
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds ptr, ptr %131, i64 0
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.row_ids, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !19
  %136 = getelementptr inbounds i32, ptr %135, i64 0
  store i32 2, ptr %136, align 4, !tbaa !20
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds ptr, ptr %137, i64 0
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.row_ids, ptr %139, i32 0, i32 2
  %141 = load ptr, ptr %140, align 8, !tbaa !19
  %142 = getelementptr inbounds i32, ptr %141, i64 1
  store i32 1, ptr %142, align 4, !tbaa !20
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds ptr, ptr %143, i64 0
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds ptr, ptr %146, i64 0
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = call ptr @buildJoinRelation(ptr noundef %145, ptr noundef %148, ptr noundef %149, i32 noundef 0)
  store ptr %150, ptr %5, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %113
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.join_relation, ptr %152, i32 0, i32 1
  %154 = load i32, ptr %153, align 8, !tbaa !9
  %155 = icmp eq i32 %154, 2
  %156 = zext i1 %155 to i32
  %157 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %156, ptr noundef @.str.38, i32 noundef 130, ptr noundef @.str.5, ptr noundef @.str.79)
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %160, label %159

159:                                              ; preds = %151
  call void @acutest_abort_() #8
  unreachable

160:                                              ; preds = %151
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.join_relation, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !12
  %167 = getelementptr inbounds %struct.tuple, ptr %166, i64 0
  %168 = getelementptr inbounds %struct.tuple, ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 4, !tbaa !13
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %179

171:                                              ; preds = %163
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.join_relation, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !12
  %175 = getelementptr inbounds %struct.tuple, ptr %174, i64 0
  %176 = getelementptr inbounds %struct.tuple, ptr %175, i32 0, i32 1
  %177 = load i32, ptr %176, align 4, !tbaa !15
  %178 = icmp eq i32 %177, 30001
  br label %179

179:                                              ; preds = %171, %163
  %180 = phi i1 [ false, %163 ], [ %178, %171 ]
  %181 = zext i1 %180 to i32
  %182 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %181, ptr noundef @.str.38, i32 noundef 131, ptr noundef @.str.5, ptr noundef @.str.80)
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %185, label %184

184:                                              ; preds = %179
  call void @acutest_abort_() #8
  unreachable

185:                                              ; preds = %179
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.join_relation, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !12
  %192 = getelementptr inbounds %struct.tuple, ptr %191, i64 1
  %193 = getelementptr inbounds %struct.tuple, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 4, !tbaa !13
  %195 = icmp eq i32 %194, 1
  br i1 %195, label %196, label %204

196:                                              ; preds = %188
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.join_relation, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !12
  %200 = getelementptr inbounds %struct.tuple, ptr %199, i64 1
  %201 = getelementptr inbounds %struct.tuple, ptr %200, i32 0, i32 1
  %202 = load i32, ptr %201, align 4, !tbaa !15
  %203 = icmp eq i32 %202, 44444
  br label %204

204:                                              ; preds = %196, %188
  %205 = phi i1 [ false, %188 ], [ %203, %196 ]
  %206 = zext i1 %205 to i32
  %207 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %206, ptr noundef @.str.38, i32 noundef 132, ptr noundef @.str.5, ptr noundef @.str.77)
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %210, label %209

209:                                              ; preds = %204
  call void @acutest_abort_() #8
  unreachable

210:                                              ; preds = %204
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  call void @destroyJoinRelation(ptr noundef %213)
  %214 = call ptr @memAlloc(i32 noundef 16, i32 noundef 1, i1 noundef zeroext false, ptr noundef null)
  %215 = load ptr, ptr %4, align 8, !tbaa !5
  %216 = getelementptr inbounds ptr, ptr %215, i64 0
  store ptr %214, ptr %216, align 8, !tbaa !5
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds ptr, ptr %217, i64 0
  %219 = load ptr, ptr %218, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.row_ids, ptr %219, i32 0, i32 0
  store i32 2, ptr %220, align 8, !tbaa !16
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds ptr, ptr %221, i64 0
  %223 = load ptr, ptr %222, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.row_ids, ptr %223, i32 0, i32 1
  store i32 2, ptr %224, align 4, !tbaa !18
  %225 = call ptr @memAlloc(i32 noundef 4, i32 noundef 2, i1 noundef zeroext false, ptr noundef null)
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = getelementptr inbounds ptr, ptr %226, i64 0
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.row_ids, ptr %228, i32 0, i32 2
  store ptr %225, ptr %229, align 8, !tbaa !19
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds ptr, ptr %230, i64 0
  %232 = load ptr, ptr %231, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.row_ids, ptr %232, i32 0, i32 2
  %234 = load ptr, ptr %233, align 8, !tbaa !19
  %235 = getelementptr inbounds i32, ptr %234, i64 0
  store i32 0, ptr %235, align 4, !tbaa !20
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds ptr, ptr %236, i64 0
  %238 = load ptr, ptr %237, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.row_ids, ptr %238, i32 0, i32 2
  %240 = load ptr, ptr %239, align 8, !tbaa !19
  %241 = getelementptr inbounds i32, ptr %240, i64 1
  store i32 1, ptr %241, align 4, !tbaa !20
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds ptr, ptr %242, i64 0
  %244 = load ptr, ptr %243, align 8, !tbaa !5
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds ptr, ptr %245, i64 0
  %247 = load ptr, ptr %246, align 8, !tbaa !5
  %248 = load ptr, ptr %2, align 8, !tbaa !5
  %249 = call ptr @buildJoinRelation(ptr noundef %244, ptr noundef %247, ptr noundef %248, i32 noundef 3)
  store ptr %249, ptr %5, align 8, !tbaa !5
  br label %250

250:                                              ; preds = %212
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.join_relation, ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 8, !tbaa !9
  %254 = icmp eq i32 %253, 2
  %255 = zext i1 %254 to i32
  %256 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %255, ptr noundef @.str.38, i32 noundef 143, ptr noundef @.str.5, ptr noundef @.str.79)
  %257 = icmp ne i32 %256, 0
  br i1 %257, label %259, label %258

258:                                              ; preds = %250
  call void @acutest_abort_() #8
  unreachable

259:                                              ; preds = %250
  br label %260

260:                                              ; preds = %259
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.join_relation, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !12
  %266 = getelementptr inbounds %struct.tuple, ptr %265, i64 0
  %267 = getelementptr inbounds %struct.tuple, ptr %266, i32 0, i32 0
  %268 = load i32, ptr %267, align 4, !tbaa !13
  %269 = icmp eq i32 %268, 0
  br i1 %269, label %270, label %278

270:                                              ; preds = %262
  %271 = load ptr, ptr %5, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.join_relation, ptr %271, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8, !tbaa !12
  %274 = getelementptr inbounds %struct.tuple, ptr %273, i64 0
  %275 = getelementptr inbounds %struct.tuple, ptr %274, i32 0, i32 1
  %276 = load i32, ptr %275, align 4, !tbaa !15
  %277 = icmp eq i32 %276, 45
  br label %278

278:                                              ; preds = %270, %262
  %279 = phi i1 [ false, %262 ], [ %277, %270 ]
  %280 = zext i1 %279 to i32
  %281 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %280, ptr noundef @.str.38, i32 noundef 144, ptr noundef @.str.5, ptr noundef @.str.81)
  %282 = icmp ne i32 %281, 0
  br i1 %282, label %284, label %283

283:                                              ; preds = %278
  call void @acutest_abort_() #8
  unreachable

284:                                              ; preds = %278
  br label %285

285:                                              ; preds = %284
  br label %286

286:                                              ; preds = %285
  br label %287

287:                                              ; preds = %286
  %288 = load ptr, ptr %5, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.join_relation, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !12
  %291 = getelementptr inbounds %struct.tuple, ptr %290, i64 1
  %292 = getelementptr inbounds %struct.tuple, ptr %291, i32 0, i32 0
  %293 = load i32, ptr %292, align 4, !tbaa !13
  %294 = icmp eq i32 %293, 1
  br i1 %294, label %295, label %303

295:                                              ; preds = %287
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.join_relation, ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !12
  %299 = getelementptr inbounds %struct.tuple, ptr %298, i64 1
  %300 = getelementptr inbounds %struct.tuple, ptr %299, i32 0, i32 1
  %301 = load i32, ptr %300, align 4, !tbaa !15
  %302 = icmp eq i32 %301, 34
  br label %303

303:                                              ; preds = %295, %287
  %304 = phi i1 [ false, %287 ], [ %302, %295 ]
  %305 = zext i1 %304 to i32
  %306 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %305, ptr noundef @.str.38, i32 noundef 145, ptr noundef @.str.5, ptr noundef @.str.82)
  %307 = icmp ne i32 %306, 0
  br i1 %307, label %309, label %308

308:                                              ; preds = %303
  call void @acutest_abort_() #8
  unreachable

309:                                              ; preds = %303
  br label %310

310:                                              ; preds = %309
  br label %311

311:                                              ; preds = %310
  %312 = load ptr, ptr %5, align 8, !tbaa !5
  call void @destroyJoinRelation(ptr noundef %312)
  %313 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyInters(ptr noundef %313, i32 noundef 1)
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  call void @destroyInters(ptr noundef %314, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !21
  br label %315

315:                                              ; preds = %329, %311
  %316 = load i64, ptr %6, align 8, !tbaa !21
  %317 = load ptr, ptr %2, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.relation, ptr %317, i32 0, i32 2
  %319 = load i64, ptr %318, align 8, !tbaa !23
  %320 = icmp ult i64 %316, %319
  br i1 %320, label %322, label %321

321:                                              ; preds = %315
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %332

322:                                              ; preds = %315
  %323 = load ptr, ptr %2, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.relation, ptr %323, i32 0, i32 0
  %325 = load ptr, ptr %324, align 8, !tbaa !25
  %326 = load i64, ptr %6, align 8, !tbaa !21
  %327 = getelementptr inbounds ptr, ptr %325, i64 %326
  %328 = load ptr, ptr %327, align 8, !tbaa !5
  call void @free(ptr noundef %328) #6
  br label %329

329:                                              ; preds = %322
  %330 = load i64, ptr %6, align 8, !tbaa !21
  %331 = add i64 %330, 1
  store i64 %331, ptr %6, align 8, !tbaa !21
  br label %315, !llvm.loop !26

332:                                              ; preds = %321
  %333 = load ptr, ptr %2, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.relation, ptr %333, i32 0, i32 0
  %335 = load ptr, ptr %334, align 8, !tbaa !25
  call void @free(ptr noundef %335) #6
  %336 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %336) #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
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void
}

declare ptr @buildJoinRelation(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

declare void @destroyJoinRelation(ptr noundef) #3

declare void @destroyInters(ptr noundef, i32 noundef) #3

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 = { noreturn 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 = { "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 "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 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"join_relation", !6, i64 0, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"tuple", !11, i64 0, !11, i64 4}
!15 = !{!14, !11, i64 4}
!16 = !{!17, !11, i64 0}
!17 = !{!"row_ids", !11, i64 0, !11, i64 4, !6, i64 8}
!18 = !{!17, !11, i64 4}
!19 = !{!17, !6, i64 8}
!20 = !{!11, !11, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!24, !22, i64 16}
!24 = !{!"relation", !6, i64 0, !22, i64 8, !22, i64 16}
!25 = !{!24, !6, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; 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.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.testBuildJoinRelation = external hidden unnamed_addr constant [33 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @acutest_check_(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: noreturn nounwind uwtable
declare dso_local void @acutest_abort_() local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @_parseRelation(ptr noundef) local_unnamed_addr #0

declare ptr @memAlloc(i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local void @testBuildJoinRelation() local_unnamed_addr #0 {
  %1 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.74, ptr noundef nonnull @.str.36)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %2, label %3

2:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.54, ptr noundef nonnull @.str.38, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__.testBuildJoinRelation) #6
  unreachable

3:                                                ; preds = %0
  %4 = tail call ptr @_parseRelation(ptr noundef nonnull %1)
  %5 = tail call i32 @fclose(ptr noundef nonnull %1)
  %6 = tail call ptr @memAlloc(i32 noundef 8, i32 noundef 1, i1 noundef zeroext true, ptr noundef null) #7
  %7 = tail call ptr @memAlloc(i32 noundef 8, i32 noundef 1, i1 noundef zeroext true, ptr noundef null) #7
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = load ptr, ptr %6, align 8, !tbaa !5
  %10 = tail call ptr @buildJoinRelation(ptr noundef %8, ptr noundef %9, ptr noundef %4, i32 noundef 0) #7
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = icmp eq i32 %12, 3
  %14 = zext i1 %13 to i32
  %15 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %14, ptr noundef nonnull @.str.38, i32 noundef 114, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.75)
  %.not53 = icmp eq i32 %15, 0
  br i1 %.not53, label %16, label %17

16:                                               ; preds = %3
  tail call void @acutest_abort_() #8
  unreachable

17:                                               ; preds = %3
  %18 = load ptr, ptr %10, align 8, !tbaa !12
  %19 = load i32, ptr %18, align 4, !tbaa !13
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %18, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !15
  %24 = icmp eq i32 %23, 19
  br label %25

25:                                               ; preds = %21, %17
  %26 = phi i1 [ false, %17 ], [ %24, %21 ]
  %27 = zext i1 %26 to i32
  %28 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %27, ptr noundef nonnull @.str.38, i32 noundef 115, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.76)
  %.not54 = icmp eq i32 %28, 0
  br i1 %.not54, label %29, label %30

29:                                               ; preds = %25
  tail call void @acutest_abort_() #8
  unreachable

30:                                               ; preds = %25
  %31 = load ptr, ptr %10, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %40

35:                                               ; preds = %30
  %36 = getelementptr inbounds i8, ptr %31, i64 12
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = icmp eq i32 %37, 44444
  %39 = zext i1 %38 to i32
  br label %40

40:                                               ; preds = %35, %30
  %41 = phi i32 [ 0, %30 ], [ %39, %35 ]
  %42 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %41, ptr noundef nonnull @.str.38, i32 noundef 116, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.77)
  %.not55 = icmp eq i32 %42, 0
  br i1 %.not55, label %43, label %44

43:                                               ; preds = %40
  tail call void @acutest_abort_() #8
  unreachable

44:                                               ; preds = %40
  %45 = load ptr, ptr %10, align 8, !tbaa !12
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = icmp eq i32 %47, 2
  br i1 %48, label %49, label %54

49:                                               ; preds = %44
  %50 = getelementptr inbounds i8, ptr %45, i64 20
  %51 = load i32, ptr %50, align 4, !tbaa !15
  %52 = icmp eq i32 %51, 30001
  %53 = zext i1 %52 to i32
  br label %54

54:                                               ; preds = %49, %44
  %55 = phi i32 [ 0, %44 ], [ %53, %49 ]
  %56 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %55, ptr noundef nonnull @.str.38, i32 noundef 117, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.78)
  %.not56 = icmp eq i32 %56, 0
  br i1 %.not56, label %57, label %58

57:                                               ; preds = %54
  tail call void @acutest_abort_() #8
  unreachable

58:                                               ; preds = %54
  tail call void @destroyJoinRelation(ptr noundef nonnull %10) #7
  %59 = tail call ptr @memAlloc(i32 noundef 16, i32 noundef 1, i1 noundef zeroext false, ptr noundef null) #7
  store ptr %59, ptr %6, align 8, !tbaa !5
  store i32 2, ptr %59, align 8, !tbaa !16
  %60 = getelementptr inbounds i8, ptr %59, i64 4
  store i32 2, ptr %60, align 4, !tbaa !18
  %61 = tail call ptr @memAlloc(i32 noundef 4, i32 noundef 2, i1 noundef zeroext false, ptr noundef null) #7
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  store ptr %61, ptr %63, align 8, !tbaa !19
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load ptr, ptr %65, align 8, !tbaa !19
  store i32 2, ptr %66, align 4, !tbaa !20
  %67 = getelementptr inbounds i8, ptr %66, i64 4
  store i32 1, ptr %67, align 4, !tbaa !20
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = tail call ptr @buildJoinRelation(ptr noundef %68, ptr noundef %64, ptr noundef %4, i32 noundef 0) #7
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i32, ptr %70, align 8, !tbaa !9
  %72 = icmp eq i32 %71, 2
  %73 = zext i1 %72 to i32
  %74 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %73, ptr noundef nonnull @.str.38, i32 noundef 130, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.79)
  %.not57 = icmp eq i32 %74, 0
  br i1 %.not57, label %75, label %76

75:                                               ; preds = %58
  tail call void @acutest_abort_() #8
  unreachable

76:                                               ; preds = %58
  %77 = load ptr, ptr %69, align 8, !tbaa !12
  %78 = load i32, ptr %77, align 4, !tbaa !13
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %85

80:                                               ; preds = %76
  %81 = getelementptr inbounds i8, ptr %77, i64 4
  %82 = load i32, ptr %81, align 4, !tbaa !15
  %83 = icmp eq i32 %82, 30001
  %84 = zext i1 %83 to i32
  br label %85

85:                                               ; preds = %80, %76
  %86 = phi i32 [ 0, %76 ], [ %84, %80 ]
  %87 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %86, ptr noundef nonnull @.str.38, i32 noundef 131, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.80)
  %.not58 = icmp eq i32 %87, 0
  br i1 %.not58, label %88, label %89

88:                                               ; preds = %85
  tail call void @acutest_abort_() #8
  unreachable

89:                                               ; preds = %85
  %90 = load ptr, ptr %69, align 8, !tbaa !12
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  %92 = load i32, ptr %91, align 4, !tbaa !13
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %94, label %99

94:                                               ; preds = %89
  %95 = getelementptr inbounds i8, ptr %90, i64 12
  %96 = load i32, ptr %95, align 4, !tbaa !15
  %97 = icmp eq i32 %96, 44444
  %98 = zext i1 %97 to i32
  br label %99

99:                                               ; preds = %94, %89
  %100 = phi i32 [ 0, %89 ], [ %98, %94 ]
  %101 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %100, ptr noundef nonnull @.str.38, i32 noundef 132, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.77)
  %.not59 = icmp eq i32 %101, 0
  br i1 %.not59, label %102, label %103

102:                                              ; preds = %99
  tail call void @acutest_abort_() #8
  unreachable

103:                                              ; preds = %99
  tail call void @destroyJoinRelation(ptr noundef nonnull %69) #7
  %104 = tail call ptr @memAlloc(i32 noundef 16, i32 noundef 1, i1 noundef zeroext false, ptr noundef null) #7
  store ptr %104, ptr %7, align 8, !tbaa !5
  store i32 2, ptr %104, align 8, !tbaa !16
  %105 = getelementptr inbounds i8, ptr %104, i64 4
  store i32 2, ptr %105, align 4, !tbaa !18
  %106 = tail call ptr @memAlloc(i32 noundef 4, i32 noundef 2, i1 noundef zeroext false, ptr noundef null) #7
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 8
  store ptr %106, ptr %108, align 8, !tbaa !19
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 8
  %111 = load ptr, ptr %110, align 8, !tbaa !19
  store i32 0, ptr %111, align 4, !tbaa !20
  %112 = getelementptr inbounds i8, ptr %111, i64 4
  store i32 1, ptr %112, align 4, !tbaa !20
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = tail call ptr @buildJoinRelation(ptr noundef %109, ptr noundef %113, ptr noundef %4, i32 noundef 3) #7
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  %116 = load i32, ptr %115, align 8, !tbaa !9
  %117 = icmp eq i32 %116, 2
  %118 = zext i1 %117 to i32
  %119 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %118, ptr noundef nonnull @.str.38, i32 noundef 143, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.79)
  %.not60 = icmp eq i32 %119, 0
  br i1 %.not60, label %120, label %121

120:                                              ; preds = %103
  tail call void @acutest_abort_() #8
  unreachable

121:                                              ; preds = %103
  %122 = load ptr, ptr %114, align 8, !tbaa !12
  %123 = load i32, ptr %122, align 4, !tbaa !13
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %121
  %126 = getelementptr inbounds i8, ptr %122, i64 4
  %127 = load i32, ptr %126, align 4, !tbaa !15
  %128 = icmp eq i32 %127, 45
  %129 = zext i1 %128 to i32
  br label %130

130:                                              ; preds = %125, %121
  %131 = phi i32 [ 0, %121 ], [ %129, %125 ]
  %132 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %131, ptr noundef nonnull @.str.38, i32 noundef 144, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.81)
  %.not61 = icmp eq i32 %132, 0
  br i1 %.not61, label %133, label %134

133:                                              ; preds = %130
  tail call void @acutest_abort_() #8
  unreachable

134:                                              ; preds = %130
  %135 = load ptr, ptr %114, align 8, !tbaa !12
  %136 = getelementptr inbounds i8, ptr %135, i64 8
  %137 = load i32, ptr %136, align 4, !tbaa !13
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %139, label %144

139:                                              ; preds = %134
  %140 = getelementptr inbounds i8, ptr %135, i64 12
  %141 = load i32, ptr %140, align 4, !tbaa !15
  %142 = icmp eq i32 %141, 34
  %143 = zext i1 %142 to i32
  br label %144

144:                                              ; preds = %139, %134
  %145 = phi i32 [ 0, %134 ], [ %143, %139 ]
  %146 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %145, ptr noundef nonnull @.str.38, i32 noundef 145, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.82)
  %.not62 = icmp eq i32 %146, 0
  br i1 %.not62, label %147, label %148

147:                                              ; preds = %144
  tail call void @acutest_abort_() #8
  unreachable

148:                                              ; preds = %144
  tail call void @destroyJoinRelation(ptr noundef nonnull %114) #7
  tail call void @destroyInters(ptr noundef nonnull %6, i32 noundef 1) #7
  tail call void @destroyInters(ptr noundef nonnull %7, i32 noundef 1) #7
  %149 = getelementptr inbounds i8, ptr %4, i64 16
  %150 = load i64, ptr %149, align 8, !tbaa !21
  %.not64 = icmp eq i64 %150, 0
  br i1 %.not64, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %148
  %151 = load ptr, ptr %4, align 8, !tbaa !24
  tail call void @free(ptr noundef %151) #7
  tail call void @free(ptr noundef nonnull %4) #7
  ret void

.lr.ph:                                           ; preds = %148, %.lr.ph
  %.063 = phi i64 [ %155, %.lr.ph ], [ 0, %148 ]
  %152 = load ptr, ptr %4, align 8, !tbaa !24
  %153 = getelementptr inbounds ptr, ptr %152, i64 %.063
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  tail call void @free(ptr noundef %154) #7
  %155 = add nuw i64 %.063, 1
  %156 = load i64, ptr %149, align 8, !tbaa !21
  %157 = icmp ult i64 %155, %156
  br i1 %157, label %.lr.ph, label %._crit_edge, !llvm.loop !25
}

declare ptr @buildJoinRelation(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @destroyJoinRelation(ptr noundef) local_unnamed_addr #4

declare void @destroyInters(ptr noundef, i32 noundef) local_unnamed_addr #4

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 = { noreturn 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 = { 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 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"join_relation", !6, i64 0, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"tuple", !11, i64 0, !11, i64 4}
!15 = !{!14, !11, i64 4}
!16 = !{!17, !11, i64 0}
!17 = !{!"row_ids", !11, i64 0, !11, i64 4, !6, i64 8}
!18 = !{!17, !11, i64 4}
!19 = !{!17, !6, i64 8}
!20 = !{!11, !11, i64 0}
!21 = !{!22, !23, i64 16}
!22 = !{!"relation", !6, i64 0, !23, i64 8, !23, i64 16}
!23 = !{!"long", !7, i64 0}
!24 = !{!22, !6, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass