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

; 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.complex = type { float, float }

@.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 @cpttrs_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #0 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %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 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 i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  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
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = getelementptr inbounds float, ptr %28, i32 -1
  store ptr %29, ptr %12, align 8, !tbaa !5
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.complex, ptr %30, i32 -1
  store ptr %31, ptr %13, align 8, !tbaa !5
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = load i32, ptr %32, align 4, !tbaa !9
  store i32 %33, ptr %17, align 4, !tbaa !9
  %34 = load i32, ptr %17, align 4, !tbaa !9
  %35 = mul nsw i32 %34, 1
  %36 = add nsw i32 1, %35
  store i32 %36, ptr %18, align 4, !tbaa !9
  %37 = load i32, ptr %18, align 4, !tbaa !9
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  %39 = sext i32 %37 to i64
  %40 = sub i64 0, %39
  %41 = getelementptr inbounds %struct.complex, ptr %38, i64 %40
  store ptr %41, ptr %14, align 8, !tbaa !5
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %42, align 4, !tbaa !9
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = zext i8 %44 to i32
  %46 = icmp eq i32 %45, 85
  br i1 %46, label %52, label %47

47:                                               ; preds = %8
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = zext i8 %49 to i32
  %51 = icmp eq i32 %50, 117
  br label %52

52:                                               ; preds = %47, %8
  %53 = phi i1 [ true, %8 ], [ %51, %47 ]
  %54 = zext i1 %53 to i32
  store i32 %54, ptr %24, align 4, !tbaa !9
  %55 = load i32, ptr %24, align 4, !tbaa !9
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %69, label %57

57:                                               ; preds = %52
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = zext i8 %59 to i32
  %61 = icmp eq i32 %60, 76
  br i1 %61, label %69, label %62

62:                                               ; preds = %57
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = zext i8 %64 to i32
  %66 = icmp eq i32 %65, 108
  br i1 %66, label %69, label %67

67:                                               ; preds = %62
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -1, ptr %68, align 4, !tbaa !9
  br label %99

69:                                               ; preds = %62, %57, %52
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %69
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -2, ptr %74, align 4, !tbaa !9
  br label %98

75:                                               ; preds = %69
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = icmp slt i32 %77, 0
  br i1 %78, label %79, label %81

79:                                               ; preds = %75
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -3, ptr %80, align 4, !tbaa !9
  br label %97

81:                                               ; preds = %75
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = icmp sge i32 1, %85
  br i1 %86, label %87, label %88

87:                                               ; preds = %81
  br label %91

88:                                               ; preds = %81
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = load i32, ptr %89, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %88, %87
  %92 = phi i32 [ 1, %87 ], [ %90, %88 ]
  %93 = icmp slt i32 %83, %92
  br i1 %93, label %94, label %96

94:                                               ; preds = %91
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -7, ptr %95, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %94, %91
  br label %97

97:                                               ; preds = %96, %79
  br label %98

98:                                               ; preds = %97, %73
  br label %99

99:                                               ; preds = %98, %67
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %108

103:                                              ; preds = %99
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = sub nsw i32 0, %105
  store i32 %106, ptr %19, align 4, !tbaa !9
  %107 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %19, i32 noundef 6)
  store i32 1, ptr %27, align 4
  br label %212

108:                                              ; preds = %99
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %116, label %112

112:                                              ; preds = %108
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %112, %108
  store i32 1, ptr %27, align 4
  br label %212

117:                                              ; preds = %112
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %117
  store i32 1, ptr %26, align 4, !tbaa !9
  br label %136

122:                                              ; preds = %117
  store i32 1, ptr %19, align 4, !tbaa !9
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = call i32 @ilaenv_(ptr noundef @c__1, ptr noundef @.str, ptr noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef @c_n1, ptr noundef @c_n1, i32 noundef 6, i32 noundef 1)
  store i32 %126, ptr %20, align 4, !tbaa !9
  %127 = load i32, ptr %19, align 4, !tbaa !9
  %128 = load i32, ptr %20, align 4, !tbaa !9
  %129 = icmp sge i32 %127, %128
  br i1 %129, label %130, label %132

130:                                              ; preds = %122
  %131 = load i32, ptr %19, align 4, !tbaa !9
  br label %134

132:                                              ; preds = %122
  %133 = load i32, ptr %20, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %132, %130
  %135 = phi i32 [ %131, %130 ], [ %133, %132 ]
  store i32 %135, ptr %26, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %134, %121
  %137 = load i32, ptr %24, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %140

139:                                              ; preds = %136
  store i32 1, ptr %23, align 4, !tbaa !9
  br label %141

140:                                              ; preds = %136
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %140, %139
  %142 = load i32, ptr %26, align 4, !tbaa !9
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = icmp sge i32 %142, %144
  br i1 %145, label %146, label %158

146:                                              ; preds = %141
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = getelementptr inbounds float, ptr %149, i64 1
  %151 = load ptr, ptr %13, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.complex, ptr %151, i64 1
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load i32, ptr %18, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.complex, ptr %153, i64 %155
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  call void @cptts2_(ptr noundef %23, ptr noundef %147, ptr noundef %148, ptr noundef %150, ptr noundef %152, ptr noundef %156, ptr noundef %157)
  br label %211

158:                                              ; preds = %141
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = load i32, ptr %159, align 4, !tbaa !9
  store i32 %160, ptr %19, align 4, !tbaa !9
  %161 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %161, ptr %20, align 4, !tbaa !9
  store i32 1, ptr %22, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %206, %158
  %163 = load i32, ptr %20, align 4, !tbaa !9
  %164 = icmp slt i32 %163, 0
  br i1 %164, label %165, label %170

165:                                              ; preds = %162
  %166 = load i32, ptr %22, align 4, !tbaa !9
  %167 = load i32, ptr %19, align 4, !tbaa !9
  %168 = icmp sge i32 %166, %167
  %169 = zext i1 %168 to i32
  br label %175

170:                                              ; preds = %162
  %171 = load i32, ptr %22, align 4, !tbaa !9
  %172 = load i32, ptr %19, align 4, !tbaa !9
  %173 = icmp sle i32 %171, %172
  %174 = zext i1 %173 to i32
  br label %175

175:                                              ; preds = %170, %165
  %176 = phi i32 [ %169, %165 ], [ %174, %170 ]
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %210

178:                                              ; preds = %175
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = load i32, ptr %179, align 4, !tbaa !9
  %181 = load i32, ptr %22, align 4, !tbaa !9
  %182 = sub nsw i32 %180, %181
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %21, align 4, !tbaa !9
  %184 = load i32, ptr %21, align 4, !tbaa !9
  %185 = load i32, ptr %26, align 4, !tbaa !9
  %186 = icmp sle i32 %184, %185
  br i1 %186, label %187, label %189

187:                                              ; preds = %178
  %188 = load i32, ptr %21, align 4, !tbaa !9
  br label %191

189:                                              ; preds = %178
  %190 = load i32, ptr %26, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %189, %187
  %192 = phi i32 [ %188, %187 ], [ %190, %189 ]
  store i32 %192, ptr %25, align 4, !tbaa !9
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = getelementptr inbounds float, ptr %194, i64 1
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.complex, ptr %196, i64 1
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = load i32, ptr %22, align 4, !tbaa !9
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = mul nsw i32 %199, %200
  %202 = add nsw i32 %201, 1
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds %struct.complex, ptr %198, i64 %203
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  call void @cptts2_(ptr noundef %23, ptr noundef %193, ptr noundef %25, ptr noundef %195, ptr noundef %197, ptr noundef %204, ptr noundef %205)
  br label %206

206:                                              ; preds = %191
  %207 = load i32, ptr %20, align 4, !tbaa !9
  %208 = load i32, ptr %22, align 4, !tbaa !9
  %209 = add nsw i32 %208, %207
  store i32 %209, ptr %22, align 4, !tbaa !9
  br label %162, !llvm.loop !12

210:                                              ; preds = %175
  br label %211

211:                                              ; preds = %210, %146
  store i32 1, ptr %27, align 4
  br label %212

212:                                              ; preds = %211, %116, %103
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #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 @cptts2_(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"

%struct.complex = type { float, float }

@.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 @cpttrs_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #0 {
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  %12 = load i32, ptr %6, align 4, !tbaa !5
  %narrow = xor i32 %12, -1
  %13 = sext i32 %narrow to i64
  %14 = getelementptr inbounds %struct.complex, ptr %5, i64 %13
  store i32 0, ptr %7, align 4, !tbaa !5
  %15 = load i8, ptr %0, align 1, !tbaa !9
  switch i8 %15, label %.thread [
    i8 117, label %16
    i8 85, label %16
    i8 76, label %16
    i8 108, label %16
  ]

16:                                               ; preds = %8, %8, %8, %8
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 0
  br i1 %18, label %.thread, label %19

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

22:                                               ; preds = %19
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %spec.select70 = tail call i32 @llvm.umax.i32(i32 %17, i32 1)
  %24 = icmp slt i32 %23, %spec.select70
  br i1 %24, label %.thread, label %26

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

26:                                               ; preds = %22
  %27 = icmp eq i32 %17, 0
  br i1 %27, label %.loopexit, label %28

28:                                               ; preds = %26
  switch i32 %20, label %31 [
    i32 0, label %.loopexit
    i32 1, label %.thread76
  ]

.thread76:                                        ; preds = %28
  %29 = add nsw i8 %15, -85
  %switch.and78 = and i8 %29, -33
  %switch.selectcmp79 = icmp eq i8 %switch.and78, 0
  %30 = zext i1 %switch.selectcmp79 to i32
  store i32 %30, ptr %10, align 4, !tbaa !5
  br label %36

31:                                               ; preds = %28
  %32 = 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
  %33 = tail call i32 @llvm.smax.i32(i32 %32, i32 1)
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i8 %15, -85
  %switch.and = and i8 %34, -33
  %switch.selectcmp = icmp eq i8 %switch.and, 0
  %35 = zext i1 %switch.selectcmp to i32
  store i32 %35, ptr %10, align 4, !tbaa !5
  %.not68 = icmp slt i32 %33, %.pre
  br i1 %.not68, label %.lr.ph.preheader, label %36

36:                                               ; preds = %.thread76, %31
  call void @cptts2_(ptr noundef nonnull %10, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %6) #4
  br label %.loopexit

.lr.ph.preheader:                                 ; preds = %31
  %invariant.gep = getelementptr i8, ptr %14, i64 8
  %37 = zext nneg i32 %33 to i64
  %38 = sext i32 %12 to i64
  %39 = 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 ]
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = trunc nuw nsw i64 %indvars.iv to i32
  %reass.sub = sub i32 %40, %41
  %42 = add i32 %reass.sub, 1
  %43 = call i32 @llvm.smin.i32(i32 %42, i32 %33)
  store i32 %43, ptr %11, align 4, !tbaa !5
  %44 = mul nsw i64 %indvars.iv, %38
  %gep = getelementptr %struct.complex, ptr %invariant.gep, i64 %44
  call void @cptts2_(ptr noundef nonnull %10, ptr noundef nonnull %1, ptr noundef nonnull %11, ptr noundef %3, ptr noundef %4, ptr noundef %gep, ptr noundef nonnull %6) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, %37
  %.not74 = icmp ugt i64 %indvars.iv.next, %39
  br i1 %.not74, label %.loopexit, label %.lr.ph, !llvm.loop !10

.loopexit:                                        ; preds = %.lr.ph, %36, %28, %26, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #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 @cptts2_(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