; LLVM IR from holzschu/ios_system :: shell_cmds/seq (seq)

; 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.lconv = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }

@decimal_point = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@optind = external global i32, align 4
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@stdout = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store double 1.000000e+00, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store double 0.000000e+00, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store ptr @.str.1, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i8 48, ptr %16, align 1, !tbaa !13
  %17 = call ptr @localeconv() #6
  store ptr %17, ptr %12, align 8, !tbaa !9
  %18 = load ptr, ptr %12, align 8, !tbaa !9
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %37

20:                                               ; preds = %2
  %21 = load ptr, ptr %12, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.lconv, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %37

25:                                               ; preds = %20
  %26 = load ptr, ptr %12, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.lconv, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %28, i64 0
  %30 = load i8, ptr %29, align 1, !tbaa !13
  %31 = sext i8 %30 to i32
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %37

33:                                               ; preds = %25
  %34 = load ptr, ptr %12, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.lconv, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !14
  store ptr %36, ptr @decimal_point, align 8, !tbaa !9
  br label %37

37:                                               ; preds = %33, %25, %20, %2
  br label %38

38:                                               ; preds = %81, %37
  %39 = load i32, ptr @optind, align 4, !tbaa !5
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %55

42:                                               ; preds = %38
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = load i32, ptr @optind, 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 !9
  %48 = call i32 @numeric(ptr noundef %47)
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %55, label %50

50:                                               ; preds = %42
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = call i32 @getopt(i32 noundef %51, ptr noundef %52, ptr noundef @.str.2) #6
  store i32 %53, ptr %6, align 4, !tbaa !5
  %54 = icmp ne i32 %53, -1
  br label %55

55:                                               ; preds = %50, %42, %38
  %56 = phi i1 [ false, %42 ], [ false, %38 ], [ %54, %50 ]
  br i1 %56, label %57, label %82

57:                                               ; preds = %55
  %58 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %58, label %78 [
    i32 102, label %59
    i32 115, label %61
    i32 116, label %64
    i32 119, label %67
    i32 104, label %77
  ]

59:                                               ; preds = %57
  %60 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %60, ptr %13, align 8, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %81

61:                                               ; preds = %57
  %62 = load ptr, ptr @optarg, align 8, !tbaa !9
  %63 = call ptr @unescape(ptr noundef %62)
  store ptr %63, ptr %14, align 8, !tbaa !9
  br label %81

64:                                               ; preds = %57
  %65 = load ptr, ptr @optarg, align 8, !tbaa !9
  %66 = call ptr @unescape(ptr noundef %65)
  store ptr %66, ptr %15, align 8, !tbaa !9
  br label %81

67:                                               ; preds = %57
  %68 = load ptr, ptr %13, align 8, !tbaa !9
  %69 = icmp ne ptr %68, null
  br i1 %69, label %76, label %70

70:                                               ; preds = %67
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %8, align 4, !tbaa !5
  %73 = icmp ne i32 %71, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  store i8 32, ptr %16, align 1, !tbaa !13
  br label %75

75:                                               ; preds = %74, %70
  br label %76

76:                                               ; preds = %75, %67
  br label %81

77:                                               ; preds = %57
  br label %78

78:                                               ; preds = %77, %57
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %78, %76, %64, %61, %59
  br label %38, !llvm.loop !16

82:                                               ; preds = %55
  %83 = load i32, ptr @optind, align 4, !tbaa !5
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sub nsw i32 %84, %83
  store i32 %85, ptr %4, align 4, !tbaa !5
  %86 = load i32, ptr @optind, align 4, !tbaa !5
  %87 = load ptr, ptr %5, align 8, !tbaa !9
  %88 = sext i32 %86 to i64
  %89 = getelementptr inbounds ptr, ptr %87, i64 %88
  store ptr %89, ptr %5, align 8, !tbaa !9
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = icmp slt i32 %90, 1
  br i1 %91, label %95, label %92

92:                                               ; preds = %82
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = icmp sgt i32 %93, 3
  br i1 %94, label %95, label %98

95:                                               ; preds = %92, %82
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %7, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %95, %92
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %104

101:                                              ; preds = %98
  %102 = load ptr, ptr @stderr, align 8, !tbaa !9
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.3, ptr noundef @.str.4) #6
  call void @exit(i32 noundef 1) #7
  unreachable

104:                                              ; preds = %98
  %105 = load ptr, ptr %5, align 8, !tbaa !9
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %105, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = call double @e_atof(ptr noundef %110)
  store double %111, ptr %10, align 8, !tbaa !11
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = icmp sgt i32 %112, 1
  br i1 %113, label %114, label %119

114:                                              ; preds = %104
  %115 = load ptr, ptr %5, align 8, !tbaa !9
  %116 = getelementptr inbounds ptr, ptr %115, i64 0
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = call double @e_atof(ptr noundef %117)
  store double %118, ptr %9, align 8, !tbaa !11
  br label %119

119:                                              ; preds = %114, %104
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = icmp sgt i32 %120, 2
  br i1 %121, label %122, label %136

122:                                              ; preds = %119
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  %124 = getelementptr inbounds ptr, ptr %123, i64 1
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = call double @e_atof(ptr noundef %125)
  store double %126, ptr %11, align 8, !tbaa !11
  %127 = load double, ptr %11, align 8, !tbaa !11
  %128 = fcmp oeq double %127, 0.000000e+00
  br i1 %128, label %129, label %135

129:                                              ; preds = %122
  %130 = load double, ptr %9, align 8, !tbaa !11
  %131 = load double, ptr %10, align 8, !tbaa !11
  %132 = fcmp olt double %130, %131
  %133 = zext i1 %132 to i64
  %134 = select i1 %132, ptr @.str.6, ptr @.str.7
  call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef @.str.5, ptr noundef %134) #8
  unreachable

135:                                              ; preds = %122
  br label %136

136:                                              ; preds = %135, %119
  %137 = load double, ptr %11, align 8, !tbaa !11
  %138 = fcmp oeq double %137, 0.000000e+00
  br i1 %138, label %139, label %145

139:                                              ; preds = %136
  %140 = load double, ptr %9, align 8, !tbaa !11
  %141 = load double, ptr %10, align 8, !tbaa !11
  %142 = fcmp olt double %140, %141
  %143 = zext i1 %142 to i64
  %144 = select i1 %142, double 1.000000e+00, double -1.000000e+00
  store double %144, ptr %11, align 8, !tbaa !11
  br label %145

145:                                              ; preds = %139, %136
  %146 = load double, ptr %11, align 8, !tbaa !11
  %147 = fcmp ole double %146, 0.000000e+00
  br i1 %147, label %148, label %153

148:                                              ; preds = %145
  %149 = load double, ptr %9, align 8, !tbaa !11
  %150 = load double, ptr %10, align 8, !tbaa !11
  %151 = fcmp olt double %149, %150
  br i1 %151, label %152, label %153

152:                                              ; preds = %148
  call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef @.str.8) #8
  unreachable

153:                                              ; preds = %148, %145
  %154 = load double, ptr %11, align 8, !tbaa !11
  %155 = fcmp oge double %154, 0.000000e+00
  br i1 %155, label %156, label %161

156:                                              ; preds = %153
  %157 = load double, ptr %9, align 8, !tbaa !11
  %158 = load double, ptr %10, align 8, !tbaa !11
  %159 = fcmp ogt double %157, %158
  br i1 %159, label %160, label %161

160:                                              ; preds = %156
  call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef @.str.9) #8
  unreachable

161:                                              ; preds = %156, %153
  %162 = load ptr, ptr %13, align 8, !tbaa !9
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %173

164:                                              ; preds = %161
  %165 = load ptr, ptr %13, align 8, !tbaa !9
  %166 = call i32 @valid_format(ptr noundef %165)
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %170, label %168

168:                                              ; preds = %164
  %169 = load ptr, ptr %13, align 8, !tbaa !9
  call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef @.str.10, ptr noundef %169) #8
  unreachable

170:                                              ; preds = %164
  %171 = load ptr, ptr %13, align 8, !tbaa !9
  %172 = call ptr @unescape(ptr noundef %171)
  store ptr %172, ptr %13, align 8, !tbaa !9
  br label %180

173:                                              ; preds = %161
  %174 = load double, ptr %9, align 8, !tbaa !11
  %175 = load double, ptr %11, align 8, !tbaa !11
  %176 = load double, ptr %10, align 8, !tbaa !11
  %177 = load i32, ptr %8, align 4, !tbaa !5
  %178 = load i8, ptr %16, align 1, !tbaa !13
  %179 = call ptr @generate_format(double noundef %174, double noundef %175, double noundef %176, i32 noundef %177, i8 noundef signext %178)
  store ptr %179, ptr %13, align 8, !tbaa !9
  br label %180

180:                                              ; preds = %173, %170
  %181 = load double, ptr %11, align 8, !tbaa !11
  %182 = fcmp ogt double %181, 0.000000e+00
  br i1 %182, label %183, label %200

183:                                              ; preds = %180
  br label %184

184:                                              ; preds = %195, %183
  %185 = load double, ptr %9, align 8, !tbaa !11
  %186 = load double, ptr %10, align 8, !tbaa !11
  %187 = fcmp ole double %185, %186
  br i1 %187, label %188, label %199

188:                                              ; preds = %184
  %189 = load ptr, ptr %13, align 8, !tbaa !9
  %190 = load double, ptr %9, align 8, !tbaa !11
  %191 = call i32 (ptr, ...) @printf(ptr noundef %189, double noundef %190)
  %192 = load ptr, ptr %14, align 8, !tbaa !9
  %193 = load ptr, ptr @stdout, align 8, !tbaa !9
  %194 = call i32 @fputs(ptr noundef %192, ptr noundef %193)
  br label %195

195:                                              ; preds = %188
  %196 = load double, ptr %11, align 8, !tbaa !11
  %197 = load double, ptr %9, align 8, !tbaa !11
  %198 = fadd double %197, %196
  store double %198, ptr %9, align 8, !tbaa !11
  br label %184, !llvm.loop !18

199:                                              ; preds = %184
  br label %217

200:                                              ; preds = %180
  br label %201

201:                                              ; preds = %212, %200
  %202 = load double, ptr %9, align 8, !tbaa !11
  %203 = load double, ptr %10, align 8, !tbaa !11
  %204 = fcmp oge double %202, %203
  br i1 %204, label %205, label %216

205:                                              ; preds = %201
  %206 = load ptr, ptr %13, align 8, !tbaa !9
  %207 = load double, ptr %9, align 8, !tbaa !11
  %208 = call i32 (ptr, ...) @printf(ptr noundef %206, double noundef %207)
  %209 = load ptr, ptr %14, align 8, !tbaa !9
  %210 = load ptr, ptr @stdout, align 8, !tbaa !9
  %211 = call i32 @fputs(ptr noundef %209, ptr noundef %210)
  br label %212

212:                                              ; preds = %205
  %213 = load double, ptr %11, align 8, !tbaa !11
  %214 = load double, ptr %9, align 8, !tbaa !11
  %215 = fadd double %214, %213
  store double %215, ptr %9, align 8, !tbaa !11
  br label %201, !llvm.loop !19

216:                                              ; preds = %201
  br label %217

217:                                              ; preds = %216, %199
  %218 = load ptr, ptr %15, align 8, !tbaa !9
  %219 = icmp ne ptr %218, null
  br i1 %219, label %220, label %224

220:                                              ; preds = %217
  %221 = load ptr, ptr %15, align 8, !tbaa !9
  %222 = load ptr, ptr @stdout, align 8, !tbaa !9
  %223 = call i32 @fputs(ptr noundef %221, ptr noundef %222)
  br label %224

224:                                              ; preds = %220, %217
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  ret i32 0
}

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

; Function Attrs: nounwind
declare ptr @localeconv() #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @numeric(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @unescape(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local double @e_atof(ptr noundef) #0

; Function Attrs: noreturn
declare void @errx(i32 noundef, ptr noundef, ...) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @valid_format(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @generate_format(double noundef, double noundef, double noundef, i32 noundef, i8 noundef signext) #0

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

declare i32 @fputs(ptr noundef, ptr noundef) #5

; 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 = { 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 #3 = { noreturn 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 = { noreturn "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 = { "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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { noreturn }

!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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"lconv", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 81, !7, i64 82, !7, i64 83, !7, i64 84, !7, i64 85, !7, i64 86, !7, i64 87, !7, i64 88, !7, i64 89, !7, i64 90, !7, i64 91, !7, i64 92, !7, i64 93}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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

@decimal_point = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call ptr @localeconv() #5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %9, label %4

4:                                                ; preds = %2
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %.not84 = icmp eq ptr %5, null
  br i1 %.not84, label %9, label %6

6:                                                ; preds = %4
  %7 = load i8, ptr %5, align 1, !tbaa !10
  %.not85 = icmp eq i8 %7, 0
  br i1 %.not85, label %9, label %8

8:                                                ; preds = %6
  store ptr %5, ptr @decimal_point, align 8, !tbaa !11
  br label %9

9:                                                ; preds = %8, %6, %4, %2
  %10 = load i32, ptr @optind, align 4, !tbaa !12
  %11 = icmp slt i32 %10, %0
  br i1 %11, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %9, %32
  %12 = phi i32 [ %33, %32 ], [ %10, %9 ]
  %.0107 = phi i8 [ %.1, %32 ], [ 48, %9 ]
  %.062106 = phi ptr [ %.163, %32 ], [ null, %9 ]
  %.064105 = phi ptr [ %.165, %32 ], [ @.str.1, %9 ]
  %.066104 = phi ptr [ %.167, %32 ], [ null, %9 ]
  %.073103 = phi i32 [ %.174, %32 ], [ 0, %9 ]
  %.075102 = phi i32 [ %.176, %32 ], [ 0, %9 ]
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds ptr, ptr %1, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = tail call i32 @numeric(ptr noundef %15)
  %.not86 = icmp eq i32 %16, 0
  br i1 %.not86, label %17, label %.critedge.loopexit

17:                                               ; preds = %.lr.ph
  %18 = tail call i32 @getopt(i32 noundef %0, ptr noundef nonnull %1, ptr noundef nonnull @.str.2) #5
  switch i32 %18, label %30 [
    i32 -1, label %.critedge.loopexit
    i32 102, label %19
    i32 115, label %21
    i32 116, label %24
    i32 119, label %27
  ]

19:                                               ; preds = %17
  %20 = load ptr, ptr @optarg, align 8, !tbaa !11
  br label %32

21:                                               ; preds = %17
  %22 = load ptr, ptr @optarg, align 8, !tbaa !11
  %23 = tail call ptr @unescape(ptr noundef %22)
  br label %32

24:                                               ; preds = %17
  %25 = load ptr, ptr @optarg, align 8, !tbaa !11
  %26 = tail call ptr @unescape(ptr noundef %25)
  br label %32

27:                                               ; preds = %17
  %.not88 = icmp eq ptr %.066104, null
  br i1 %.not88, label %28, label %32

28:                                               ; preds = %27
  %29 = add nsw i32 %.073103, 1
  %.not89 = icmp eq i32 %.073103, 0
  %spec.select = select i1 %.not89, i8 %.0107, i8 32
  br label %32

30:                                               ; preds = %17
  %31 = add nsw i32 %.075102, 1
  br label %32

32:                                               ; preds = %28, %27, %30, %24, %21, %19
  %.176 = phi i32 [ %31, %30 ], [ %.075102, %27 ], [ %.075102, %24 ], [ %.075102, %21 ], [ %.075102, %19 ], [ %.075102, %28 ]
  %.174 = phi i32 [ %.073103, %30 ], [ %.073103, %27 ], [ %.073103, %24 ], [ %.073103, %21 ], [ 0, %19 ], [ %29, %28 ]
  %.167 = phi ptr [ %.066104, %30 ], [ %.066104, %27 ], [ %.066104, %24 ], [ %.066104, %21 ], [ %20, %19 ], [ null, %28 ]
  %.165 = phi ptr [ %.064105, %30 ], [ %.064105, %27 ], [ %.064105, %24 ], [ %23, %21 ], [ %.064105, %19 ], [ %.064105, %28 ]
  %.163 = phi ptr [ %.062106, %30 ], [ %.062106, %27 ], [ %26, %24 ], [ %.062106, %21 ], [ %.062106, %19 ], [ %.062106, %28 ]
  %.1 = phi i8 [ %.0107, %30 ], [ %.0107, %27 ], [ %.0107, %24 ], [ %.0107, %21 ], [ %.0107, %19 ], [ %spec.select, %28 ]
  %33 = load i32, ptr @optind, align 4, !tbaa !12
  %34 = icmp slt i32 %33, %0
  br i1 %34, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !14

.critedge.loopexit:                               ; preds = %17, %.lr.ph, %32
  %.075.lcssa.ph = phi i32 [ %.176, %32 ], [ %.075102, %.lr.ph ], [ %.075102, %17 ]
  %.073.lcssa.ph = phi i32 [ %.174, %32 ], [ %.073103, %.lr.ph ], [ %.073103, %17 ]
  %.066.lcssa.ph = phi ptr [ %.167, %32 ], [ %.066104, %.lr.ph ], [ %.066104, %17 ]
  %.064.lcssa.ph = phi ptr [ %.165, %32 ], [ %.064105, %.lr.ph ], [ %.064105, %17 ]
  %.062.lcssa.ph = phi ptr [ %.163, %32 ], [ %.062106, %.lr.ph ], [ %.062106, %17 ]
  %.0.lcssa.ph = phi i8 [ %.1, %32 ], [ %.0107, %.lr.ph ], [ %.0107, %17 ]
  %.pre = load i32, ptr @optind, align 4, !tbaa !12
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %9
  %35 = phi i32 [ %10, %9 ], [ %.pre, %.critedge.loopexit ]
  %.075.lcssa = phi i32 [ 0, %9 ], [ %.075.lcssa.ph, %.critedge.loopexit ]
  %.073.lcssa = phi i32 [ 0, %9 ], [ %.073.lcssa.ph, %.critedge.loopexit ]
  %.066.lcssa = phi ptr [ null, %9 ], [ %.066.lcssa.ph, %.critedge.loopexit ]
  %.064.lcssa = phi ptr [ @.str.1, %9 ], [ %.064.lcssa.ph, %.critedge.loopexit ]
  %.062.lcssa = phi ptr [ null, %9 ], [ %.062.lcssa.ph, %.critedge.loopexit ]
  %.0.lcssa = phi i8 [ 48, %9 ], [ %.0.lcssa.ph, %.critedge.loopexit ]
  %36 = sub nsw i32 %0, %35
  %37 = sext i32 %35 to i64
  %38 = getelementptr inbounds ptr, ptr %1, i64 %37
  %39 = add i32 %36, -4
  %or.cond = icmp ult i32 %39, -3
  %.neg = sext i1 %or.cond to i32
  %.not90 = icmp eq i32 %.075.lcssa, %.neg
  br i1 %.not90, label %43, label %40

40:                                               ; preds = %.critedge
  %41 = load ptr, ptr @stderr, align 8, !tbaa !11
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

43:                                               ; preds = %.critedge
  %44 = sext i32 %36 to i64
  %45 = getelementptr ptr, ptr %38, i64 %44
  %46 = getelementptr i8, ptr %45, i64 -8
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = tail call double @e_atof(ptr noundef %47)
  %49 = icmp sgt i32 %36, 1
  br i1 %49, label %50, label %.thread

50:                                               ; preds = %43
  %51 = load ptr, ptr %38, align 8, !tbaa !11
  %52 = tail call double @e_atof(ptr noundef %51)
  %.not99 = icmp eq i32 %36, 2
  br i1 %.not99, label %.thread, label %53

53:                                               ; preds = %50
  %54 = getelementptr inbounds i8, ptr %38, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  %56 = tail call double @e_atof(ptr noundef %55)
  %57 = fcmp oeq double %56, 0.000000e+00
  br i1 %57, label %58, label %.thread

58:                                               ; preds = %53
  %59 = fcmp olt double %52, %48
  %60 = select i1 %59, ptr @.str.6, ptr @.str.7
  tail call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef nonnull @.str.5, ptr noundef nonnull %60) #7
  unreachable

.thread:                                          ; preds = %43, %53, %50
  %.07098 = phi double [ %52, %53 ], [ %52, %50 ], [ 1.000000e+00, %43 ]
  %.068 = phi double [ %56, %53 ], [ 0.000000e+00, %50 ], [ 0.000000e+00, %43 ]
  %61 = fcmp oeq double %.068, 0.000000e+00
  %62 = fcmp olt double %.07098, %48
  %63 = select i1 %62, double 1.000000e+00, double -1.000000e+00
  %.169 = select i1 %61, double %63, double %.068
  %64 = fcmp ole double %.169, 0.000000e+00
  %or.cond95 = select i1 %64, i1 %62, i1 false
  br i1 %or.cond95, label %65, label %66

65:                                               ; preds = %.thread
  tail call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef nonnull @.str.8) #7
  unreachable

66:                                               ; preds = %.thread
  %67 = fcmp oge double %.169, 0.000000e+00
  %68 = fcmp ogt double %.07098, %48
  %or.cond96 = select i1 %67, i1 %68, i1 false
  br i1 %or.cond96, label %69, label %70

69:                                               ; preds = %66
  tail call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef nonnull @.str.9) #7
  unreachable

70:                                               ; preds = %66
  %.not91 = icmp eq ptr %.066.lcssa, null
  br i1 %.not91, label %76, label %71

71:                                               ; preds = %70
  %72 = tail call i32 @valid_format(ptr noundef nonnull %.066.lcssa)
  %.not92 = icmp eq i32 %72, 0
  br i1 %.not92, label %73, label %74

73:                                               ; preds = %71
  tail call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef nonnull @.str.10, ptr noundef nonnull %.066.lcssa) #7
  unreachable

74:                                               ; preds = %71
  %75 = tail call ptr @unescape(ptr noundef nonnull %.066.lcssa)
  br label %78

76:                                               ; preds = %70
  %77 = tail call ptr @generate_format(double noundef %.07098, double noundef %.169, double noundef %48, i32 noundef %.073.lcssa, i8 noundef signext %.0.lcssa)
  br label %78

78:                                               ; preds = %76, %74
  %.2 = phi ptr [ %75, %74 ], [ %77, %76 ]
  %79 = fcmp ogt double %.169, 0.000000e+00
  br i1 %79, label %.preheader, label %.preheader100

.preheader100:                                    ; preds = %78
  %80 = fcmp ult double %.07098, %48
  br i1 %80, label %.loopexit, label %.lr.ph128

.preheader:                                       ; preds = %78
  %81 = fcmp ugt double %.07098, %48
  br i1 %81, label %.loopexit, label %.lr.ph130

.lr.ph130:                                        ; preds = %.preheader, %.lr.ph130
  %.171129 = phi double [ %85, %.lr.ph130 ], [ %.07098, %.preheader ]
  %82 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.2, double noundef %.171129)
  %83 = load ptr, ptr @stdout, align 8, !tbaa !11
  %84 = tail call i32 @fputs(ptr noundef %.064.lcssa, ptr noundef %83)
  %85 = fadd double %.169, %.171129
  %86 = fcmp ugt double %85, %48
  br i1 %86, label %.loopexit, label %.lr.ph130, !llvm.loop !16

.lr.ph128:                                        ; preds = %.preheader100, %.lr.ph128
  %.272127 = phi double [ %90, %.lr.ph128 ], [ %.07098, %.preheader100 ]
  %87 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.2, double noundef %.272127)
  %88 = load ptr, ptr @stdout, align 8, !tbaa !11
  %89 = tail call i32 @fputs(ptr noundef %.064.lcssa, ptr noundef %88)
  %90 = fadd double %.169, %.272127
  %91 = fcmp ult double %90, %48
  br i1 %91, label %.loopexit, label %.lr.ph128, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph128, %.lr.ph130, %.preheader100, %.preheader
  %.not93 = icmp eq ptr %.062.lcssa, null
  br i1 %.not93, label %95, label %92

92:                                               ; preds = %.loopexit
  %93 = load ptr, ptr @stdout, align 8, !tbaa !11
  %94 = tail call i32 @fputs(ptr noundef nonnull %.062.lcssa, ptr noundef %93)
  br label %95

95:                                               ; preds = %92, %.loopexit
  ret i32 0
}

; Function Attrs: nounwind
declare ptr @localeconv() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @numeric(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @unescape(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: noreturn
declare void @errx(i32 noundef, ptr noundef, ...) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @valid_format(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @generate_format(double noundef, double noundef, double noundef, i32 noundef, i8 noundef signext) local_unnamed_addr #0

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

; Function Attrs: nofree nounwind
declare noundef i32 @fputs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #2

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 = { 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 = { 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 #3 = { noreturn 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 = { noreturn "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 }
attributes #6 = { cold nounwind }
attributes #7 = { noreturn 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, !7, i64 0}
!6 = !{!"lconv", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !8, i64 80, !8, i64 81, !8, i64 82, !8, i64 83, !8, i64 84, !8, i64 85, !8, i64 86, !8, i64 87, !8, i64 88, !8, i64 89, !8, i64 90, !8, i64 91, !8, i64 92, !8, i64 93}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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