; LLVM IR from hans-ob1/neural_cam_ros :: src/detector (image)

; 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.image = type { i32, i32, i32, ptr }
%struct.box = type { float, float, float, float }

@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local float @get_color(i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @get_label(ptr dead_on_unwind noalias writable sret(%struct.image) align 8, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @draw_label(ptr noundef byval(%struct.image) align 8, i32 noundef, i32 noundef, ptr noundef byval(%struct.image) align 8, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @draw_box_width(ptr noundef byval(%struct.image) align 8, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef, float noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @draw_detections(ptr noundef byval(%struct.image) align 8 %0, i32 noundef %1, float noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i32 noundef %7) #2 {
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca [3 x float], align 4
  %25 = alloca %struct.box, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.image, align 8
  store i32 %1, ptr %9, align 4, !tbaa !5
  store float %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !11
  store ptr %4, ptr %12, align 8, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !11
  store ptr %6, ptr %14, align 8, !tbaa !11
  store i32 %7, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %203, %8
  %32 = load i32, ptr %16, align 4, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %35, label %206

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %36 = load ptr, ptr %12, align 8, !tbaa !11
  %37 = load i32, ptr %16, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = load i32, ptr %15, align 4, !tbaa !5
  %42 = call i32 @max_index(ptr noundef %40, i32 noundef %41)
  store i32 %42, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %43 = load ptr, ptr %12, align 8, !tbaa !11
  %44 = load i32, ptr %16, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds ptr, ptr %43, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = load i32, ptr %17, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds float, ptr %47, i64 %49
  %51 = load float, ptr %50, align 4, !tbaa !9
  store float %51, ptr %18, align 4, !tbaa !9
  %52 = load float, ptr %18, align 4, !tbaa !9
  %53 = load float, ptr %10, align 4, !tbaa !9
  %54 = fcmp ogt float %52, %53
  br i1 %54, label %55, label %202

55:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %56 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !13
  %58 = sitofp i32 %57 to double
  %59 = fmul double %58, 1.200000e-02
  %60 = fptosi double %59 to i32
  store i32 %60, ptr %19, align 4, !tbaa !5
  %61 = load ptr, ptr %13, align 8, !tbaa !11
  %62 = load i32, ptr %17, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = load float, ptr %18, align 4, !tbaa !9
  %67 = fmul float %66, 1.000000e+02
  %68 = fpext float %67 to double
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %65, double noundef %68)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %70 = load i32, ptr %17, align 4, !tbaa !5
  %71 = mul nsw i32 %70, 123457
  %72 = load i32, ptr %15, align 4, !tbaa !5
  %73 = srem i32 %71, %72
  store i32 %73, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %74 = load i32, ptr %20, align 4, !tbaa !5
  %75 = load i32, ptr %15, align 4, !tbaa !5
  %76 = call float @get_color(i32 noundef 2, i32 noundef %74, i32 noundef %75)
  store float %76, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %77 = load i32, ptr %20, align 4, !tbaa !5
  %78 = load i32, ptr %15, align 4, !tbaa !5
  %79 = call float @get_color(i32 noundef 1, i32 noundef %77, i32 noundef %78)
  store float %79, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %80 = load i32, ptr %20, align 4, !tbaa !5
  %81 = load i32, ptr %15, align 4, !tbaa !5
  %82 = call float @get_color(i32 noundef 0, i32 noundef %80, i32 noundef %81)
  store float %82, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #4
  %83 = load float, ptr %21, align 4, !tbaa !9
  %84 = getelementptr inbounds [3 x float], ptr %24, i64 0, i64 0
  store float %83, ptr %84, align 4, !tbaa !9
  %85 = load float, ptr %22, align 4, !tbaa !9
  %86 = getelementptr inbounds [3 x float], ptr %24, i64 0, i64 1
  store float %85, ptr %86, align 4, !tbaa !9
  %87 = load float, ptr %23, align 4, !tbaa !9
  %88 = getelementptr inbounds [3 x float], ptr %24, i64 0, i64 2
  store float %87, ptr %88, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #4
  %89 = load ptr, ptr %11, align 8, !tbaa !11
  %90 = load i32, ptr %16, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %struct.box, ptr %89, i64 %91
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %92, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %93 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 0
  %94 = load float, ptr %93, align 4, !tbaa !16
  %95 = fpext float %94 to double
  %96 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 2
  %97 = load float, ptr %96, align 4, !tbaa !18
  %98 = fpext float %97 to double
  %99 = fdiv double %98, 2.000000e+00
  %100 = fsub double %95, %99
  %101 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !19
  %103 = sitofp i32 %102 to double
  %104 = fmul double %100, %103
  %105 = fptosi double %104 to i32
  store i32 %105, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %106 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 0
  %107 = load float, ptr %106, align 4, !tbaa !16
  %108 = fpext float %107 to double
  %109 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 2
  %110 = load float, ptr %109, align 4, !tbaa !18
  %111 = fpext float %110 to double
  %112 = fdiv double %111, 2.000000e+00
  %113 = fadd double %108, %112
  %114 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !19
  %116 = sitofp i32 %115 to double
  %117 = fmul double %113, %116
  %118 = fptosi double %117 to i32
  store i32 %118, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %119 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 1
  %120 = load float, ptr %119, align 4, !tbaa !20
  %121 = fpext float %120 to double
  %122 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 3
  %123 = load float, ptr %122, align 4, !tbaa !21
  %124 = fpext float %123 to double
  %125 = fdiv double %124, 2.000000e+00
  %126 = fsub double %121, %125
  %127 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !13
  %129 = sitofp i32 %128 to double
  %130 = fmul double %126, %129
  %131 = fptosi double %130 to i32
  store i32 %131, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %132 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 1
  %133 = load float, ptr %132, align 4, !tbaa !20
  %134 = fpext float %133 to double
  %135 = getelementptr inbounds %struct.box, ptr %25, i32 0, i32 3
  %136 = load float, ptr %135, align 4, !tbaa !21
  %137 = fpext float %136 to double
  %138 = fdiv double %137, 2.000000e+00
  %139 = fadd double %134, %138
  %140 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !13
  %142 = sitofp i32 %141 to double
  %143 = fmul double %139, %142
  %144 = fptosi double %143 to i32
  store i32 %144, ptr %29, align 4, !tbaa !5
  %145 = load i32, ptr %26, align 4, !tbaa !5
  %146 = icmp slt i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %55
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %147, %55
  %149 = load i32, ptr %27, align 4, !tbaa !5
  %150 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !19
  %152 = sub nsw i32 %151, 1
  %153 = icmp sgt i32 %149, %152
  br i1 %153, label %154, label %158

154:                                              ; preds = %148
  %155 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !19
  %157 = sub nsw i32 %156, 1
  store i32 %157, ptr %27, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %154, %148
  %159 = load i32, ptr %28, align 4, !tbaa !5
  %160 = icmp slt i32 %159, 0
  br i1 %160, label %161, label %162

161:                                              ; preds = %158
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %161, %158
  %163 = load i32, ptr %29, align 4, !tbaa !5
  %164 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !13
  %166 = sub nsw i32 %165, 1
  %167 = icmp sgt i32 %163, %166
  br i1 %167, label %168, label %172

168:                                              ; preds = %162
  %169 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 0
  %170 = load i32, ptr %169, align 8, !tbaa !13
  %171 = sub nsw i32 %170, 1
  store i32 %171, ptr %29, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %168, %162
  %173 = load i32, ptr %26, align 4, !tbaa !5
  %174 = load i32, ptr %28, align 4, !tbaa !5
  %175 = load i32, ptr %27, align 4, !tbaa !5
  %176 = load i32, ptr %29, align 4, !tbaa !5
  %177 = load i32, ptr %19, align 4, !tbaa !5
  %178 = load float, ptr %21, align 4, !tbaa !9
  %179 = load float, ptr %22, align 4, !tbaa !9
  %180 = load float, ptr %23, align 4, !tbaa !9
  call void @draw_box_width(ptr noundef byval(%struct.image) align 8 %0, i32 noundef %173, i32 noundef %174, i32 noundef %175, i32 noundef %176, i32 noundef %177, float noundef %178, float noundef %179, float noundef %180)
  %181 = load ptr, ptr %14, align 8, !tbaa !11
  %182 = icmp ne ptr %181, null
  br i1 %182, label %183, label %201

183:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #4
  %184 = load ptr, ptr %14, align 8, !tbaa !11
  %185 = load ptr, ptr %13, align 8, !tbaa !11
  %186 = load i32, ptr %17, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds ptr, ptr %185, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !11
  %190 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 0
  %191 = load i32, ptr %190, align 8, !tbaa !13
  %192 = sitofp i32 %191 to double
  %193 = fmul double %192, 3.000000e-02
  %194 = fdiv double %193, 1.000000e+01
  %195 = fptosi double %194 to i32
  call void @get_label(ptr dead_on_unwind writable sret(%struct.image) align 8 %30, ptr noundef %184, ptr noundef %189, i32 noundef %195)
  %196 = load i32, ptr %28, align 4, !tbaa !5
  %197 = load i32, ptr %19, align 4, !tbaa !5
  %198 = add nsw i32 %196, %197
  %199 = load i32, ptr %26, align 4, !tbaa !5
  %200 = getelementptr inbounds [3 x float], ptr %24, i64 0, i64 0
  call void @draw_label(ptr noundef byval(%struct.image) align 8 %0, i32 noundef %198, i32 noundef %199, ptr noundef byval(%struct.image) align 8 %30, ptr noundef %200)
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #4
  br label %201

201:                                              ; preds = %183, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %202

202:                                              ; preds = %201, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %16, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %16, align 4, !tbaa !5
  br label %31, !llvm.loop !22

206:                                              ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  ret void
}

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

declare i32 @printf(ptr noundef, ...) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !12, i64 16}
!15 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!18 = !{!17, !10, i64 8}
!19 = !{!14, !6, i64 4}
!20 = !{!17, !10, i64 4}
!21 = !{!17, !10, i64 12}
!22 = distinct !{!22, !23}
!23 = !{!"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"

%struct.image = type { i32, i32, i32, ptr }
%struct.box = type { float, float, float, float }

@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1

; 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 float @get_color(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @get_label(ptr dead_on_unwind noalias writable sret(%struct.image) align 8, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @draw_label(ptr noundef byval(%struct.image) align 8, i32 noundef, i32 noundef, ptr noundef byval(%struct.image) align 8, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @draw_box_width(ptr noundef byval(%struct.image) align 8, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @draw_detections(ptr noundef byval(%struct.image) align 8 %0, i32 noundef %1, float noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, ptr nocapture noundef readonly %5, ptr noundef %6, i32 noundef %7) local_unnamed_addr #1 {
  %9 = alloca [3 x float], align 4
  %10 = alloca %struct.image, align 8
  %11 = icmp sgt i32 %1, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8
  %12 = getelementptr inbounds i8, ptr %9, i64 4
  %13 = getelementptr inbounds i8, ptr %9, i64 8
  %.not59 = icmp eq ptr %6, null
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %14

14:                                               ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %15 = getelementptr inbounds ptr, ptr %4, i64 %indvars.iv
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = call i32 @max_index(ptr noundef %16, i32 noundef %7) #5
  %18 = load ptr, ptr %15, align 8, !tbaa !5
  %19 = sext i32 %17 to i64
  %20 = getelementptr inbounds float, ptr %18, i64 %19
  %21 = load float, ptr %20, align 4, !tbaa !9
  %22 = fcmp ogt float %21, %2
  br i1 %22, label %23, label %76

23:                                               ; preds = %14
  %24 = load i32, ptr %0, align 8, !tbaa !11
  %25 = sitofp i32 %24 to double
  %26 = fmul double %25, 1.200000e-02
  %27 = fptosi double %26 to i32
  %28 = getelementptr inbounds ptr, ptr %5, i64 %19
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  %30 = fmul float %21, 1.000000e+02
  %31 = fpext float %30 to double
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef %29, double noundef %31)
  %33 = mul nsw i32 %17, 123457
  %34 = srem i32 %33, %7
  %35 = call float @get_color(i32 noundef 2, i32 noundef %34, i32 noundef %7)
  %36 = call float @get_color(i32 noundef 1, i32 noundef %34, i32 noundef %7)
  %37 = call float @get_color(i32 noundef 0, i32 noundef %34, i32 noundef %7)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  store float %35, ptr %9, align 4, !tbaa !9
  store float %36, ptr %12, align 4, !tbaa !9
  store float %37, ptr %13, align 4, !tbaa !9
  %38 = getelementptr inbounds %struct.box, ptr %3, i64 %indvars.iv
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %38, i64 8
  %39 = load <2 x float>, ptr %38, align 4, !tbaa !9
  %40 = load <2 x float>, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !9
  %41 = fpext <2 x float> %39 to <2 x double>
  %42 = fpext <2 x float> %40 to <2 x double>
  %43 = fmul <2 x double> %42, <double 5.000000e-01, double 5.000000e-01>
  %44 = fsub <2 x double> %41, %43
  %45 = load <2 x i32>, ptr %0, align 8, !tbaa !14
  %46 = shufflevector <2 x i32> %45, <2 x i32> poison, <2 x i32> <i32 1, i32 0>
  %47 = sitofp <2 x i32> %46 to <2 x double>
  %48 = fmul <2 x double> %44, %47
  %49 = extractelement <2 x double> %48, i64 0
  %50 = fptosi double %49 to i32
  %51 = fsub <2 x double> %41, %43
  %52 = fmul <2 x double> %51, %47
  %53 = extractelement <2 x double> %52, i64 1
  %54 = fptosi double %53 to i32
  %55 = fadd <2 x double> %43, %41
  %56 = fmul <2 x double> %55, %47
  %57 = fptosi <2 x double> %56 to <2 x i32>
  %spec.store.select = call i32 @llvm.smax.i32(i32 %50, i32 0)
  %58 = extractelement <2 x i32> %45, i64 1
  %59 = add nsw i32 %58, -1
  %60 = icmp sgt <2 x i32> %46, %57
  %61 = extractelement <2 x i1> %60, i64 0
  %62 = extractelement <2 x i32> %57, i64 0
  %spec.select = select i1 %61, i32 %62, i32 %59
  %spec.store.select1 = call i32 @llvm.smax.i32(i32 %54, i32 0)
  %63 = extractelement <2 x i32> %45, i64 0
  %64 = add nsw i32 %63, -1
  %65 = extractelement <2 x i1> %60, i64 1
  %66 = extractelement <2 x i32> %57, i64 1
  %.0 = select i1 %65, i32 %66, i32 %64
  call void @draw_box_width(ptr noundef nonnull byval(%struct.image) align 8 %0, i32 noundef %spec.store.select, i32 noundef %spec.store.select1, i32 noundef %spec.select, i32 noundef %.0, i32 noundef %27, float noundef %35, float noundef %36, float noundef %37)
  br i1 %.not59, label %75, label %67

67:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %68 = load ptr, ptr %28, align 8, !tbaa !5
  %69 = load i32, ptr %0, align 8, !tbaa !11
  %70 = sitofp i32 %69 to double
  %71 = fmul double %70, 3.000000e-02
  %72 = fdiv double %71, 1.000000e+01
  %73 = fptosi double %72 to i32
  call void @get_label(ptr dead_on_unwind nonnull writable sret(%struct.image) align 8 %10, ptr noundef nonnull %6, ptr noundef %68, i32 noundef %73)
  %74 = add nsw i32 %spec.store.select1, %27
  call void @draw_label(ptr noundef nonnull byval(%struct.image) align 8 %0, i32 noundef %74, i32 noundef %spec.store.select, ptr noundef nonnull byval(%struct.image) align 8 %10, ptr noundef nonnull %9)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %75

75:                                               ; preds = %67, %23
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  br label %76

76:                                               ; preds = %75, %14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %14, !llvm.loop !15

._crit_edge:                                      ; preds = %76, %8
  ret void
}

declare i32 @max_index(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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 = { "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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,VectorCombinePass