; LLVM IR from JessonYue/LeetCodeLearning :: Array/liuchang/day4 (day4)

; 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"

@__const.main.a = external hidden unnamed_addr constant [6 x i32], align 16
@__const.main.b = external hidden unnamed_addr constant [3 x i32], align 4
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [6 x i32], align 16
  %3 = alloca [3 x i32], align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %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
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const.main.a, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 @__const.main.b, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 9, ptr %4, align 4, !tbaa !5
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = zext i32 %14 to i64
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %5, align 8
  %17 = alloca i32, i64 %15, align 16
  store i64 %15, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %31, %0
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = icmp ult i64 %20, 6
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %34

23:                                               ; preds = %18
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i32, ptr %17, i64 %29
  store i32 %27, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %23
  %32 = load i32, ptr %7, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %7, align 4, !tbaa !5
  br label %18, !llvm.loop !9

34:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %49, %34
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = icmp ult i64 %37, 3
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %52

40:                                               ; preds = %35
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [3 x i32], ptr %3, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = add i64 6, %46
  %48 = getelementptr inbounds i32, ptr %17, i64 %47
  store i32 %44, ptr %48, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %40
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %8, align 4, !tbaa !5
  br label %35, !llvm.loop !11

52:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %101, %52
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = mul nuw i64 4, %15
  %57 = udiv i64 %56, 4
  %58 = icmp ult i64 %55, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %104

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %11, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %97, %60
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = mul nuw i64 4, %15
  %67 = udiv i64 %66, 4
  %68 = icmp ult i64 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %63
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %100

70:                                               ; preds = %63
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %17, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %17, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp sgt i32 %74, %78
  br i1 %79, label %80, label %96

80:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %17, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %12, align 4, !tbaa !5
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %17, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %17, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %17, i64 %94
  store i32 %92, ptr %95, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %96

96:                                               ; preds = %80, %70
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %11, align 4, !tbaa !5
  br label %63, !llvm.loop !12

100:                                              ; preds = %69
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %9, align 4, !tbaa !5
  br label %53, !llvm.loop !13

104:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %125, %104
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = mul nuw i64 4, %15
  %109 = udiv i64 %108, 4
  %110 = icmp ult i64 %107, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %105
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %128

112:                                              ; preds = %105
  %113 = load i32, ptr %13, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %17, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %124

118:                                              ; preds = %112
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %17, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %122)
  br label %124

124:                                              ; preds = %118, %112
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %13, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %13, align 4, !tbaa !5
  br label %105, !llvm.loop !14

128:                                              ; preds = %111
  %129 = mul nuw i64 4, %15
  %130 = trunc i64 %129 to i32
  store i32 %130, ptr %1, align 4
  store i32 1, ptr %10, align 4
  %131 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %131)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #5
  %132 = load i32, ptr %1, align 4
  ret i32 %132
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; 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"

@__const.main.a = external hidden unnamed_addr constant [6 x i32], align 16
@__const.main.b = external hidden unnamed_addr constant [3 x i32], align 4
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.lr.ph:
  %.sroa.0.0.copyload = load i32, ptr @__const.main.a, align 16, !tbaa !5
  %.sroa.18.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.a, i64 4), align 4, !tbaa !5
  %.sroa.35.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.a, i64 8), align 8, !tbaa !5
  %.sroa.52.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.a, i64 12), align 4, !tbaa !5
  %.sroa.69.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.a, i64 16), align 16, !tbaa !5
  %.sroa.86.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.a, i64 20), align 4, !tbaa !5
  %.sroa.103.24.copyload = load i32, ptr @__const.main.b, align 4, !tbaa !5
  %.sroa.121.24.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.b, i64 4), align 4, !tbaa !5
  %.sroa.138.24.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.b, i64 8), align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.sroa.0.0.copyload, i32 %.sroa.18.0.copyload)
  %spec.select127 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.0.copyload, i32 %.sroa.18.0.copyload)
  %.sroa.35.10 = tail call i32 @llvm.smax.i32(i32 %spec.select127, i32 %.sroa.35.0.copyload)
  %.sroa.0.2 = tail call i32 @llvm.smin.i32(i32 %spec.select127, i32 %.sroa.35.0.copyload)
  %.sroa.52.11 = tail call i32 @llvm.smax.i32(i32 %.sroa.0.2, i32 %.sroa.52.0.copyload)
  %.sroa.0.3 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.2, i32 %.sroa.52.0.copyload)
  %.sroa.69.12 = tail call i32 @llvm.smax.i32(i32 %.sroa.0.3, i32 %.sroa.69.0.copyload)
  %.sroa.0.4 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.3, i32 %.sroa.69.0.copyload)
  %.sroa.86.13 = tail call i32 @llvm.smax.i32(i32 %.sroa.0.4, i32 %.sroa.86.0.copyload)
  %.sroa.0.5 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.4, i32 %.sroa.86.0.copyload)
  %.sroa.103.14 = tail call i32 @llvm.smax.i32(i32 %.sroa.0.5, i32 %.sroa.103.24.copyload)
  %.sroa.0.6 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.5, i32 %.sroa.103.24.copyload)
  %.sroa.121.15 = tail call i32 @llvm.smax.i32(i32 %.sroa.0.6, i32 %.sroa.121.24.copyload)
  %.sroa.0.7 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.6, i32 %.sroa.121.24.copyload)
  %.sroa.138.15 = tail call i32 @llvm.smax.i32(i32 %.sroa.0.7, i32 %.sroa.138.24.copyload)
  %.sroa.0.8 = tail call i32 @llvm.smin.i32(i32 %.sroa.0.7, i32 %.sroa.138.24.copyload)
  %.sroa.35.1 = tail call i32 @llvm.smax.i32(i32 %spec.select, i32 %.sroa.35.10)
  %.sroa.18.1 = tail call i32 @llvm.smin.i32(i32 %spec.select, i32 %.sroa.35.10)
  %.sroa.52.1 = tail call i32 @llvm.smax.i32(i32 %.sroa.18.1, i32 %.sroa.52.11)
  %.sroa.18.2 = tail call i32 @llvm.smin.i32(i32 %.sroa.18.1, i32 %.sroa.52.11)
  %.sroa.69.1 = tail call i32 @llvm.smax.i32(i32 %.sroa.18.2, i32 %.sroa.69.12)
  %.sroa.18.3 = tail call i32 @llvm.smin.i32(i32 %.sroa.18.2, i32 %.sroa.69.12)
  %.sroa.86.1 = tail call i32 @llvm.smax.i32(i32 %.sroa.18.3, i32 %.sroa.86.13)
  %.sroa.18.4 = tail call i32 @llvm.smin.i32(i32 %.sroa.18.3, i32 %.sroa.86.13)
  %.sroa.103.1 = tail call i32 @llvm.smax.i32(i32 %.sroa.18.4, i32 %.sroa.103.14)
  %.sroa.18.5 = tail call i32 @llvm.smin.i32(i32 %.sroa.18.4, i32 %.sroa.103.14)
  %.sroa.121.1 = tail call i32 @llvm.smax.i32(i32 %.sroa.18.5, i32 %.sroa.121.15)
  %.sroa.18.6 = tail call i32 @llvm.smin.i32(i32 %.sroa.18.5, i32 %.sroa.121.15)
  %.sroa.138.1 = tail call i32 @llvm.smax.i32(i32 %.sroa.18.6, i32 %.sroa.138.15)
  %.sroa.18.7 = tail call i32 @llvm.smin.i32(i32 %.sroa.18.6, i32 %.sroa.138.15)
  %.sroa.52.3 = tail call i32 @llvm.smax.i32(i32 %.sroa.35.1, i32 %.sroa.52.1)
  %.sroa.35.3 = tail call i32 @llvm.smin.i32(i32 %.sroa.35.1, i32 %.sroa.52.1)
  %.sroa.69.3 = tail call i32 @llvm.smax.i32(i32 %.sroa.35.3, i32 %.sroa.69.1)
  %.sroa.35.4 = tail call i32 @llvm.smin.i32(i32 %.sroa.35.3, i32 %.sroa.69.1)
  %.sroa.86.3 = tail call i32 @llvm.smax.i32(i32 %.sroa.35.4, i32 %.sroa.86.1)
  %.sroa.35.5 = tail call i32 @llvm.smin.i32(i32 %.sroa.35.4, i32 %.sroa.86.1)
  %.sroa.103.3 = tail call i32 @llvm.smax.i32(i32 %.sroa.35.5, i32 %.sroa.103.1)
  %.sroa.35.6 = tail call i32 @llvm.smin.i32(i32 %.sroa.35.5, i32 %.sroa.103.1)
  %.sroa.121.3 = tail call i32 @llvm.smax.i32(i32 %.sroa.35.6, i32 %.sroa.121.1)
  %.sroa.35.7 = tail call i32 @llvm.smin.i32(i32 %.sroa.35.6, i32 %.sroa.121.1)
  %.sroa.138.3 = tail call i32 @llvm.smax.i32(i32 %.sroa.35.7, i32 %.sroa.138.1)
  %.sroa.35.8 = tail call i32 @llvm.smin.i32(i32 %.sroa.35.7, i32 %.sroa.138.1)
  %.sroa.69.5 = tail call i32 @llvm.smax.i32(i32 %.sroa.52.3, i32 %.sroa.69.3)
  %.sroa.52.5 = tail call i32 @llvm.smin.i32(i32 %.sroa.52.3, i32 %.sroa.69.3)
  %.sroa.86.5 = tail call i32 @llvm.smax.i32(i32 %.sroa.52.5, i32 %.sroa.86.3)
  %.sroa.52.6 = tail call i32 @llvm.smin.i32(i32 %.sroa.52.5, i32 %.sroa.86.3)
  %.sroa.103.5 = tail call i32 @llvm.smax.i32(i32 %.sroa.52.6, i32 %.sroa.103.3)
  %.sroa.52.7 = tail call i32 @llvm.smin.i32(i32 %.sroa.52.6, i32 %.sroa.103.3)
  %.sroa.121.5 = tail call i32 @llvm.smax.i32(i32 %.sroa.52.7, i32 %.sroa.121.3)
  %.sroa.52.8 = tail call i32 @llvm.smin.i32(i32 %.sroa.52.7, i32 %.sroa.121.3)
  %.sroa.138.5 = tail call i32 @llvm.smax.i32(i32 %.sroa.52.8, i32 %.sroa.138.3)
  %.sroa.52.9 = tail call i32 @llvm.smin.i32(i32 %.sroa.52.8, i32 %.sroa.138.3)
  %.sroa.86.7 = tail call i32 @llvm.smax.i32(i32 %.sroa.69.5, i32 %.sroa.86.5)
  %.sroa.69.7 = tail call i32 @llvm.smin.i32(i32 %.sroa.69.5, i32 %.sroa.86.5)
  %.sroa.103.7 = tail call i32 @llvm.smax.i32(i32 %.sroa.69.7, i32 %.sroa.103.5)
  %.sroa.69.8 = tail call i32 @llvm.smin.i32(i32 %.sroa.69.7, i32 %.sroa.103.5)
  %.sroa.121.7 = tail call i32 @llvm.smax.i32(i32 %.sroa.69.8, i32 %.sroa.121.5)
  %.sroa.69.9 = tail call i32 @llvm.smin.i32(i32 %.sroa.69.8, i32 %.sroa.121.5)
  %.sroa.138.7 = tail call i32 @llvm.smax.i32(i32 %.sroa.69.9, i32 %.sroa.138.5)
  %.sroa.69.10 = tail call i32 @llvm.smin.i32(i32 %.sroa.69.9, i32 %.sroa.138.5)
  %.sroa.103.9 = tail call i32 @llvm.smax.i32(i32 %.sroa.86.7, i32 %.sroa.103.7)
  %.sroa.86.9 = tail call i32 @llvm.smin.i32(i32 %.sroa.86.7, i32 %.sroa.103.7)
  %.sroa.121.9 = tail call i32 @llvm.smax.i32(i32 %.sroa.86.9, i32 %.sroa.121.7)
  %.sroa.86.10 = tail call i32 @llvm.smin.i32(i32 %.sroa.86.9, i32 %.sroa.121.7)
  %.sroa.138.9 = tail call i32 @llvm.smax.i32(i32 %.sroa.86.10, i32 %.sroa.138.7)
  %.sroa.86.11 = tail call i32 @llvm.smin.i32(i32 %.sroa.86.10, i32 %.sroa.138.7)
  %.sroa.121.11 = tail call i32 @llvm.smax.i32(i32 %.sroa.103.9, i32 %.sroa.121.9)
  %.sroa.103.11 = tail call i32 @llvm.smin.i32(i32 %.sroa.103.9, i32 %.sroa.121.9)
  %.sroa.138.11 = tail call i32 @llvm.smax.i32(i32 %.sroa.103.11, i32 %.sroa.138.9)
  %.sroa.103.12 = tail call i32 @llvm.smin.i32(i32 %.sroa.103.11, i32 %.sroa.138.9)
  %.sroa.138.13 = tail call i32 @llvm.smax.i32(i32 %.sroa.121.11, i32 %.sroa.138.11)
  %.sroa.121.13 = tail call i32 @llvm.smin.i32(i32 %.sroa.121.11, i32 %.sroa.138.11)
  %.not = icmp eq i32 %.sroa.0.8, 0
  br i1 %.not, label %.preheader.1, label %0

0:                                                ; preds = %.lr.ph
  %1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.0.8)
  br label %.preheader.1

.preheader.1:                                     ; preds = %.lr.ph, %0
  %.not.1 = icmp eq i32 %.sroa.18.7, 0
  br i1 %.not.1, label %.preheader.2, label %2

2:                                                ; preds = %.preheader.1
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.18.7)
  br label %.preheader.2

.preheader.2:                                     ; preds = %2, %.preheader.1
  %.not.2 = icmp eq i32 %.sroa.35.8, 0
  br i1 %.not.2, label %.preheader.3, label %4

4:                                                ; preds = %.preheader.2
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.35.8)
  br label %.preheader.3

.preheader.3:                                     ; preds = %4, %.preheader.2
  %.not.3 = icmp eq i32 %.sroa.52.9, 0
  br i1 %.not.3, label %.preheader.4, label %6

6:                                                ; preds = %.preheader.3
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.52.9)
  br label %.preheader.4

.preheader.4:                                     ; preds = %6, %.preheader.3
  %.not.4 = icmp eq i32 %.sroa.69.10, 0
  br i1 %.not.4, label %.preheader.5, label %8

8:                                                ; preds = %.preheader.4
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.69.10)
  br label %.preheader.5

.preheader.5:                                     ; preds = %8, %.preheader.4
  %.not.5 = icmp eq i32 %.sroa.86.11, 0
  br i1 %.not.5, label %.preheader.6, label %10

10:                                               ; preds = %.preheader.5
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.86.11)
  br label %.preheader.6

.preheader.6:                                     ; preds = %10, %.preheader.5
  %.not.6 = icmp eq i32 %.sroa.103.12, 0
  br i1 %.not.6, label %.preheader.7, label %12

12:                                               ; preds = %.preheader.6
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.103.12)
  br label %.preheader.7

.preheader.7:                                     ; preds = %12, %.preheader.6
  %.not.7 = icmp eq i32 %.sroa.121.13, 0
  br i1 %.not.7, label %.preheader.8, label %14

14:                                               ; preds = %.preheader.7
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.121.13)
  br label %.preheader.8

.preheader.8:                                     ; preds = %14, %.preheader.7
  %.not.8 = icmp eq i32 %.sroa.138.13, 0
  br i1 %.not.8, label %18, label %16

16:                                               ; preds = %.preheader.8
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.sroa.138.13)
  br label %18

18:                                               ; preds = %16, %.preheader.8
  ret i32 36
}

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

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

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

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass