; LLVM IR from cselab/aphros :: src/inside (main)

; 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.Inside = type { i32, ptr, ptr, ptr, %struct.anon }
%struct.anon = type { [2 x double], double, ptr, ptr, ptr, i32, i32 }

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @bbox_inside(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local double @bbox_zhi(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @predicate_ray(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden double @max_dbl(double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @inside_inside(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca [3 x double], align 16
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #2
  store double 1.000000e-10, ptr %13, align 8, !tbaa !9
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.Inside, ptr %31, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  store ptr %33, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Inside, ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  store ptr %36, ptr %11, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Inside, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  store ptr %39, ptr %29, align 8, !tbaa !5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Inside, ptr %40, i32 0, i32 4
  %42 = getelementptr inbounds %struct.anon, ptr %41, i32 0, i32 5
  %43 = load i32, ptr %42, align 8, !tbaa !17
  store i32 %43, ptr %26, align 4, !tbaa !18
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Inside, ptr %44, i32 0, i32 4
  %46 = getelementptr inbounds %struct.anon, ptr %45, i32 0, i32 6
  %47 = load i32, ptr %46, align 4, !tbaa !19
  store i32 %47, ptr %27, align 4, !tbaa !18
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.Inside, ptr %48, i32 0, i32 4
  %50 = getelementptr inbounds %struct.anon, ptr %49, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  store ptr %51, ptr %16, align 8, !tbaa !5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Inside, ptr %52, i32 0, i32 4
  %54 = getelementptr inbounds %struct.anon, ptr %53, i32 0, i32 1
  %55 = load double, ptr %54, align 8, !tbaa !21
  store double %55, ptr %14, align 8, !tbaa !9
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.Inside, ptr %56, i32 0, i32 4
  %58 = getelementptr inbounds %struct.anon, ptr %57, i32 0, i32 3
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  store ptr %59, ptr %25, align 8, !tbaa !5
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.Inside, ptr %60, i32 0, i32 4
  %62 = getelementptr inbounds %struct.anon, ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds [2 x double], ptr %62, i64 0, i64 0
  store ptr %63, ptr %9, align 8, !tbaa !5
  %64 = load ptr, ptr %29, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = call i32 @bbox_inside(ptr noundef %64, ptr noundef %65)
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %69, label %68

68:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %30, align 4
  br label %195

69:                                               ; preds = %2
  %70 = load ptr, ptr %29, align 8, !tbaa !5
  %71 = call double @bbox_zhi(ptr noundef %70)
  store double %71, ptr %15, align 8, !tbaa !9
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %72, i64 0
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  store double %74, ptr %75, align 16, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds double, ptr %76, i64 1
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 1
  store double %78, ptr %79, align 8, !tbaa !9
  %80 = load double, ptr %15, align 8, !tbaa !9
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %81, i64 2
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = call double @max_dbl(double noundef %80, double noundef %83)
  %85 = load double, ptr %13, align 8, !tbaa !9
  %86 = fadd double %84, %85
  %87 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 2
  store double %86, ptr %87, align 16, !tbaa !9
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %88, i64 0
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds double, ptr %91, i64 0
  %93 = load double, ptr %92, align 8, !tbaa !9
  %94 = fsub double %90, %93
  %95 = load double, ptr %14, align 8, !tbaa !9
  %96 = fdiv double %94, %95
  %97 = fptosi double %96 to i32
  store i32 %97, ptr %21, align 4, !tbaa !18
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %98, i64 1
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds double, ptr %101, i64 1
  %103 = load double, ptr %102, align 8, !tbaa !9
  %104 = fsub double %100, %103
  %105 = load double, ptr %14, align 8, !tbaa !9
  %106 = fdiv double %104, %105
  %107 = fptosi double %106 to i32
  store i32 %107, ptr %22, align 4, !tbaa !18
  %108 = load i32, ptr %21, align 4, !tbaa !18
  %109 = load i32, ptr %22, align 4, !tbaa !18
  %110 = load i32, ptr %26, align 4, !tbaa !18
  %111 = mul nsw i32 %109, %110
  %112 = add nsw i32 %108, %111
  store i32 %112, ptr %18, align 4, !tbaa !18
  %113 = load i32, ptr %18, align 4, !tbaa !18
  %114 = icmp slt i32 %113, 0
  br i1 %114, label %115, label %116

115:                                              ; preds = %69
  store i32 0, ptr %18, align 4, !tbaa !18
  br label %116

116:                                              ; preds = %115, %69
  %117 = load i32, ptr %18, align 4, !tbaa !18
  %118 = load i32, ptr %26, align 4, !tbaa !18
  %119 = load i32, ptr %27, align 4, !tbaa !18
  %120 = mul nsw i32 %118, %119
  %121 = icmp sge i32 %117, %120
  br i1 %121, label %122, label %127

122:                                              ; preds = %116
  %123 = load i32, ptr %26, align 4, !tbaa !18
  %124 = load i32, ptr %27, align 4, !tbaa !18
  %125 = mul nsw i32 %123, %124
  %126 = sub nsw i32 %125, 1
  store i32 %126, ptr %18, align 4, !tbaa !18
  br label %127

127:                                              ; preds = %122, %116
  store i32 0, ptr %19, align 4, !tbaa !18
  store i32 0, ptr %20, align 4, !tbaa !18
  br label %128

128:                                              ; preds = %189, %127
  %129 = load i32, ptr %20, align 4, !tbaa !18
  %130 = load ptr, ptr %25, align 8, !tbaa !5
  %131 = load i32, ptr %18, align 4, !tbaa !18
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !18
  %135 = icmp slt i32 %129, %134
  br i1 %135, label %136, label %192

136:                                              ; preds = %128
  %137 = load ptr, ptr %16, align 8, !tbaa !5
  %138 = load i32, ptr %18, align 4, !tbaa !18
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = load i32, ptr %20, align 4, !tbaa !18
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !18
  store i32 %145, ptr %28, align 4, !tbaa !18
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = load i32, ptr %28, align 4, !tbaa !18
  %148 = mul nsw i32 3, %147
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %146, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !18
  store i32 %151, ptr %17, align 4, !tbaa !18
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = load i32, ptr %28, align 4, !tbaa !18
  %154 = mul nsw i32 3, %153
  %155 = add nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %152, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !18
  store i32 %158, ptr %23, align 4, !tbaa !18
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = load i32, ptr %28, align 4, !tbaa !18
  %161 = mul nsw i32 3, %160
  %162 = add nsw i32 %161, 2
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds i32, ptr %159, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !18
  store i32 %165, ptr %24, align 4, !tbaa !18
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = load i32, ptr %17, align 4, !tbaa !18
  %168 = mul nsw i32 3, %167
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds double, ptr %166, i64 %169
  store ptr %170, ptr %6, align 8, !tbaa !5
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = load i32, ptr %23, align 4, !tbaa !18
  %173 = mul nsw i32 3, %172
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds double, ptr %171, i64 %174
  store ptr %175, ptr %7, align 8, !tbaa !5
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  %177 = load i32, ptr %24, align 4, !tbaa !18
  %178 = mul nsw i32 3, %177
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %176, i64 %179
  store ptr %180, ptr %8, align 8, !tbaa !5
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = call i32 @predicate_ray(ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184, ptr noundef %185)
  %187 = load i32, ptr %19, align 4, !tbaa !18
  %188 = add nsw i32 %187, %186
  store i32 %188, ptr %19, align 4, !tbaa !18
  br label %189

189:                                              ; preds = %136
  %190 = load i32, ptr %20, align 4, !tbaa !18
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %20, align 4, !tbaa !18
  br label %128, !llvm.loop !23

192:                                              ; preds = %128
  %193 = load i32, ptr %19, align 4, !tbaa !18
  %194 = srem i32 %193, 2
  store i32 %194, ptr %3, align 4
  store i32 1, ptr %30, align 4
  br label %195

195:                                              ; preds = %192, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  %196 = load i32, ptr %3, align 4
  ret i32 %196
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"Inside", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !13, i64 52}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !13, i64 80}
!18 = !{!13, !13, i64 0}
!19 = !{!12, !13, i64 84}
!20 = !{!12, !6, i64 72}
!21 = !{!12, !10, i64 48}
!22 = !{!12, !6, i64 64}
!23 = distinct !{!23, !24}
!24 = !{!"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"

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @bbox_inside(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local double @bbox_zhi(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @predicate_ray(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden double @max_dbl(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @inside_inside(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #3
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  %11 = load i32, ptr %10, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 84
  %13 = load i32, ptr %12, align 4, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %0, i64 72
  %15 = load ptr, ptr %14, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load double, ptr %16, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  %19 = load ptr, ptr %18, align 8, !tbaa !19
  %20 = tail call i32 @bbox_inside(ptr noundef %9, ptr noundef %1)
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %._crit_edge, label %21

21:                                               ; preds = %2
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = tail call double @bbox_zhi(ptr noundef %9)
  %24 = getelementptr inbounds i8, ptr %1, i64 8
  %25 = load <2 x double>, ptr %1, align 8, !tbaa !20
  store <2 x double> %25, ptr %3, align 16, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %1, i64 16
  %27 = load double, ptr %26, align 8, !tbaa !20
  %28 = tail call double @max_dbl(double noundef %23, double noundef %27)
  %29 = fadd double %28, 1.000000e-10
  %30 = getelementptr inbounds i8, ptr %3, i64 16
  store double %29, ptr %30, align 16, !tbaa !20
  %31 = load double, ptr %1, align 8, !tbaa !20
  %32 = load double, ptr %22, align 8, !tbaa !20
  %33 = fsub double %31, %32
  %34 = fdiv double %33, %17
  %35 = fptosi double %34 to i32
  %36 = load double, ptr %24, align 8, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %0, i64 40
  %38 = load double, ptr %37, align 8, !tbaa !20
  %39 = fsub double %36, %38
  %40 = fdiv double %39, %17
  %41 = fptosi double %40 to i32
  %42 = mul nsw i32 %11, %41
  %43 = add nsw i32 %42, %35
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %43, i32 0)
  %44 = mul nsw i32 %13, %11
  %.not61 = icmp slt i32 %spec.store.select, %44
  %45 = add nsw i32 %44, -1
  %spec.select = select i1 %.not61, i32 %spec.store.select, i32 %45
  %46 = sext i32 %spec.select to i64
  %47 = getelementptr inbounds i32, ptr %19, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !21
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %21
  %50 = getelementptr inbounds ptr, ptr %15, i64 %46
  br label %51

51:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %.05863 = phi i32 [ 0, %.lr.ph ], [ %73, %51 ]
  %52 = load ptr, ptr %50, align 8, !tbaa !22
  %53 = getelementptr inbounds i32, ptr %52, i64 %indvars.iv
  %54 = load i32, ptr %53, align 4, !tbaa !21
  %55 = mul nsw i32 %54, 3
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %7, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !21
  %59 = getelementptr i8, ptr %57, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !21
  %61 = getelementptr i8, ptr %57, i64 8
  %62 = load i32, ptr %61, align 4, !tbaa !21
  %63 = mul nsw i32 %58, 3
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds double, ptr %5, i64 %64
  %66 = mul nsw i32 %60, 3
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %5, i64 %67
  %69 = mul nsw i32 %62, 3
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %5, i64 %70
  %72 = call i32 @predicate_ray(ptr noundef nonnull %1, ptr noundef nonnull %3, ptr noundef %65, ptr noundef %68, ptr noundef %71)
  %73 = add nsw i32 %72, %.05863
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %74 = load i32, ptr %47, align 4, !tbaa !21
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next, %75
  br i1 %76, label %51, label %._crit_edge.loopexit, !llvm.loop !23

._crit_edge.loopexit:                             ; preds = %51
  %77 = srem i32 %73, 2
  br label %._crit_edge

._crit_edge:                                      ; preds = %21, %._crit_edge.loopexit, %2
  %.0 = phi i32 [ 0, %2 ], [ 0, %21 ], [ %77, %._crit_edge.loopexit ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #3
  ret i32 %.0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 24}
!6 = !{!"Inside", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !8, i64 0, !12, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 52}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !10, i64 16}
!14 = !{!6, !10, i64 8}
!15 = !{!6, !7, i64 80}
!16 = !{!6, !7, i64 84}
!17 = !{!6, !10, i64 72}
!18 = !{!6, !12, i64 48}
!19 = !{!6, !10, i64 64}
!20 = !{!12, !12, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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