; LLVM IR from openssl/openssl :: apps/lib (opt)

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

@prog = external hidden global [40 x i8], align 16
@argv = external hidden global ptr, align 8
@opts = external hidden global ptr, align 8
@unknown = external hidden global ptr, align 8
@unknown_name = external hidden global ptr, align 8
@arg = external hidden global ptr, align 8
@opt_index = external hidden global i32, align 4
@flag = external hidden global ptr, align 8
@.str.43 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [40 x i8], align 1
@dunno = external hidden global ptr, align 8
@.str.52 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #1

declare i32 @opt_printf_stderr(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_format(ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_int(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_long(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_intmax(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_uintmax(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_ulong(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @opt_next() #3 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr @arg, align 8, !tbaa !5
  %10 = load ptr, ptr @argv, align 8, !tbaa !5
  %11 = load i32, ptr @opt_index, align 4, !tbaa !9
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds ptr, ptr %10, i64 %12
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %14, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %0
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

18:                                               ; preds = %0
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = sext i8 %20 to i32
  %22 = icmp ne i32 %21, 45
  br i1 %22, label %23, label %24

23:                                               ; preds = %18
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

24:                                               ; preds = %18
  %25 = load i32, ptr @opt_index, align 4, !tbaa !9
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr @opt_index, align 4, !tbaa !9
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = call i32 @strcmp(ptr noundef %27, ptr noundef @.str.43) #5
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %24
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

31:                                               ; preds = %24
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i32 1
  store ptr %33, ptr %2, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = sext i8 %34 to i32
  %36 = icmp eq i32 %35, 45
  br i1 %36, label %37, label %40

37:                                               ; preds = %31
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i32 1
  store ptr %39, ptr %2, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %37, %31
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 -1
  store ptr %42, ptr @flag, align 8, !tbaa !5
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = call ptr @strchr(ptr noundef %43, i32 noundef 61) #5
  store ptr %44, ptr @arg, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %49

46:                                               ; preds = %40
  %47 = load ptr, ptr @arg, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i32 1
  store ptr %48, ptr @arg, align 8, !tbaa !5
  store i8 0, ptr %47, align 1, !tbaa !11
  br label %49

49:                                               ; preds = %46, %40
  %50 = load ptr, ptr @opts, align 8, !tbaa !5
  store ptr %50, ptr %3, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %233, %49
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.options_st, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !12
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %236

56:                                               ; preds = %51
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = call i32 @strcmp(ptr noundef %57, ptr noundef @.str.44) #5
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %66

60:                                               ; preds = %56
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.options_st, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !12
  %64 = call i32 @strcmp(ptr noundef %63, ptr noundef @.str.45) #5
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %74, label %66

66:                                               ; preds = %60, %56
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.options_st, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !12
  %71 = call i32 @strcmp(ptr noundef %67, ptr noundef %70) #5
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %66
  br label %233

74:                                               ; preds = %66, %60
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.options_st, ptr %75, i32 0, i32 2
  %77 = load i32, ptr %76, align 4, !tbaa !14
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %84, label %79

79:                                               ; preds = %74
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.options_st, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 4, !tbaa !14
  %83 = icmp eq i32 %82, 45
  br i1 %83, label %84, label %94

84:                                               ; preds = %79, %74
  %85 = load ptr, ptr @arg, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %90

87:                                               ; preds = %84
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.46, ptr noundef @prog, ptr noundef %88)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

90:                                               ; preds = %84
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.options_st, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 8, !tbaa !15
  store i32 %93, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

94:                                               ; preds = %79
  %95 = load ptr, ptr @arg, align 8, !tbaa !5
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %116

97:                                               ; preds = %94
  %98 = load ptr, ptr @argv, align 8, !tbaa !5
  %99 = load i32, ptr @opt_index, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %98, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = icmp eq ptr %102, null
  br i1 %103, label %104, label %109

104:                                              ; preds = %97
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.options_st, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !12
  %108 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.47, ptr noundef @prog, ptr noundef %107)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

109:                                              ; preds = %97
  %110 = load ptr, ptr @argv, align 8, !tbaa !5
  %111 = load i32, ptr @opt_index, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr @opt_index, align 4, !tbaa !9
  %113 = sext i32 %111 to i64
  %114 = getelementptr inbounds ptr, ptr %110, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  store ptr %115, ptr @arg, align 8, !tbaa !5
  br label %116

116:                                              ; preds = %109, %94
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.options_st, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 4, !tbaa !14
  switch i32 %119, label %120 [
    i32 115, label %121
    i32 58, label %121
    i32 46, label %229
    i32 47, label %122
    i32 60, label %229
    i32 62, label %229
    i32 112, label %130
    i32 110, label %130
    i32 78, label %130
    i32 77, label %164
    i32 85, label %170
    i32 108, label %176
    i32 117, label %182
    i32 99, label %188
    i32 69, label %188
    i32 70, label %188
    i32 102, label %188
    i32 65, label %188
    i32 97, label %188
  ]

120:                                              ; preds = %116
  br label %121

121:                                              ; preds = %120, %116, %116
  br label %229

122:                                              ; preds = %116
  %123 = load ptr, ptr @arg, align 8, !tbaa !5
  %124 = call i32 @opt_isdir(ptr noundef %123)
  %125 = icmp sgt i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %122
  br label %229

127:                                              ; preds = %122
  %128 = load ptr, ptr @arg, align 8, !tbaa !5
  %129 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.48, ptr noundef @prog, ptr noundef %128)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

130:                                              ; preds = %116, %116, %116
  %131 = load ptr, ptr @arg, align 8, !tbaa !5
  %132 = call i32 @opt_int(ptr noundef %131, ptr noundef %4)
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

135:                                              ; preds = %130
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.options_st, ptr %136, i32 0, i32 2
  %138 = load i32, ptr %137, align 4, !tbaa !14
  %139 = icmp eq i32 %138, 112
  br i1 %139, label %140, label %149

140:                                              ; preds = %135
  %141 = load i32, ptr %4, align 4, !tbaa !9
  %142 = icmp sle i32 %141, 0
  br i1 %142, label %143, label %149

143:                                              ; preds = %140
  %144 = load ptr, ptr @arg, align 8, !tbaa !5
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.options_st, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !12
  %148 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.49, ptr noundef @prog, ptr noundef %144, ptr noundef %147)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

149:                                              ; preds = %140, %135
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.options_st, ptr %150, i32 0, i32 2
  %152 = load i32, ptr %151, align 4, !tbaa !14
  %153 = icmp eq i32 %152, 78
  br i1 %153, label %154, label %163

154:                                              ; preds = %149
  %155 = load i32, ptr %4, align 4, !tbaa !9
  %156 = icmp slt i32 %155, 0
  br i1 %156, label %157, label %163

157:                                              ; preds = %154
  %158 = load ptr, ptr @arg, align 8, !tbaa !5
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.options_st, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !12
  %162 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.50, ptr noundef @prog, ptr noundef %158, ptr noundef %161)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

163:                                              ; preds = %154, %149
  br label %229

164:                                              ; preds = %116
  %165 = load ptr, ptr @arg, align 8, !tbaa !5
  %166 = call i32 @opt_intmax(ptr noundef %165, ptr noundef %7)
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

169:                                              ; preds = %164
  br label %229

170:                                              ; preds = %116
  %171 = load ptr, ptr @arg, align 8, !tbaa !5
  %172 = call i32 @opt_uintmax(ptr noundef %171, ptr noundef %8)
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %175, label %174

174:                                              ; preds = %170
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

175:                                              ; preds = %170
  br label %229

176:                                              ; preds = %116
  %177 = load ptr, ptr @arg, align 8, !tbaa !5
  %178 = call i32 @opt_long(ptr noundef %177, ptr noundef %5)
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %181, label %180

180:                                              ; preds = %176
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

181:                                              ; preds = %176
  br label %229

182:                                              ; preds = %116
  %183 = load ptr, ptr @arg, align 8, !tbaa !5
  %184 = call i32 @opt_ulong(ptr noundef %183, ptr noundef %6)
  %185 = icmp ne i32 %184, 0
  br i1 %185, label %187, label %186

186:                                              ; preds = %182
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

187:                                              ; preds = %182
  br label %229

188:                                              ; preds = %116, %116, %116, %116, %116, %116
  %189 = load ptr, ptr @arg, align 8, !tbaa !5
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.options_st, ptr %190, i32 0, i32 2
  %192 = load i32, ptr %191, align 4, !tbaa !14
  %193 = icmp eq i32 %192, 99
  br i1 %193, label %194, label %195

194:                                              ; preds = %188
  br label %218

195:                                              ; preds = %188
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.options_st, ptr %196, i32 0, i32 2
  %198 = load i32, ptr %197, align 4, !tbaa !14
  %199 = icmp eq i32 %198, 69
  br i1 %199, label %200, label %201

200:                                              ; preds = %195
  br label %216

201:                                              ; preds = %195
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.options_st, ptr %202, i32 0, i32 2
  %204 = load i32, ptr %203, align 4, !tbaa !14
  %205 = icmp eq i32 %204, 70
  br i1 %205, label %206, label %207

206:                                              ; preds = %201
  br label %214

207:                                              ; preds = %201
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.options_st, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %209, align 4, !tbaa !14
  %211 = icmp eq i32 %210, 65
  %212 = zext i1 %211 to i64
  %213 = select i1 %211, i64 14, i64 4094
  br label %214

214:                                              ; preds = %207, %206
  %215 = phi i64 [ 6, %206 ], [ %213, %207 ]
  br label %216

216:                                              ; preds = %214, %200
  %217 = phi i64 [ 70, %200 ], [ %215, %214 ]
  br label %218

218:                                              ; preds = %216, %194
  %219 = phi i64 [ 38, %194 ], [ %217, %216 ]
  %220 = call i32 @opt_format(ptr noundef %189, i64 noundef %219, ptr noundef %4)
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %222, label %223

222:                                              ; preds = %218
  br label %229

223:                                              ; preds = %218
  %224 = load ptr, ptr @arg, align 8, !tbaa !5
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.options_st, ptr %225, i32 0, i32 0
  %227 = load ptr, ptr %226, align 8, !tbaa !12
  %228 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.51, ptr noundef @prog, ptr noundef %224, ptr noundef %227)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

229:                                              ; preds = %222, %187, %181, %175, %169, %163, %126, %121, %116, %116, %116
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.options_st, ptr %230, i32 0, i32 1
  %232 = load i32, ptr %231, align 8, !tbaa !15
  store i32 %232, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

233:                                              ; preds = %73
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.options_st, ptr %234, i32 1
  store ptr %235, ptr %3, align 8, !tbaa !5
  br label %51, !llvm.loop !16

236:                                              ; preds = %51
  %237 = load ptr, ptr @unknown, align 8, !tbaa !5
  %238 = icmp ne ptr %237, null
  br i1 %238, label %239, label %252

239:                                              ; preds = %236
  %240 = load ptr, ptr @dunno, align 8, !tbaa !5
  %241 = icmp ne ptr %240, null
  br i1 %241, label %242, label %247

242:                                              ; preds = %239
  %243 = load ptr, ptr @unknown_name, align 8, !tbaa !5
  %244 = load ptr, ptr @dunno, align 8, !tbaa !5
  %245 = load ptr, ptr %2, align 8, !tbaa !5
  %246 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.52, ptr noundef @prog, ptr noundef %243, ptr noundef %244, ptr noundef %245)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

247:                                              ; preds = %239
  %248 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %248, ptr @dunno, align 8, !tbaa !5
  %249 = load ptr, ptr @unknown, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.options_st, ptr %249, i32 0, i32 1
  %251 = load i32, ptr %250, align 8, !tbaa !15
  store i32 %251, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

252:                                              ; preds = %236
  %253 = load ptr, ptr %2, align 8, !tbaa !5
  %254 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef @.str.53, ptr noundef @prog, ptr noundef %253)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

255:                                              ; preds = %252, %247, %242, %229, %223, %186, %180, %174, %168, %157, %143, %134, %127, %104, %90, %87, %30, %23, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  %256 = load i32, ptr %1, align 4
  ret i32 %256
}

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strchr(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_isdir(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!13, !6, i64 0}
!13 = !{!"options_st", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!14 = !{!13, !10, i64 12}
!15 = !{!13, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"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"

@prog = external hidden global [40 x i8], align 16
@argv = external hidden local_unnamed_addr global ptr, align 8
@opts = external hidden local_unnamed_addr global ptr, align 8
@unknown = external hidden local_unnamed_addr global ptr, align 8
@unknown_name = external hidden local_unnamed_addr global ptr, align 8
@arg = external hidden local_unnamed_addr global ptr, align 8
@opt_index = external hidden local_unnamed_addr global i32, align 4
@flag = external hidden local_unnamed_addr global ptr, align 8
@.str.43 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [40 x i8], align 1
@dunno = external hidden local_unnamed_addr global ptr, align 8
@.str.52 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1

declare i32 @opt_printf_stderr(ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_format(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_int(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_long(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_intmax(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_uintmax(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @opt_ulong(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local i32 @opt_next() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr null, ptr @arg, align 8, !tbaa !5
  %6 = load ptr, ptr @argv, align 8, !tbaa !5
  %7 = load i32, ptr @opt_index, align 4, !tbaa !9
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds ptr, ptr %6, i64 %8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %126, label %12

12:                                               ; preds = %0
  %13 = load i8, ptr %10, align 1, !tbaa !11
  %.not = icmp eq i8 %13, 45
  br i1 %.not, label %14, label %126

14:                                               ; preds = %12
  %15 = add nsw i32 %7, 1
  store i32 %15, ptr @opt_index, align 4, !tbaa !9
  %16 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.43) #5
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %126, label %18

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %10, i64 1
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = icmp eq i8 %20, 45
  %22 = getelementptr inbounds i8, ptr %10, i64 2
  %spec.select = select i1 %21, ptr %22, ptr %19
  %23 = getelementptr inbounds i8, ptr %spec.select, i64 -1
  store ptr %23, ptr @flag, align 8, !tbaa !5
  %24 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %spec.select, i32 noundef 61) #5
  store ptr %24, ptr @arg, align 8, !tbaa !5
  %.not43 = icmp eq ptr %24, null
  br i1 %.not43, label %27, label %25

25:                                               ; preds = %18
  %26 = getelementptr inbounds i8, ptr %24, i64 1
  store ptr %26, ptr @arg, align 8, !tbaa !5
  store i8 0, ptr %24, align 1, !tbaa !11
  br label %27

27:                                               ; preds = %25, %18
  %28 = load ptr, ptr @opts, align 8, !tbaa !5
  %29 = load ptr, ptr %28, align 8, !tbaa !12
  %.not4458 = icmp eq ptr %29, null
  br i1 %.not4458, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %27
  %30 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.44) #5
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %37
  %32 = phi ptr [ %39, %37 ], [ %29, %.lr.ph ]
  %.059.us = phi ptr [ %38, %37 ], [ %28, %.lr.ph ]
  %33 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.45) #5
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %.split.us, label %35

35:                                               ; preds = %.lr.ph.split.us
  %36 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) %32) #5
  %.not47.us = icmp eq i32 %36, 0
  br i1 %.not47.us, label %.split.us, label %37

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %.059.us, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !12
  %.not44.us = icmp eq ptr %39, null
  br i1 %.not44.us, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !14

.lr.ph.split:                                     ; preds = %.lr.ph, %112
  %40 = phi ptr [ %114, %112 ], [ %29, %.lr.ph ]
  %.059 = phi ptr [ %113, %112 ], [ %28, %.lr.ph ]
  %41 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) %40) #5
  %.not47 = icmp eq i32 %41, 0
  br i1 %.not47, label %.split.us, label %112

.split.us:                                        ; preds = %.lr.ph.split, %.lr.ph.split.us, %35
  %.us-phi = phi ptr [ %.059.us, %35 ], [ %.059.us, %.lr.ph.split.us ], [ %.059, %.lr.ph.split ]
  %.us-phi60 = phi ptr [ %32, %35 ], [ %32, %.lr.ph.split.us ], [ %40, %.lr.ph.split ]
  %42 = getelementptr inbounds i8, ptr %.us-phi, i64 12
  %43 = load i32, ptr %42, align 4, !tbaa !16
  switch i32 %43, label %51 [
    i32 0, label %44
    i32 45, label %44
  ]

44:                                               ; preds = %.split.us, %.split.us
  %45 = load ptr, ptr @arg, align 8, !tbaa !5
  %.not54 = icmp eq ptr %45, null
  br i1 %.not54, label %48, label %46

46:                                               ; preds = %44
  %47 = tail call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.46, ptr noundef nonnull @prog, ptr noundef nonnull %spec.select) #4
  br label %126

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %.us-phi, i64 8
  %50 = load i32, ptr %49, align 8, !tbaa !17
  br label %126

51:                                               ; preds = %.split.us
  %52 = load ptr, ptr @arg, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %65

54:                                               ; preds = %51
  %55 = load ptr, ptr @argv, align 8, !tbaa !5
  %56 = load i32, ptr @opt_index, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %55, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %63

61:                                               ; preds = %54
  %62 = tail call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.47, ptr noundef nonnull @prog, ptr noundef nonnull %.us-phi60) #4
  br label %126

63:                                               ; preds = %54
  %64 = add nsw i32 %56, 1
  store i32 %64, ptr @opt_index, align 4, !tbaa !9
  store ptr %59, ptr @arg, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %63, %51
  %66 = phi ptr [ %59, %63 ], [ %52, %51 ]
  switch i32 %43, label %109 [
    i32 117, label %97
    i32 108, label %95
    i32 85, label %93
    i32 47, label %67
    i32 77, label %91
    i32 78, label %73
    i32 112, label %73
    i32 110, label %73
    i32 99, label %102
    i32 69, label %.fold.split
    i32 70, label %.fold.split55
    i32 65, label %99
    i32 97, label %99
    i32 102, label %99
  ]

67:                                               ; preds = %65
  %68 = tail call i32 @opt_isdir(ptr noundef nonnull %66)
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %109, label %70

70:                                               ; preds = %67
  %71 = load ptr, ptr @arg, align 8, !tbaa !5
  %72 = tail call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.48, ptr noundef nonnull @prog, ptr noundef %71) #4
  br label %126

73:                                               ; preds = %65, %65, %65
  %74 = call i32 @opt_int(ptr noundef nonnull %66, ptr noundef nonnull %1)
  %.not52 = icmp eq i32 %74, 0
  br i1 %.not52, label %126, label %75

75:                                               ; preds = %73
  %76 = load i32, ptr %42, align 4, !tbaa !16
  %77 = icmp eq i32 %76, 112
  %78 = load i32, ptr %1, align 4
  %79 = icmp slt i32 %78, 1
  %or.cond = select i1 %77, i1 %79, i1 false
  br i1 %or.cond, label %80, label %84

80:                                               ; preds = %75
  %81 = load ptr, ptr @arg, align 8, !tbaa !5
  %82 = load ptr, ptr %.us-phi, align 8, !tbaa !12
  %83 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.49, ptr noundef nonnull @prog, ptr noundef %81, ptr noundef %82) #4
  br label %126

84:                                               ; preds = %75
  %85 = icmp eq i32 %76, 78
  %86 = icmp slt i32 %78, 0
  %or.cond3 = select i1 %85, i1 %86, i1 false
  br i1 %or.cond3, label %87, label %109

87:                                               ; preds = %84
  %88 = load ptr, ptr @arg, align 8, !tbaa !5
  %89 = load ptr, ptr %.us-phi, align 8, !tbaa !12
  %90 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.50, ptr noundef nonnull @prog, ptr noundef %88, ptr noundef %89) #4
  br label %126

91:                                               ; preds = %65
  %92 = call i32 @opt_intmax(ptr noundef nonnull %66, ptr noundef nonnull %4)
  %.not51 = icmp eq i32 %92, 0
  br i1 %.not51, label %126, label %109

93:                                               ; preds = %65
  %94 = call i32 @opt_uintmax(ptr noundef nonnull %66, ptr noundef nonnull %5)
  %.not50 = icmp eq i32 %94, 0
  br i1 %.not50, label %126, label %109

95:                                               ; preds = %65
  %96 = call i32 @opt_long(ptr noundef nonnull %66, ptr noundef nonnull %2)
  %.not49 = icmp eq i32 %96, 0
  br i1 %.not49, label %126, label %109

97:                                               ; preds = %65
  %98 = call i32 @opt_ulong(ptr noundef nonnull %66, ptr noundef nonnull %3)
  %.not48 = icmp eq i32 %98, 0
  br i1 %.not48, label %126, label %109

99:                                               ; preds = %65, %65, %65
  %100 = icmp eq i32 %43, 65
  %101 = select i1 %100, i64 14, i64 4094
  br label %102

.fold.split:                                      ; preds = %65
  br label %102

.fold.split55:                                    ; preds = %65
  br label %102

102:                                              ; preds = %65, %.fold.split55, %.fold.split, %99
  %103 = phi i64 [ %101, %99 ], [ 70, %.fold.split ], [ 6, %.fold.split55 ], [ 38, %65 ]
  %104 = call i32 @opt_format(ptr noundef nonnull %66, i64 noundef %103, ptr noundef nonnull %1)
  %.not53 = icmp eq i32 %104, 0
  br i1 %.not53, label %105, label %109

105:                                              ; preds = %102
  %106 = load ptr, ptr @arg, align 8, !tbaa !5
  %107 = load ptr, ptr %.us-phi, align 8, !tbaa !12
  %108 = call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.51, ptr noundef nonnull @prog, ptr noundef %106, ptr noundef %107) #4
  br label %126

109:                                              ; preds = %65, %102, %97, %95, %93, %91, %84, %67
  %110 = getelementptr inbounds i8, ptr %.us-phi, i64 8
  %111 = load i32, ptr %110, align 8, !tbaa !17
  br label %126

112:                                              ; preds = %.lr.ph.split
  %113 = getelementptr inbounds i8, ptr %.059, i64 24
  %114 = load ptr, ptr %113, align 8, !tbaa !12
  %.not44 = icmp eq ptr %114, null
  br i1 %.not44, label %._crit_edge, label %.lr.ph.split, !llvm.loop !14

._crit_edge:                                      ; preds = %112, %37, %27
  %115 = load ptr, ptr @unknown, align 8, !tbaa !5
  %.not45 = icmp eq ptr %115, null
  br i1 %.not45, label %124, label %116

116:                                              ; preds = %._crit_edge
  %117 = load ptr, ptr @dunno, align 8, !tbaa !5
  %.not46 = icmp eq ptr %117, null
  br i1 %.not46, label %121, label %118

118:                                              ; preds = %116
  %119 = load ptr, ptr @unknown_name, align 8, !tbaa !5
  %120 = tail call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.52, ptr noundef nonnull @prog, ptr noundef %119, ptr noundef nonnull %117, ptr noundef nonnull %spec.select) #4
  br label %126

121:                                              ; preds = %116
  store ptr %spec.select, ptr @dunno, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %115, i64 8
  %123 = load i32, ptr %122, align 8, !tbaa !17
  br label %126

124:                                              ; preds = %._crit_edge
  %125 = tail call i32 (ptr, ...) @opt_printf_stderr(ptr noundef nonnull @.str.53, ptr noundef nonnull @prog, ptr noundef nonnull %spec.select) #4
  br label %126

126:                                              ; preds = %97, %95, %93, %91, %73, %14, %12, %0, %124, %121, %118, %109, %105, %87, %80, %70, %61, %48, %46
  %.036 = phi i32 [ -1, %46 ], [ %50, %48 ], [ -1, %61 ], [ %111, %109 ], [ -1, %80 ], [ -1, %87 ], [ -1, %70 ], [ -1, %105 ], [ -1, %118 ], [ %123, %121 ], [ -1, %124 ], [ 0, %0 ], [ 0, %12 ], [ 0, %14 ], [ -1, %73 ], [ -1, %91 ], [ -1, %93 ], [ -1, %95 ], [ -1, %97 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 %.036
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strchr(ptr noundef, i32 noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!13, !6, i64 0}
!13 = !{!"options_st", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!13, !10, i64 12}
!17 = !{!13, !10, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass