; LLVM IR from themisvaltinos/Partitioned-Hash-Join :: modules/query (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.query = type { i32, i32, i32, i32, [16 x %struct.join_predicate], [16 x %struct.filter_predicate], [16 x %struct.column] }
%struct.join_predicate = type { %struct.column, %struct.column }
%struct.column = type { i32, i32, i32 }
%struct.filter_predicate = type { %struct.column, i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@__PRETTY_FUNCTION__.parseQuery = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @parseQuery(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [14 x i32], align 16
  %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 i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %12 = call ptr @memAlloc(i32 noundef 912, i32 noundef 1, i1 noundef zeroext true, ptr noundef null)
  store ptr %12, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #4
  br label %13

13:                                               ; preds = %24, %1
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = add i32 %15, 1
  store i32 %16, ptr %4, align 4, !tbaa !9
  %17 = zext i32 %15 to i64
  %18 = getelementptr inbounds [14 x i32], ptr %5, i64 0, i64 %17
  %19 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %14, ptr noundef @.str, ptr noundef %18)
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %22

21:                                               ; preds = %13
  br label %23

22:                                               ; preds = %13
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 31, ptr noundef @__PRETTY_FUNCTION__.parseQuery) #5
  unreachable

23:                                               ; preds = %21
  br label %24

24:                                               ; preds = %23
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = call i32 @fgetc(ptr noundef %25)
  %27 = icmp ne i32 %26, 124
  br i1 %27, label %13, label %28, !llvm.loop !11

28:                                               ; preds = %24
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.query, ptr %30, i32 0, i32 0
  store i32 %29, ptr %31, align 4, !tbaa !13
  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 4, ptr %11) #4
  br label %32

32:                                               ; preds = %175, %28
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %33, ptr noundef @.str.3, ptr noundef %7, ptr noundef %8)
  %35 = icmp eq i32 %34, 2
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  br label %38

37:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 41, ptr noundef @__PRETTY_FUNCTION__.parseQuery) #5
  unreachable

38:                                               ; preds = %36
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = call i32 @fgetc(ptr noundef %39)
  store i32 %40, ptr %6, align 4, !tbaa !9
  switch i32 %40, label %67 [
    i32 62, label %41
    i32 60, label %41
  ]

41:                                               ; preds = %38, %38
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %42, ptr noundef @.str, ptr noundef %11)
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  br label %47

46:                                               ; preds = %41
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 46, ptr noundef @__PRETTY_FUNCTION__.parseQuery) #5
  unreachable

47:                                               ; preds = %45
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.query, ptr %48, i32 0, i32 5
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.query, ptr %50, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = add i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !15
  %54 = zext i32 %52 to i64
  %55 = getelementptr inbounds [16 x %struct.filter_predicate], ptr %49, i64 0, i64 %54
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds [14 x i32], ptr %5, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 62
  %65 = zext i1 %64 to i64
  %66 = select i1 %64, i32 1, i32 0
  call void @setFilter(ptr noundef %55, i32 noundef %59, i32 noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %66)
  br label %174

67:                                               ; preds = %38
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %68, ptr noundef @.str, ptr noundef %9)
  %70 = icmp eq i32 %69, 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  br label %73

72:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 51, ptr noundef @__PRETTY_FUNCTION__.parseQuery) #5
  unreachable

73:                                               ; preds = %71
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = call i32 @fgetc(ptr noundef %74)
  store i32 %75, ptr %6, align 4, !tbaa !9
  %76 = icmp eq i32 %75, 46
  br i1 %76, label %77, label %154

77:                                               ; preds = %73
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %78, ptr noundef @.str, ptr noundef %10)
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %82

81:                                               ; preds = %77
  br label %83

82:                                               ; preds = %77
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 53, ptr noundef @__PRETTY_FUNCTION__.parseQuery) #5
  unreachable

83:                                               ; preds = %81
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds [14 x i32], ptr %5, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.query, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.query, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !16
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds [16 x %struct.join_predicate], ptr %89, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.join_predicate, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds %struct.column, ptr %95, i32 0, i32 0
  store i32 %87, ptr %96, align 4, !tbaa !17
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.query, ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.query, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !16
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds [16 x %struct.join_predicate], ptr %99, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.join_predicate, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds %struct.column, ptr %105, i32 0, i32 1
  store i32 %97, ptr %106, align 4, !tbaa !20
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.query, ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.query, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !16
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds [16 x %struct.join_predicate], ptr %109, i64 0, i64 %113
  %115 = getelementptr inbounds %struct.join_predicate, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %struct.column, ptr %115, i32 0, i32 2
  store i32 %107, ptr %116, align 4, !tbaa !21
  %117 = load i32, ptr %9, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [14 x i32], ptr %5, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.query, ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.query, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !16
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds [16 x %struct.join_predicate], ptr %122, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.join_predicate, ptr %127, i32 0, i32 1
  %129 = getelementptr inbounds %struct.column, ptr %128, i32 0, i32 0
  store i32 %120, ptr %129, align 4, !tbaa !22
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.query, ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.query, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !16
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds [16 x %struct.join_predicate], ptr %132, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.join_predicate, ptr %137, i32 0, i32 1
  %139 = getelementptr inbounds %struct.column, ptr %138, i32 0, i32 1
  store i32 %130, ptr %139, align 4, !tbaa !23
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.query, ptr %141, i32 0, i32 4
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.query, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !16
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds [16 x %struct.join_predicate], ptr %142, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.join_predicate, ptr %147, i32 0, i32 1
  %149 = getelementptr inbounds %struct.column, ptr %148, i32 0, i32 2
  store i32 %140, ptr %149, align 4, !tbaa !24
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.query, ptr %150, i32 0, i32 1
  %152 = load i32, ptr %151, align 4, !tbaa !16
  %153 = add i32 %152, 1
  store i32 %153, ptr %151, align 4, !tbaa !16
  br label %173

154:                                              ; preds = %73
  %155 = load i32, ptr %6, align 4, !tbaa !9
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = call i32 @ungetc(i32 noundef %155, ptr noundef %156)
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.query, ptr %158, i32 0, i32 5
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.query, ptr %160, i32 0, i32 2
  %162 = load i32, ptr %161, align 4, !tbaa !15
  %163 = add i32 %162, 1
  store i32 %163, ptr %161, align 4, !tbaa !15
  %164 = zext i32 %162 to i64
  %165 = getelementptr inbounds [16 x %struct.filter_predicate], ptr %159, i64 0, i64 %164
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds [14 x i32], ptr %5, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !9
  %170 = load i32, ptr %7, align 4, !tbaa !9
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %172, ptr %11, align 4, !tbaa !9
  call void @setFilter(ptr noundef %165, i32 noundef %169, i32 noundef %170, i32 noundef %171, i32 noundef %172, i32 noundef 2)
  br label %173

173:                                              ; preds = %154, %83
  br label %174

174:                                              ; preds = %173, %47
  br label %175

175:                                              ; preds = %174
  %176 = load ptr, ptr %2, align 8, !tbaa !5
  %177 = call i32 @fgetc(ptr noundef %176)
  %178 = icmp ne i32 %177, 124
  br i1 %178, label %32, label %179, !llvm.loop !25

179:                                              ; preds = %175
  br label %180

180:                                              ; preds = %221, %179
  %181 = load ptr, ptr %2, align 8, !tbaa !5
  %182 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %181, ptr noundef @.str.3, ptr noundef %7, ptr noundef %8)
  %183 = icmp eq i32 %182, 2
  br i1 %183, label %184, label %185

184:                                              ; preds = %180
  br label %186

185:                                              ; preds = %180
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 71, ptr noundef @__PRETTY_FUNCTION__.parseQuery) #5
  unreachable

186:                                              ; preds = %184
  %187 = load i32, ptr %7, align 4, !tbaa !9
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds [14 x i32], ptr %5, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !9
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.query, ptr %191, i32 0, i32 6
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.query, ptr %193, i32 0, i32 3
  %195 = load i32, ptr %194, align 4, !tbaa !26
  %196 = zext i32 %195 to i64
  %197 = getelementptr inbounds [16 x %struct.column], ptr %192, i64 0, i64 %196
  %198 = getelementptr inbounds %struct.column, ptr %197, i32 0, i32 0
  store i32 %190, ptr %198, align 4, !tbaa !27
  %199 = load i32, ptr %8, align 4, !tbaa !9
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.query, ptr %200, i32 0, i32 6
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.query, ptr %202, i32 0, i32 3
  %204 = load i32, ptr %203, align 4, !tbaa !26
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds [16 x %struct.column], ptr %201, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.column, ptr %206, i32 0, i32 2
  store i32 %199, ptr %207, align 4, !tbaa !28
  %208 = load i32, ptr %7, align 4, !tbaa !9
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.query, ptr %209, i32 0, i32 6
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.query, ptr %211, i32 0, i32 3
  %213 = load i32, ptr %212, align 4, !tbaa !26
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds [16 x %struct.column], ptr %210, i64 0, i64 %214
  %216 = getelementptr inbounds %struct.column, ptr %215, i32 0, i32 1
  store i32 %208, ptr %216, align 4, !tbaa !29
  %217 = load ptr, ptr %3, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.query, ptr %217, i32 0, i32 3
  %219 = load i32, ptr %218, align 4, !tbaa !26
  %220 = add i32 %219, 1
  store i32 %220, ptr %218, align 4, !tbaa !26
  br label %221

221:                                              ; preds = %186
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = call i32 @fgetc(ptr noundef %222)
  %224 = icmp ne i32 %223, 10
  br i1 %224, label %180, label %225, !llvm.loop !30

225:                                              ; preds = %221
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, 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 56, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret ptr %226
}

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

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

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

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

declare i32 @fgetc(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @setFilter(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare i32 @ungetc(i32 noundef, 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 = { 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 = { 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 = !{!14, !10, i64 0}
!14 = !{!"query", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 400, !7, i64 720}
!15 = !{!14, !10, i64 8}
!16 = !{!14, !10, i64 4}
!17 = !{!18, !10, i64 0}
!18 = !{!"join_predicate", !19, i64 0, !19, i64 12}
!19 = !{!"column", !10, i64 0, !10, i64 4, !10, i64 8}
!20 = !{!18, !10, i64 4}
!21 = !{!18, !10, i64 8}
!22 = !{!18, !10, i64 12}
!23 = !{!18, !10, i64 16}
!24 = !{!18, !10, i64 20}
!25 = distinct !{!25, !12}
!26 = !{!14, !10, i64 12}
!27 = !{!19, !10, i64 0}
!28 = !{!19, !10, i64 8}
!29 = !{!19, !10, i64 4}
!30 = distinct !{!30, !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"

%struct.filter_predicate = type { %struct.column, i32, i32 }
%struct.column = type { i32, i32, i32 }
%struct.join_predicate = type { %struct.column, %struct.column }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@__PRETTY_FUNCTION__.parseQuery = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @parseQuery(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [14 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = tail call ptr @memAlloc(i32 noundef 912, i32 noundef 1, i1 noundef zeroext true, ptr noundef null) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #5
  br label %9

9:                                                ; preds = %15, %1
  %.0 = phi i32 [ 0, %1 ], [ %16, %15 ]
  %10 = zext i32 %.0 to i64
  %11 = getelementptr inbounds [14 x i32], ptr %2, i64 0, i64 %10
  %12 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %11) #5
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 31, ptr noundef nonnull @__PRETTY_FUNCTION__.parseQuery) #6
  unreachable

15:                                               ; preds = %9
  %16 = add i32 %.0, 1
  %17 = call i32 @fgetc(ptr noundef %0)
  %.not = icmp eq i32 %17, 124
  br i1 %.not, label %18, label %9, !llvm.loop !5

18:                                               ; preds = %15
  store i32 %16, ptr %8, align 4, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %19 = getelementptr inbounds i8, ptr %8, i64 400
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  %21 = getelementptr inbounds i8, ptr %8, i64 16
  %22 = getelementptr inbounds i8, ptr %8, i64 4
  br label %23

23:                                               ; preds = %89, %18
  %24 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str.3, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %25 = icmp eq i32 %24, 2
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 41, ptr noundef nonnull @__PRETTY_FUNCTION__.parseQuery) #6
  unreachable

27:                                               ; preds = %23
  %28 = call i32 @fgetc(ptr noundef %0)
  switch i32 %28, label %46 [
    i32 62, label %29
    i32 60, label %29
  ]

29:                                               ; preds = %27, %27
  %30 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %7) #5
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, i32 noundef 46, ptr noundef nonnull @__PRETTY_FUNCTION__.parseQuery) #6
  unreachable

33:                                               ; preds = %29
  %34 = load i32, ptr %20, align 4, !tbaa !12
  %35 = add i32 %34, 1
  store i32 %35, ptr %20, align 4, !tbaa !12
  %36 = zext i32 %34 to i64
  %37 = getelementptr inbounds [16 x %struct.filter_predicate], ptr %19, i64 0, i64 %36
  %38 = load i32, ptr %3, align 4, !tbaa !13
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds [14 x i32], ptr %2, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !13
  %42 = load i32, ptr %4, align 4, !tbaa !13
  %43 = load i32, ptr %7, align 4, !tbaa !13
  %44 = icmp eq i32 %28, 62
  %45 = zext i1 %44 to i32
  call void @setFilter(ptr noundef nonnull %37, i32 noundef %41, i32 noundef %38, i32 noundef %42, i32 noundef %43, i32 noundef %45)
  br label %89

46:                                               ; preds = %27
  %47 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %5) #5
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 51, ptr noundef nonnull @__PRETTY_FUNCTION__.parseQuery) #6
  unreachable

50:                                               ; preds = %46
  %51 = call i32 @fgetc(ptr noundef %0)
  %52 = icmp eq i32 %51, 46
  br i1 %52, label %53, label %77

53:                                               ; preds = %50
  %54 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %6) #5
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 53, ptr noundef nonnull @__PRETTY_FUNCTION__.parseQuery) #6
  unreachable

57:                                               ; preds = %53
  %58 = load i32, ptr %3, align 4, !tbaa !13
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds [14 x i32], ptr %2, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !13
  %62 = load i32, ptr %22, align 4, !tbaa !14
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds [16 x %struct.join_predicate], ptr %21, i64 0, i64 %63
  store i32 %61, ptr %64, align 4, !tbaa !15
  %65 = getelementptr inbounds [16 x %struct.join_predicate], ptr %21, i64 0, i64 %63, i32 0, i32 1
  store i32 %58, ptr %65, align 4, !tbaa !18
  %66 = load i32, ptr %4, align 4, !tbaa !13
  %67 = getelementptr inbounds [16 x %struct.join_predicate], ptr %21, i64 0, i64 %63, i32 0, i32 2
  store i32 %66, ptr %67, align 4, !tbaa !19
  %68 = load i32, ptr %5, align 4, !tbaa !13
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds [14 x i32], ptr %2, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = getelementptr inbounds [16 x %struct.join_predicate], ptr %21, i64 0, i64 %63, i32 1
  store i32 %71, ptr %72, align 4, !tbaa !20
  %73 = getelementptr inbounds [16 x %struct.join_predicate], ptr %21, i64 0, i64 %63, i32 1, i32 1
  store i32 %68, ptr %73, align 4, !tbaa !21
  %74 = load i32, ptr %6, align 4, !tbaa !13
  %75 = getelementptr inbounds [16 x %struct.join_predicate], ptr %21, i64 0, i64 %63, i32 1, i32 2
  store i32 %74, ptr %75, align 4, !tbaa !22
  %76 = add i32 %62, 1
  store i32 %76, ptr %22, align 4, !tbaa !14
  br label %89

77:                                               ; preds = %50
  %78 = call i32 @ungetc(i32 noundef %51, ptr noundef %0)
  %79 = load i32, ptr %20, align 4, !tbaa !12
  %80 = add i32 %79, 1
  store i32 %80, ptr %20, align 4, !tbaa !12
  %81 = zext i32 %79 to i64
  %82 = getelementptr inbounds [16 x %struct.filter_predicate], ptr %19, i64 0, i64 %81
  %83 = load i32, ptr %3, align 4, !tbaa !13
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds [14 x i32], ptr %2, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !13
  %87 = load i32, ptr %4, align 4, !tbaa !13
  %88 = load i32, ptr %5, align 4, !tbaa !13
  store i32 %88, ptr %7, align 4, !tbaa !13
  call void @setFilter(ptr noundef nonnull %82, i32 noundef %86, i32 noundef %83, i32 noundef %87, i32 noundef %88, i32 noundef 2)
  br label %89

89:                                               ; preds = %33, %77, %57
  %90 = call i32 @fgetc(ptr noundef %0)
  %.not42 = icmp eq i32 %90, 124
  br i1 %.not42, label %.preheader, label %23, !llvm.loop !23

.preheader:                                       ; preds = %89
  %91 = getelementptr inbounds i8, ptr %8, i64 720
  %92 = getelementptr inbounds i8, ptr %8, i64 12
  br label %93

93:                                               ; preds = %.preheader, %97
  %94 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str.3, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %95 = icmp eq i32 %94, 2
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 71, ptr noundef nonnull @__PRETTY_FUNCTION__.parseQuery) #6
  unreachable

97:                                               ; preds = %93
  %98 = load i32, ptr %3, align 4, !tbaa !13
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds [14 x i32], ptr %2, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !13
  %102 = load i32, ptr %92, align 4, !tbaa !24
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds [16 x %struct.column], ptr %91, i64 0, i64 %103
  store i32 %101, ptr %104, align 4, !tbaa !25
  %105 = load i32, ptr %4, align 4, !tbaa !13
  %106 = getelementptr inbounds [16 x %struct.column], ptr %91, i64 0, i64 %103, i32 2
  store i32 %105, ptr %106, align 4, !tbaa !26
  %107 = getelementptr inbounds [16 x %struct.column], ptr %91, i64 0, i64 %103, i32 1
  store i32 %98, ptr %107, align 4, !tbaa !27
  %108 = add i32 %102, 1
  store i32 %108, ptr %92, align 4, !tbaa !24
  %109 = call i32 @fgetc(ptr noundef %0)
  %.not43 = icmp eq i32 %109, 10
  br i1 %.not43, label %110, label %93, !llvm.loop !28

110:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  ret ptr %8
}

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

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) 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: nofree nounwind
declare noundef i32 @fgetc(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @setFilter(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @ungetc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress 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 = { mustprogress 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 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!8, !9, i64 0}
!8 = !{!"query", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !10, i64 400, !10, i64 720}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!8, !9, i64 8}
!13 = !{!9, !9, i64 0}
!14 = !{!8, !9, i64 4}
!15 = !{!16, !9, i64 0}
!16 = !{!"join_predicate", !17, i64 0, !17, i64 12}
!17 = !{!"column", !9, i64 0, !9, i64 4, !9, i64 8}
!18 = !{!16, !9, i64 4}
!19 = !{!16, !9, i64 8}
!20 = !{!16, !9, i64 12}
!21 = !{!16, !9, i64 16}
!22 = !{!16, !9, i64 20}
!23 = distinct !{!23, !6}
!24 = !{!8, !9, i64 12}
!25 = !{!17, !9, i64 0}
!26 = !{!17, !9, i64 8}
!27 = !{!17, !9, i64 4}
!28 = distinct !{!28, !6}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass