; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (dgttrs)

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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@c__1 = external hidden global i32, align 4
@c_n1 = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @dgttrs_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #0 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %34 = load ptr, ptr %15, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %34, i32 -1
  store ptr %35, ptr %15, align 8, !tbaa !5
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  %37 = getelementptr inbounds double, ptr %36, i32 -1
  store ptr %37, ptr %16, align 8, !tbaa !5
  %38 = load ptr, ptr %17, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %38, i32 -1
  store ptr %39, ptr %17, align 8, !tbaa !5
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %40, i32 -1
  store ptr %41, ptr %18, align 8, !tbaa !5
  %42 = load ptr, ptr %19, align 8, !tbaa !5
  %43 = getelementptr inbounds i32, ptr %42, i32 -1
  store ptr %43, ptr %19, align 8, !tbaa !5
  %44 = load ptr, ptr %21, align 8, !tbaa !5
  %45 = load i32, ptr %44, align 4, !tbaa !9
  store i32 %45, ptr %23, align 4, !tbaa !9
  %46 = load i32, ptr %23, align 4, !tbaa !9
  %47 = mul nsw i32 %46, 1
  %48 = add nsw i32 1, %47
  store i32 %48, ptr %24, align 4, !tbaa !9
  %49 = load i32, ptr %24, align 4, !tbaa !9
  %50 = load ptr, ptr %20, align 8, !tbaa !5
  %51 = sext i32 %49 to i64
  %52 = sub i64 0, %51
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  store ptr %53, ptr %20, align 8, !tbaa !5
  %54 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 0, ptr %54, align 4, !tbaa !9
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = zext i8 %56 to i32
  %58 = icmp eq i32 %57, 78
  br i1 %58, label %64, label %59

59:                                               ; preds = %11
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = load i8, ptr %60, align 1, !tbaa !11
  %62 = zext i8 %61 to i32
  %63 = icmp eq i32 %62, 110
  br label %64

64:                                               ; preds = %59, %11
  %65 = phi i1 [ true, %11 ], [ %63, %59 ]
  %66 = zext i1 %65 to i32
  store i32 %66, ptr %32, align 4, !tbaa !9
  %67 = load i32, ptr %32, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %91, label %69

69:                                               ; preds = %64
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = load i8, ptr %70, align 1, !tbaa !11
  %72 = zext i8 %71 to i32
  %73 = icmp eq i32 %72, 84
  br i1 %73, label %91, label %74

74:                                               ; preds = %69
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = load i8, ptr %75, align 1, !tbaa !11
  %77 = zext i8 %76 to i32
  %78 = icmp eq i32 %77, 116
  br i1 %78, label %91, label %79

79:                                               ; preds = %74
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load i8, ptr %80, align 1, !tbaa !11
  %82 = zext i8 %81 to i32
  %83 = icmp eq i32 %82, 67
  br i1 %83, label %91, label %84

84:                                               ; preds = %79
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = zext i8 %86 to i32
  %88 = icmp eq i32 %87, 99
  br i1 %88, label %91, label %89

89:                                               ; preds = %84
  %90 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 -1, ptr %90, align 4, !tbaa !9
  br label %121

91:                                               ; preds = %84, %79, %74, %69, %64
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = icmp slt i32 %93, 0
  br i1 %94, label %95, label %97

95:                                               ; preds = %91
  %96 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 -2, ptr %96, align 4, !tbaa !9
  br label %120

97:                                               ; preds = %91
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = icmp slt i32 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %97
  %102 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 -3, ptr %102, align 4, !tbaa !9
  br label %119

103:                                              ; preds = %97
  %104 = load ptr, ptr %21, align 8, !tbaa !5
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = icmp sge i32 %107, 1
  br i1 %108, label %109, label %112

109:                                              ; preds = %103
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  br label %113

112:                                              ; preds = %103
  br label %113

113:                                              ; preds = %112, %109
  %114 = phi i32 [ %111, %109 ], [ 1, %112 ]
  %115 = icmp slt i32 %105, %114
  br i1 %115, label %116, label %118

116:                                              ; preds = %113
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 -10, ptr %117, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %116, %113
  br label %119

119:                                              ; preds = %118, %101
  br label %120

120:                                              ; preds = %119, %95
  br label %121

121:                                              ; preds = %120, %89
  %122 = load ptr, ptr %22, align 8, !tbaa !5
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %121
  %126 = load ptr, ptr %22, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = sub nsw i32 0, %127
  store i32 %128, ptr %25, align 4, !tbaa !9
  %129 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %25, i32 noundef 6)
  store i32 1, ptr %33, align 4
  br label %246

130:                                              ; preds = %121
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %138, label %134

134:                                              ; preds = %130
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = load i32, ptr %135, align 4, !tbaa !9
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %138, label %139

138:                                              ; preds = %134, %130
  store i32 1, ptr %33, align 4
  br label %246

139:                                              ; preds = %134
  %140 = load i32, ptr %32, align 4, !tbaa !9
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %143

142:                                              ; preds = %139
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %144

143:                                              ; preds = %139
  store i32 1, ptr %31, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %143, %142
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = icmp eq i32 %146, 1
  br i1 %147, label %148, label %149

148:                                              ; preds = %144
  store i32 1, ptr %30, align 4, !tbaa !9
  br label %163

149:                                              ; preds = %144
  store i32 1, ptr %25, align 4, !tbaa !9
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = load ptr, ptr %13, align 8, !tbaa !5
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = call i32 @ilaenv_(ptr noundef @c__1, ptr noundef @.str, ptr noundef %150, ptr noundef %151, ptr noundef %152, ptr noundef @c_n1, ptr noundef @c_n1, i32 noundef 6, i32 noundef 1)
  store i32 %153, ptr %26, align 4, !tbaa !9
  %154 = load i32, ptr %25, align 4, !tbaa !9
  %155 = load i32, ptr %26, align 4, !tbaa !9
  %156 = icmp sge i32 %154, %155
  br i1 %156, label %157, label %159

157:                                              ; preds = %149
  %158 = load i32, ptr %25, align 4, !tbaa !9
  br label %161

159:                                              ; preds = %149
  %160 = load i32, ptr %26, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %159, %157
  %162 = phi i32 [ %158, %157 ], [ %160, %159 ]
  store i32 %162, ptr %30, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %161, %148
  %164 = load i32, ptr %30, align 4, !tbaa !9
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  %166 = load i32, ptr %165, align 4, !tbaa !9
  %167 = icmp sge i32 %164, %166
  br i1 %167, label %168, label %186

168:                                              ; preds = %163
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  %172 = getelementptr inbounds double, ptr %171, i64 1
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  %174 = getelementptr inbounds double, ptr %173, i64 1
  %175 = load ptr, ptr %17, align 8, !tbaa !5
  %176 = getelementptr inbounds double, ptr %175, i64 1
  %177 = load ptr, ptr %18, align 8, !tbaa !5
  %178 = getelementptr inbounds double, ptr %177, i64 1
  %179 = load ptr, ptr %19, align 8, !tbaa !5
  %180 = getelementptr inbounds i32, ptr %179, i64 1
  %181 = load ptr, ptr %20, align 8, !tbaa !5
  %182 = load i32, ptr %24, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds double, ptr %181, i64 %183
  %185 = load ptr, ptr %21, align 8, !tbaa !5
  call void @dgtts2_(ptr noundef %31, ptr noundef %169, ptr noundef %170, ptr noundef %172, ptr noundef %174, ptr noundef %176, ptr noundef %178, ptr noundef %180, ptr noundef %184, ptr noundef %185)
  br label %245

186:                                              ; preds = %163
  %187 = load ptr, ptr %14, align 8, !tbaa !5
  %188 = load i32, ptr %187, align 4, !tbaa !9
  store i32 %188, ptr %25, align 4, !tbaa !9
  %189 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %189, ptr %26, align 4, !tbaa !9
  store i32 1, ptr %28, align 4, !tbaa !9
  br label %190

190:                                              ; preds = %240, %186
  %191 = load i32, ptr %26, align 4, !tbaa !9
  %192 = icmp slt i32 %191, 0
  br i1 %192, label %193, label %198

193:                                              ; preds = %190
  %194 = load i32, ptr %28, align 4, !tbaa !9
  %195 = load i32, ptr %25, align 4, !tbaa !9
  %196 = icmp sge i32 %194, %195
  %197 = zext i1 %196 to i32
  br label %203

198:                                              ; preds = %190
  %199 = load i32, ptr %28, align 4, !tbaa !9
  %200 = load i32, ptr %25, align 4, !tbaa !9
  %201 = icmp sle i32 %199, %200
  %202 = zext i1 %201 to i32
  br label %203

203:                                              ; preds = %198, %193
  %204 = phi i32 [ %197, %193 ], [ %202, %198 ]
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %244

206:                                              ; preds = %203
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = load i32, ptr %207, align 4, !tbaa !9
  %209 = load i32, ptr %28, align 4, !tbaa !9
  %210 = sub nsw i32 %208, %209
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %27, align 4, !tbaa !9
  %212 = load i32, ptr %27, align 4, !tbaa !9
  %213 = load i32, ptr %30, align 4, !tbaa !9
  %214 = icmp sle i32 %212, %213
  br i1 %214, label %215, label %217

215:                                              ; preds = %206
  %216 = load i32, ptr %27, align 4, !tbaa !9
  br label %219

217:                                              ; preds = %206
  %218 = load i32, ptr %30, align 4, !tbaa !9
  br label %219

219:                                              ; preds = %217, %215
  %220 = phi i32 [ %216, %215 ], [ %218, %217 ]
  store i32 %220, ptr %29, align 4, !tbaa !9
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = load ptr, ptr %15, align 8, !tbaa !5
  %223 = getelementptr inbounds double, ptr %222, i64 1
  %224 = load ptr, ptr %16, align 8, !tbaa !5
  %225 = getelementptr inbounds double, ptr %224, i64 1
  %226 = load ptr, ptr %17, align 8, !tbaa !5
  %227 = getelementptr inbounds double, ptr %226, i64 1
  %228 = load ptr, ptr %18, align 8, !tbaa !5
  %229 = getelementptr inbounds double, ptr %228, i64 1
  %230 = load ptr, ptr %19, align 8, !tbaa !5
  %231 = getelementptr inbounds i32, ptr %230, i64 1
  %232 = load ptr, ptr %20, align 8, !tbaa !5
  %233 = load i32, ptr %28, align 4, !tbaa !9
  %234 = load i32, ptr %23, align 4, !tbaa !9
  %235 = mul nsw i32 %233, %234
  %236 = add nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds double, ptr %232, i64 %237
  %239 = load ptr, ptr %21, align 8, !tbaa !5
  call void @dgtts2_(ptr noundef %31, ptr noundef %221, ptr noundef %29, ptr noundef %223, ptr noundef %225, ptr noundef %227, ptr noundef %229, ptr noundef %231, ptr noundef %238, ptr noundef %239)
  br label %240

240:                                              ; preds = %219
  %241 = load i32, ptr %26, align 4, !tbaa !9
  %242 = load i32, ptr %28, align 4, !tbaa !9
  %243 = add nsw i32 %242, %241
  store i32 %243, ptr %28, align 4, !tbaa !9
  br label %190, !llvm.loop !12

244:                                              ; preds = %203
  br label %245

245:                                              ; preds = %244, %168
  store i32 1, ptr %33, align 4
  br label %246

246:                                              ; preds = %245, %138, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  ret void
}

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

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @ilaenv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare void @dgtts2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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"

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@c__1 = external hidden global i32, align 4
@c_n1 = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @dgttrs_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr nocapture noundef writeonly %10) local_unnamed_addr #0 {
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  %15 = load i32, ptr %9, align 4, !tbaa !5
  %narrow = xor i32 %15, -1
  %16 = sext i32 %narrow to i64
  %17 = getelementptr inbounds double, ptr %8, i64 %16
  store i32 0, ptr %10, align 4, !tbaa !5
  %18 = load i8, ptr %0, align 1, !tbaa !9
  switch i8 %18, label %.thread [
    i8 110, label %19
    i8 78, label %19
    i8 84, label %19
    i8 116, label %19
    i8 67, label %19
    i8 99, label %19
  ]

19:                                               ; preds = %11, %11, %11, %11, %11, %11
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = icmp slt i32 %20, 0
  br i1 %21, label %.thread, label %22

22:                                               ; preds = %19
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 0
  br i1 %24, label %.thread, label %25

25:                                               ; preds = %22
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %spec.select81 = tail call i32 @llvm.umax.i32(i32 %20, i32 1)
  %27 = icmp slt i32 %26, %spec.select81
  br i1 %27, label %.thread, label %29

.thread:                                          ; preds = %25, %22, %19, %11
  %.sink = phi i32 [ -1, %11 ], [ -2, %19 ], [ -3, %22 ], [ -10, %25 ]
  %.neg = phi i32 [ 1, %11 ], [ 2, %19 ], [ 3, %22 ], [ 10, %25 ]
  store i32 %.sink, ptr %10, align 4, !tbaa !5
  store i32 %.neg, ptr %12, align 4, !tbaa !5
  %28 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %12, i32 noundef 6) #4
  br label %.loopexit

29:                                               ; preds = %25
  %30 = icmp eq i32 %20, 0
  %31 = icmp eq i32 %23, 0
  %or.cond = or i1 %30, %31
  br i1 %or.cond, label %.loopexit, label %32

32:                                               ; preds = %29
  %33 = add nsw i8 %18, -78
  %switch.and = and i8 %33, -33
  %switch.selectcmp = icmp ne i8 %switch.and, 0
  %34 = zext i1 %switch.selectcmp to i32
  store i32 %34, ptr %14, align 4, !tbaa !5
  %35 = icmp eq i32 %23, 1
  br i1 %35, label %.thread86, label %36

36:                                               ; preds = %32
  %37 = tail call i32 @ilaenv_(ptr noundef nonnull @c__1, ptr noundef nonnull @.str, ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1, i32 noundef 6, i32 noundef 1) #4
  %38 = tail call i32 @llvm.smax.i32(i32 %37, i32 1)
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.not79 = icmp slt i32 %38, %.pre
  br i1 %.not79, label %.lr.ph.preheader, label %.thread86

.thread86:                                        ; preds = %32, %36
  call void @dgtts2_(ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef nonnull %9) #4
  br label %.loopexit

.lr.ph.preheader:                                 ; preds = %36
  %invariant.gep = getelementptr i8, ptr %17, i64 8
  %39 = zext nneg i32 %38 to i64
  %40 = sext i32 %15 to i64
  %41 = zext nneg i32 %.pre to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  %reass.sub = sub i32 %42, %43
  %44 = add i32 %reass.sub, 1
  %45 = call i32 @llvm.smin.i32(i32 %44, i32 %38)
  store i32 %45, ptr %13, align 4, !tbaa !5
  %46 = mul nsw i64 %indvars.iv, %40
  %gep = getelementptr double, ptr %invariant.gep, i64 %46
  call void @dgtts2_(ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %13, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %gep, ptr noundef nonnull %9) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, %39
  %.not = icmp ugt i64 %indvars.iv.next, %41
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !10

.loopexit:                                        ; preds = %.lr.ph, %.thread86, %29, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  ret void
}

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

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

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

declare void @dgtts2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass