; 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.relation = type { ptr, i64, i64 }
%struct.join_relation = type { ptr, i32 }
%struct.tuple = type { i32, i32 }
%struct.row_ids = type { i32, i32, ptr }

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @buildJoinRelation(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.relation, ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = load i32, ptr %8, align 4, !tbaa !9
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds ptr, ptr %16, i64 %18
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %20, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %21 = call ptr @memAlloc(i32 noundef 16, i32 noundef 1, i1 noundef zeroext false, ptr noundef null)
  store ptr %21, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %26

24:                                               ; preds = %4
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  br label %28

26:                                               ; preds = %4
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %26, %24
  %29 = phi ptr [ %25, %24 ], [ %27, %26 ]
  store ptr %29, ptr %11, align 8, !tbaa !5
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %79

32:                                               ; preds = %28
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.relation, ptr %33, i32 0, i32 1
  %35 = load i64, ptr %34, align 8, !tbaa !14
  %36 = trunc i64 %35 to i32
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.join_relation, ptr %37, i32 0, i32 1
  store i32 %36, ptr %38, align 8, !tbaa !15
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.join_relation, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !15
  %42 = call ptr @memAlloc(i32 noundef 8, i32 noundef %41, i1 noundef zeroext false, ptr noundef null)
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.join_relation, ptr %43, i32 0, i32 0
  store ptr %42, ptr %44, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %75, %32
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.relation, ptr %47, i32 0, i32 1
  %49 = load i64, ptr %48, align 8, !tbaa !14
  %50 = trunc i64 %49 to i32
  %51 = icmp ult i32 %46, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %78

53:                                               ; preds = %45
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.join_relation, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds %struct.tuple, ptr %57, i64 %59
  %61 = getelementptr inbounds %struct.tuple, ptr %60, i32 0, i32 0
  store i32 %54, ptr %61, align 4, !tbaa !18
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds i64, ptr %62, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !20
  %67 = trunc i64 %66 to i32
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.join_relation, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds %struct.tuple, ptr %70, i64 %72
  %74 = getelementptr inbounds %struct.tuple, ptr %73, i32 0, i32 1
  store i32 %67, ptr %74, align 4, !tbaa !21
  br label %75

75:                                               ; preds = %53
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = add i32 %76, 1
  store i32 %77, ptr %12, align 4, !tbaa !9
  br label %45, !llvm.loop !22

78:                                               ; preds = %52
  br label %130

79:                                               ; preds = %28
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.row_ids, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !24
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.join_relation, ptr %83, i32 0, i32 1
  store i32 %82, ptr %84, align 8, !tbaa !15
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.join_relation, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 8, !tbaa !15
  %88 = call ptr @memAlloc(i32 noundef 8, i32 noundef %87, i1 noundef zeroext false, ptr noundef null)
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.join_relation, ptr %89, i32 0, i32 0
  store ptr %88, ptr %90, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %126, %79
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.row_ids, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !24
  %96 = icmp ult i32 %92, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %129

98:                                               ; preds = %91
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.join_relation, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !17
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds %struct.tuple, ptr %102, i64 %104
  %106 = getelementptr inbounds %struct.tuple, ptr %105, i32 0, i32 0
  store i32 %99, ptr %106, align 4, !tbaa !18
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.row_ids, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !26
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds i64, ptr %107, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !20
  %118 = trunc i64 %117 to i32
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.join_relation, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !17
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds %struct.tuple, ptr %121, i64 %123
  %125 = getelementptr inbounds %struct.tuple, ptr %124, i32 0, i32 1
  store i32 %118, ptr %125, align 4, !tbaa !21
  br label %126

126:                                              ; preds = %98
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = add i32 %127, 1
  store i32 %128, ptr %13, align 4, !tbaa !9
  br label %91, !llvm.loop !27

129:                                              ; preds = %97
  br label %130

130:                                              ; preds = %129, %78
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret ptr %131
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = !{!12, !6, i64 0}
!12 = !{!"relation", !6, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !10, i64 8}
!16 = !{!"join_relation", !6, i64 0, !10, i64 8}
!17 = !{!16, !6, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"tuple", !10, i64 0, !10, i64 4}
!20 = !{!13, !13, i64 0}
!21 = !{!19, !10, i64 4}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !10, i64 0}
!25 = !{!"row_ids", !10, i64 0, !10, i64 4, !6, i64 8}
!26 = !{!25, !6, i64 8}
!27 = distinct !{!27, !23}


; 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.tuple = type { i32, i32 }

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

; Function Attrs: nounwind uwtable
define dso_local ptr @buildJoinRelation(ptr noundef readonly %0, ptr noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = zext i32 %3 to i64
  %7 = getelementptr inbounds ptr, ptr %5, i64 %6
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = tail call ptr @memAlloc(i32 noundef 16, i32 noundef 1, i1 noundef zeroext false, ptr noundef null) #2
  %10 = icmp eq ptr %0, null
  %11 = select i1 %10, ptr %1, ptr %0
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %35

13:                                               ; preds = %4
  %14 = getelementptr inbounds i8, ptr %2, i64 8
  %15 = load i64, ptr %14, align 8, !tbaa !12
  %16 = trunc i64 %15 to i32
  %17 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %16, ptr %17, align 8, !tbaa !13
  %18 = tail call ptr @memAlloc(i32 noundef 8, i32 noundef %16, i1 noundef zeroext false, ptr noundef null) #2
  store ptr %18, ptr %9, align 8, !tbaa !16
  %19 = load i64, ptr %14, align 8, !tbaa !12
  %20 = and i64 %19, 4294967295
  %.not41 = icmp eq i64 %20, 0
  br i1 %.not41, label %.loopexit, label %.lr.ph40.preheader

.lr.ph40.preheader:                               ; preds = %13
  %wide.trip.count47 = and i64 %19, 4294967295
  %min.iters.check = icmp ult i64 %wide.trip.count47, 4
  br i1 %min.iters.check, label %.lr.ph40.preheader54, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph40.preheader
  %n.mod.vf = and i64 %19, 3
  %n.vec = sub nsw i64 %wide.trip.count47, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i32> [ <i32 0, i32 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <2 x i32> %vec.ind, <i32 2, i32 2>
  %21 = or disjoint i64 %index, 2
  %22 = getelementptr inbounds i64, ptr %8, i64 %index
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %wide.load = load <2 x i64>, ptr %22, align 8, !tbaa !17
  %wide.load52 = load <2 x i64>, ptr %23, align 8, !tbaa !17
  %24 = trunc <2 x i64> %wide.load to <2 x i32>
  %25 = trunc <2 x i64> %wide.load52 to <2 x i32>
  %26 = getelementptr inbounds %struct.tuple, ptr %18, i64 %index
  %27 = getelementptr inbounds %struct.tuple, ptr %18, i64 %21
  %interleaved.vec = shufflevector <2 x i32> %vec.ind, <2 x i32> %24, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x i32> %interleaved.vec, ptr %26, align 4, !tbaa !18
  %interleaved.vec53 = shufflevector <2 x i32> %step.add, <2 x i32> %25, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x i32> %interleaved.vec53, ptr %27, align 4, !tbaa !18
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i32> %vec.ind, <i32 4, i32 4>
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %.loopexit, label %.lr.ph40.preheader54

.lr.ph40.preheader54:                             ; preds = %middle.block, %.lr.ph40.preheader
  %indvars.iv44.ph = phi i64 [ 0, %.lr.ph40.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph40

.lr.ph40:                                         ; preds = %.lr.ph40.preheader54, %.lr.ph40
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %.lr.ph40 ], [ %indvars.iv44.ph, %.lr.ph40.preheader54 ]
  %29 = getelementptr inbounds %struct.tuple, ptr %18, i64 %indvars.iv44
  %30 = trunc nuw i64 %indvars.iv44 to i32
  store i32 %30, ptr %29, align 4, !tbaa !23
  %31 = getelementptr inbounds i64, ptr %8, i64 %indvars.iv44
  %32 = load i64, ptr %31, align 8, !tbaa !17
  %33 = trunc i64 %32 to i32
  %34 = getelementptr inbounds %struct.tuple, ptr %18, i64 %indvars.iv44, i32 1
  store i32 %33, ptr %34, align 4, !tbaa !25
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count47
  br i1 %exitcond48.not, label %.loopexit, label %.lr.ph40, !llvm.loop !26

35:                                               ; preds = %4
  %36 = load i32, ptr %11, align 8, !tbaa !27
  %37 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %36, ptr %37, align 8, !tbaa !13
  %38 = tail call ptr @memAlloc(i32 noundef 8, i32 noundef %36, i1 noundef zeroext false, ptr noundef null) #2
  store ptr %38, ptr %9, align 8, !tbaa !16
  %39 = load i32, ptr %11, align 8, !tbaa !27
  %.not = icmp eq i32 %39, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %35
  %40 = getelementptr inbounds i8, ptr %11, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !29
  %wide.trip.count = zext i32 %39 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %42 = icmp eq i32 %39, 1
  br i1 %42, label %.loopexit.loopexit55.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %43

43:                                               ; preds = %43, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %43 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %43 ]
  %44 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv
  %45 = trunc nuw i64 %indvars.iv to i32
  store i32 %45, ptr %44, align 4, !tbaa !23
  %46 = getelementptr inbounds i32, ptr %41, i64 %indvars.iv
  %47 = load i32, ptr %46, align 4, !tbaa !18
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds i64, ptr %8, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !17
  %51 = trunc i64 %50 to i32
  %52 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv, i32 1
  store i32 %51, ptr %52, align 4, !tbaa !25
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %53 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv.next
  %54 = trunc nuw i64 %indvars.iv.next to i32
  store i32 %54, ptr %53, align 4, !tbaa !23
  %55 = getelementptr inbounds i32, ptr %41, i64 %indvars.iv.next
  %56 = load i32, ptr %55, align 4, !tbaa !18
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i64, ptr %8, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !17
  %60 = trunc i64 %59 to i32
  %61 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv.next, i32 1
  store i32 %60, ptr %61, align 4, !tbaa !25
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit55.unr-lcssa, label %43, !llvm.loop !30

.loopexit.loopexit55.unr-lcssa:                   ; preds = %43, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %43 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit55.epilog-lcssa

.loopexit.loopexit55.epilog-lcssa:                ; preds = %.loopexit.loopexit55.unr-lcssa
  %62 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv.unr
  %63 = trunc nuw i64 %indvars.iv.unr to i32
  store i32 %63, ptr %62, align 4, !tbaa !23
  %64 = getelementptr inbounds i32, ptr %41, i64 %indvars.iv.unr
  %65 = load i32, ptr %64, align 4, !tbaa !18
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i64, ptr %8, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !17
  %69 = trunc i64 %68 to i32
  %70 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv.unr, i32 1
  store i32 %69, ptr %70, align 4, !tbaa !25
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit55.epilog-lcssa, %.loopexit.loopexit55.unr-lcssa, %.lr.ph40, %middle.block, %35, %13
  ret ptr %9
}

attributes #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 = { 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 = { 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, !7, i64 0}
!6 = !{!"relation", !7, i64 0, !10, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !15, i64 8}
!14 = !{!"join_relation", !7, i64 0, !15, i64 8}
!15 = !{!"int", !8, i64 0}
!16 = !{!14, !7, i64 0}
!17 = !{!10, !10, i64 0}
!18 = !{!15, !15, i64 0}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = !{!24, !15, i64 0}
!24 = !{!"tuple", !15, i64 0, !15, i64 4}
!25 = !{!24, !15, i64 4}
!26 = distinct !{!26, !20, !22, !21}
!27 = !{!28, !15, i64 0}
!28 = !{!"row_ids", !15, i64 0, !15, i64 4, !7, i64 8}
!29 = !{!28, !7, i64 8}
!30 = distinct !{!30, !20}


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