; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/数据结构/四分树.ll (Z5queryiiiii)

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

@tot = external dso_local global i32, align 4
@mn = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@t = external dso_local global [4840000 x %struct.area], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8maintaini(i32 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: mustprogress nounwind uwtable
declare dso_local void @_Z8pushdowni(i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5queryiiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #0 {
  %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
  %12 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !5
  %13 = load i32, ptr %7, align 4, !tbaa !5
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %15
  %17 = getelementptr inbounds %struct.area, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = icmp sle i32 %13, %18
  br i1 %19, label %20, label %64

20:                                               ; preds = %5
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %23
  %25 = getelementptr inbounds %struct.area, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = icmp sge i32 %21, %26
  br i1 %27, label %28, label %64

28:                                               ; preds = %20
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %31
  %33 = getelementptr inbounds %struct.area, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !12
  %35 = icmp sle i32 %29, %34
  br i1 %35, label %36, label %64

36:                                               ; preds = %28
  %37 = load i32, ptr %10, align 4, !tbaa !5
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.area, ptr %40, i32 0, i32 3
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = icmp sge i32 %37, %42
  br i1 %43, label %44, label %64

44:                                               ; preds = %36
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.area, ptr %47, i32 0, i32 8
  %49 = load i32, ptr %48, align 4, !tbaa !14
  %50 = load i32, ptr @tot, align 4, !tbaa !5
  %51 = add nsw i32 %50, %49
  store i32 %51, ptr @tot, align 4, !tbaa !5
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.area, ptr %54, i32 0, i32 9
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mn, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %57 = load i32, ptr %56, align 4, !tbaa !5
  store i32 %57, ptr @mn, align 4, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %59
  %61 = getelementptr inbounds %struct.area, ptr %60, i32 0, i32 10
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %61)
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr @mx, align 4, !tbaa !5
  br label %214

64:                                               ; preds = %36, %28, %20, %5
  %65 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z8pushdowni(i32 noundef %65)
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %67
  %69 = getelementptr inbounds %struct.area, ptr %68, i32 0, i32 4
  %70 = load i32, ptr %69, align 4, !tbaa !15
  call void @_Z8maintaini(i32 noundef %70)
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %72
  %74 = getelementptr inbounds %struct.area, ptr %73, i32 0, i32 5
  %75 = load i32, ptr %74, align 4, !tbaa !16
  call void @_Z8maintaini(i32 noundef %75)
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %77
  %79 = getelementptr inbounds %struct.area, ptr %78, i32 0, i32 6
  %80 = load i32, ptr %79, align 4, !tbaa !17
  call void @_Z8maintaini(i32 noundef %80)
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.area, ptr %83, i32 0, i32 7
  %85 = load i32, ptr %84, align 4, !tbaa !18
  call void @_Z8maintaini(i32 noundef %85)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.area, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.area, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !11
  %96 = add nsw i32 %90, %95
  %97 = ashr i32 %96, 1
  store i32 %97, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.area, ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !12
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %104
  %106 = getelementptr inbounds %struct.area, ptr %105, i32 0, i32 3
  %107 = load i32, ptr %106, align 4, !tbaa !13
  %108 = add nsw i32 %102, %107
  %109 = ashr i32 %108, 1
  store i32 %109, ptr %12, align 4, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = icmp sle i32 %110, %111
  br i1 %112, label %113, label %127

113:                                              ; preds = %64
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = icmp sle i32 %114, %115
  br i1 %116, label %117, label %127

117:                                              ; preds = %113
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.area, ptr %120, i32 0, i32 4
  %122 = load i32, ptr %121, align 4, !tbaa !15
  %123 = load i32, ptr %7, align 4, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z5queryiiiii(i32 noundef %122, i32 noundef %123, i32 noundef %124, i32 noundef %125, i32 noundef %126)
  br label %127

127:                                              ; preds = %117, %113, %64
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = load i32, ptr %11, align 4, !tbaa !5
  %130 = icmp sle i32 %128, %129
  br i1 %130, label %131, label %153

131:                                              ; preds = %127
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = load i32, ptr %10, align 4, !tbaa !5
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %135, label %153

135:                                              ; preds = %131
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.area, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 4, !tbaa !13
  %142 = icmp slt i32 %136, %141
  br i1 %142, label %143, label %153

143:                                              ; preds = %135
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %145
  %147 = getelementptr inbounds %struct.area, ptr %146, i32 0, i32 5
  %148 = load i32, ptr %147, align 4, !tbaa !16
  %149 = load i32, ptr %7, align 4, !tbaa !5
  %150 = load i32, ptr %8, align 4, !tbaa !5
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z5queryiiiii(i32 noundef %148, i32 noundef %149, i32 noundef %150, i32 noundef %151, i32 noundef %152)
  br label %153

153:                                              ; preds = %143, %135, %131, %127
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = load i32, ptr %8, align 4, !tbaa !5
  %156 = icmp slt i32 %154, %155
  br i1 %156, label %157, label %179

157:                                              ; preds = %153
  %158 = load i32, ptr %9, align 4, !tbaa !5
  %159 = load i32, ptr %12, align 4, !tbaa !5
  %160 = icmp sle i32 %158, %159
  br i1 %160, label %161, label %179

161:                                              ; preds = %157
  %162 = load i32, ptr %11, align 4, !tbaa !5
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %164
  %166 = getelementptr inbounds %struct.area, ptr %165, i32 0, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = icmp slt i32 %162, %167
  br i1 %168, label %169, label %179

169:                                              ; preds = %161
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %171
  %173 = getelementptr inbounds %struct.area, ptr %172, i32 0, i32 6
  %174 = load i32, ptr %173, align 4, !tbaa !17
  %175 = load i32, ptr %7, align 4, !tbaa !5
  %176 = load i32, ptr %8, align 4, !tbaa !5
  %177 = load i32, ptr %9, align 4, !tbaa !5
  %178 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z5queryiiiii(i32 noundef %174, i32 noundef %175, i32 noundef %176, i32 noundef %177, i32 noundef %178)
  br label %179

179:                                              ; preds = %169, %161, %157, %153
  %180 = load i32, ptr %11, align 4, !tbaa !5
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = icmp slt i32 %180, %181
  br i1 %182, label %183, label %213

183:                                              ; preds = %179
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = load i32, ptr %10, align 4, !tbaa !5
  %186 = icmp slt i32 %184, %185
  br i1 %186, label %187, label %213

187:                                              ; preds = %183
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %189 = load i32, ptr %6, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %190
  %192 = getelementptr inbounds %struct.area, ptr %191, i32 0, i32 1
  %193 = load i32, ptr %192, align 4, !tbaa !11
  %194 = icmp slt i32 %188, %193
  br i1 %194, label %195, label %213

195:                                              ; preds = %187
  %196 = load i32, ptr %12, align 4, !tbaa !5
  %197 = load i32, ptr %6, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %198
  %200 = getelementptr inbounds %struct.area, ptr %199, i32 0, i32 3
  %201 = load i32, ptr %200, align 4, !tbaa !13
  %202 = icmp slt i32 %196, %201
  br i1 %202, label %203, label %213

203:                                              ; preds = %195
  %204 = load i32, ptr %6, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.area, ptr %206, i32 0, i32 7
  %208 = load i32, ptr %207, align 4, !tbaa !18
  %209 = load i32, ptr %7, align 4, !tbaa !5
  %210 = load i32, ptr %8, align 4, !tbaa !5
  %211 = load i32, ptr %9, align 4, !tbaa !5
  %212 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z5queryiiiii(i32 noundef %208, i32 noundef %209, i32 noundef %210, i32 noundef %211, i32 noundef %212)
  br label %213

213:                                              ; preds = %203, %195, %187, %183, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %214

214:                                              ; preds = %213, %44
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4area", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 12}
!14 = !{!10, !6, i64 32}
!15 = !{!10, !6, i64 16}
!16 = !{!10, !6, i64 20}
!17 = !{!10, !6, i64 24}
!18 = !{!10, !6, i64 28}


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

@tot = external dso_local local_unnamed_addr global i32, align 4
@mn = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@t = external dso_local global [4840000 x %struct.area], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8maintaini(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8pushdowni(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5queryiiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  br label %tailrecurse

tailrecurse:                                      ; preds = %72, %5
  %.tr = phi i32 [ %0, %5 ], [ %73, %72 ]
  %6 = sext i32 %.tr to i64
  %7 = getelementptr inbounds [4840000 x %struct.area], ptr @t, i64 0, i64 %6
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %.not = icmp slt i32 %8, %1
  br i1 %.not, label %29, label %9

9:                                                ; preds = %tailrecurse
  %10 = getelementptr inbounds i8, ptr %7, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !10
  %.not74 = icmp sgt i32 %11, %2
  br i1 %.not74, label %29, label %12

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %7, i64 8
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %.not75 = icmp slt i32 %14, %3
  br i1 %.not75, label %29, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %7, i64 12
  %17 = load i32, ptr %16, align 4, !tbaa !12
  %.not76 = icmp sgt i32 %17, %4
  br i1 %.not76, label %29, label %18

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %7, i64 32
  %20 = load i32, ptr %19, align 4, !tbaa !13
  %21 = load i32, ptr @tot, align 4, !tbaa !14
  %22 = add nsw i32 %21, %20
  store i32 %22, ptr @tot, align 4, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %7, i64 36
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mn, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = load i32, ptr %24, align 4, !tbaa !14
  store i32 %25, ptr @mn, align 4, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %7, i64 40
  %27 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %28 = load i32, ptr %27, align 4, !tbaa !14
  store i32 %28, ptr @mx, align 4, !tbaa !14
  br label %.loopexit

29:                                               ; preds = %15, %12, %9, %tailrecurse
  tail call void @_Z8pushdowni(i32 noundef %.tr)
  %30 = getelementptr inbounds i8, ptr %7, i64 16
  %31 = load i32, ptr %30, align 4, !tbaa !15
  tail call void @_Z8maintaini(i32 noundef %31)
  %32 = getelementptr inbounds i8, ptr %7, i64 20
  %33 = load i32, ptr %32, align 4, !tbaa !16
  tail call void @_Z8maintaini(i32 noundef %33)
  %34 = getelementptr inbounds i8, ptr %7, i64 24
  %35 = load i32, ptr %34, align 4, !tbaa !17
  tail call void @_Z8maintaini(i32 noundef %35)
  %36 = getelementptr inbounds i8, ptr %7, i64 28
  %37 = load i32, ptr %36, align 4, !tbaa !18
  tail call void @_Z8maintaini(i32 noundef %37)
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %7, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !10
  %41 = add nsw i32 %40, %38
  %42 = ashr i32 %41, 1
  %43 = getelementptr inbounds i8, ptr %7, i64 8
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %7, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !12
  %47 = add nsw i32 %46, %44
  %48 = ashr i32 %47, 1
  %.not77 = icmp slt i32 %42, %1
  %.not78 = icmp slt i32 %48, %3
  %or.cond = select i1 %.not77, i1 true, i1 %.not78
  br i1 %or.cond, label %51, label %49

49:                                               ; preds = %29
  %50 = load i32, ptr %30, align 4, !tbaa !15
  tail call void @_Z5queryiiiii(i32 noundef %50, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  br label %51

51:                                               ; preds = %49, %29
  %.not77.not = xor i1 %.not77, true
  %52 = icmp slt i32 %48, %4
  %or.cond80 = select i1 %.not77.not, i1 %52, i1 false
  br i1 %or.cond80, label %53, label %58

53:                                               ; preds = %51
  %54 = load i32, ptr %45, align 4, !tbaa !12
  %55 = icmp slt i32 %48, %54
  br i1 %55, label %56, label %58

56:                                               ; preds = %53
  %57 = load i32, ptr %32, align 4, !tbaa !16
  tail call void @_Z5queryiiiii(i32 noundef %57, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  br label %58

58:                                               ; preds = %56, %53, %51
  %59 = icmp slt i32 %42, %2
  %.not81 = xor i1 %59, true
  %or.cond82 = select i1 %.not81, i1 true, i1 %.not78
  br i1 %or.cond82, label %65, label %60

60:                                               ; preds = %58
  %61 = load i32, ptr %39, align 4, !tbaa !10
  %62 = icmp slt i32 %42, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %60
  %64 = load i32, ptr %34, align 4, !tbaa !17
  tail call void @_Z5queryiiiii(i32 noundef %64, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  br label %65

65:                                               ; preds = %63, %60, %58
  %or.cond83 = select i1 %59, i1 %52, i1 false
  br i1 %or.cond83, label %66, label %.loopexit

66:                                               ; preds = %65
  %67 = load i32, ptr %39, align 4, !tbaa !10
  %68 = icmp slt i32 %42, %67
  br i1 %68, label %69, label %.loopexit

69:                                               ; preds = %66
  %70 = load i32, ptr %45, align 4, !tbaa !12
  %71 = icmp slt i32 %48, %70
  br i1 %71, label %72, label %.loopexit

72:                                               ; preds = %69
  %73 = load i32, ptr %36, align 4, !tbaa !18
  br label %tailrecurse

.loopexit:                                        ; preds = %65, %66, %69, %18
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

attributes #0 = { mustprogress 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 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 = { inlinehint mustprogress 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" }

!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 = !{!"_ZTS4area", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !7, i64 32}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !7, i64 16}
!16 = !{!6, !7, i64 20}
!17 = !{!6, !7, i64 24}
!18 = !{!6, !7, i64 28}


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