; LLVM IR from dynexcoin/Dynex :: external/miniupnpc (testigddescparse)

; 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.IGDdatas_service = type { [128 x i8], [128 x i8], [128 x i8], [128 x i8] }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @compare_service(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [1024 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #5
  br label %13

13:                                               ; preds = %202, %200, %2
  %14 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call ptr @fgets(ptr noundef %14, i32 noundef 1024, ptr noundef %15)
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %203

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %19 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %20 = call i64 @strlen(ptr noundef %19) #6
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %11, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %53, %18
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %25, label %51

25:                                               ; preds = %22
  %26 = load i32, ptr %11, align 4, !tbaa !9
  %27 = sub nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = sext i8 %30 to i32
  %32 = icmp eq i32 %31, 13
  br i1 %32, label %49, label %33

33:                                               ; preds = %25
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = sub nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i32
  %40 = icmp eq i32 %39, 10
  br i1 %40, label %49, label %41

41:                                               ; preds = %33
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = sub nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 32
  br label %49

49:                                               ; preds = %41, %33, %25
  %50 = phi i1 [ true, %33 ], [ true, %25 ], [ %48, %41 ]
  br label %51

51:                                               ; preds = %49, %22
  %52 = phi i1 [ false, %22 ], [ %50, %49 ]
  br i1 %52, label %53, label %58

53:                                               ; preds = %51
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr %11, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 %56
  store i8 0, ptr %57, align 1, !tbaa !11
  br label %22, !llvm.loop !12

58:                                               ; preds = %51
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store i32 3, ptr %12, align 4
  br label %200

62:                                               ; preds = %58
  %63 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %64 = load i8, ptr %63, align 16, !tbaa !11
  %65 = sext i8 %64 to i32
  %66 = icmp eq i32 %65, 35
  br i1 %66, label %67, label %68

67:                                               ; preds = %62
  store i32 2, ptr %12, align 4
  br label %200, !llvm.loop !14

68:                                               ; preds = %62
  %69 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %70 = call ptr @strchr(ptr noundef %69, i32 noundef 61) #6
  store ptr %70, ptr %8, align 8, !tbaa !5
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = icmp eq ptr %71, null
  br i1 %72, label %73, label %77

73:                                               ; preds = %68
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str, ptr noundef %75) #5
  store i32 2, ptr %12, align 4
  br label %200, !llvm.loop !14

77:                                               ; preds = %68
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  store i8 0, ptr %78, align 1, !tbaa !11
  %79 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  store ptr %79, ptr %9, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %92, %77
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i8, ptr %81, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = icmp eq i32 %83, 32
  br i1 %84, label %90, label %85

85:                                               ; preds = %80
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load i8, ptr %86, align 1, !tbaa !11
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %88, 9
  br label %90

90:                                               ; preds = %85, %80
  %91 = phi i1 [ true, %80 ], [ %89, %85 ]
  br i1 %91, label %92, label %95

92:                                               ; preds = %90
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i32 1
  store ptr %94, ptr %9, align 8, !tbaa !5
  br label %80, !llvm.loop !15

95:                                               ; preds = %90
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = call i64 @strlen(ptr noundef %96) #6
  %98 = trunc i64 %97 to i32
  store i32 %98, ptr %11, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %124, %95
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = icmp sgt i32 %100, 0
  br i1 %101, label %102, label %122

102:                                              ; preds = %99
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %103, i64 %106
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = icmp eq i32 %109, 32
  br i1 %110, label %120, label %111

111:                                              ; preds = %102
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i8, ptr %112, i64 %115
  %117 = load i8, ptr %116, align 1, !tbaa !11
  %118 = sext i8 %117 to i32
  %119 = icmp eq i32 %118, 9
  br label %120

120:                                              ; preds = %111, %102
  %121 = phi i1 [ true, %102 ], [ %119, %111 ]
  br label %122

122:                                              ; preds = %120, %99
  %123 = phi i1 [ false, %99 ], [ %121, %120 ]
  br i1 %123, label %124, label %130

124:                                              ; preds = %122
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = load i32, ptr %11, align 4, !tbaa !9
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %11, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %125, i64 %128
  store i8 0, ptr %129, align 1, !tbaa !11
  br label %99, !llvm.loop !16

130:                                              ; preds = %122
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i64 1
  store ptr %132, ptr %7, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %145, %130
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load i8, ptr %134, align 1, !tbaa !11
  %136 = sext i8 %135 to i32
  %137 = icmp eq i32 %136, 32
  br i1 %137, label %143, label %138

138:                                              ; preds = %133
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load i8, ptr %139, align 1, !tbaa !11
  %141 = sext i8 %140 to i32
  %142 = icmp eq i32 %141, 9
  br label %143

143:                                              ; preds = %138, %133
  %144 = phi i1 [ true, %133 ], [ %142, %138 ]
  br i1 %144, label %145, label %148

145:                                              ; preds = %143
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = getelementptr inbounds i8, ptr %146, i32 1
  store ptr %147, ptr %7, align 8, !tbaa !5
  br label %133, !llvm.loop !17

148:                                              ; preds = %143
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = call i32 @strcmp(ptr noundef %149, ptr noundef @.str.1) #6
  %151 = icmp eq i32 %150, 0
  br i1 %151, label %152, label %156

152:                                              ; preds = %148
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.IGDdatas_service, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds [128 x i8], ptr %154, i64 0, i64 0
  store ptr %155, ptr %10, align 8, !tbaa !5
  br label %187

156:                                              ; preds = %148
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = call i32 @strcmp(ptr noundef %157, ptr noundef @.str.2) #6
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %164

160:                                              ; preds = %156
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.IGDdatas_service, ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds [128 x i8], ptr %162, i64 0, i64 0
  store ptr %163, ptr %10, align 8, !tbaa !5
  br label %186

164:                                              ; preds = %156
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = call i32 @strcmp(ptr noundef %165, ptr noundef @.str.3) #6
  %167 = icmp eq i32 %166, 0
  br i1 %167, label %168, label %172

168:                                              ; preds = %164
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.IGDdatas_service, ptr %169, i32 0, i32 2
  %171 = getelementptr inbounds [128 x i8], ptr %170, i64 0, i64 0
  store ptr %171, ptr %10, align 8, !tbaa !5
  br label %185

172:                                              ; preds = %164
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = call i32 @strcmp(ptr noundef %173, ptr noundef @.str.4) #6
  %175 = icmp eq i32 %174, 0
  br i1 %175, label %176, label %180

176:                                              ; preds = %172
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.IGDdatas_service, ptr %177, i32 0, i32 3
  %179 = getelementptr inbounds [128 x i8], ptr %178, i64 0, i64 0
  store ptr %179, ptr %10, align 8, !tbaa !5
  br label %184

180:                                              ; preds = %172
  %181 = load ptr, ptr @stderr, align 8, !tbaa !5
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str.5, ptr noundef %182) #5
  store i32 2, ptr %12, align 4
  br label %200, !llvm.loop !14

184:                                              ; preds = %176
  br label %185

185:                                              ; preds = %184, %168
  br label %186

186:                                              ; preds = %185, %160
  br label %187

187:                                              ; preds = %186, %152
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = call i32 @strcmp(ptr noundef %188, ptr noundef %189) #6
  %191 = icmp ne i32 0, %190
  br i1 %191, label %192, label %199

192:                                              ; preds = %187
  %193 = load ptr, ptr @stderr, align 8, !tbaa !5
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.6, ptr noundef %194, ptr noundef %195) #5
  %197 = load i32, ptr %5, align 4, !tbaa !9
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %5, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %192, %187
  store i32 0, ptr %12, align 4
  br label %200

200:                                              ; preds = %199, %180, %73, %67, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %201 = load i32, ptr %12, align 4
  switch i32 %201, label %205 [
    i32 0, label %202
    i32 3, label %203
    i32 2, label %13
  ]

202:                                              ; preds = %200
  br label %13, !llvm.loop !14

203:                                              ; preds = %200, %13
  %204 = load i32, ptr %5, align 4, !tbaa !9
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 %204

205:                                              ; preds = %200
  unreachable
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

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

; 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 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @compare_service(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #4
  %4 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef %1)
  %.not70 = icmp eq ptr %4, null
  br i1 %.not70, label %.thread, label %.lr.ph72

.lr.ph72:                                         ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 384
  %6 = getelementptr inbounds i8, ptr %0, i64 256
  %7 = getelementptr inbounds i8, ptr %0, i64 128
  br label %8

8:                                                ; preds = %.lr.ph72, %60
  %.05271 = phi i32 [ 0, %.lr.ph72 ], [ %.2, %60 ]
  %9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #5
  %10 = trunc i64 %9 to i32
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %8
  %12 = and i64 %9, 2147483647
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge2
  %indvars.iv = phi i64 [ %12, %.lr.ph.preheader ], [ %indvars.iv.next, %.critedge2 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %13 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %indvars.iv.next
  %14 = load i8, ptr %13, align 1, !tbaa !5
  switch i8 %14, label %.critedge.thread [
    i8 13, label %.critedge2
    i8 10, label %.critedge2
    i8 32, label %.critedge2
  ]

.critedge2:                                       ; preds = %.lr.ph, %.lr.ph, %.lr.ph
  store i8 0, ptr %13, align 1, !tbaa !5
  %15 = icmp ugt i64 %indvars.iv, 1
  br i1 %15, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !8

.critedge.loopexit:                               ; preds = %.critedge2
  %16 = trunc nuw nsw i64 %indvars.iv.next to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %8
  %.049.lcssa = phi i32 [ %10, %8 ], [ %16, %.critedge.loopexit ]
  %17 = icmp eq i32 %.049.lcssa, 0
  br i1 %17, label %.thread, label %.critedge.thread

.critedge.thread:                                 ; preds = %.lr.ph, %.critedge
  %18 = load i8, ptr %3, align 16, !tbaa !5
  %19 = icmp eq i8 %18, 35
  br i1 %19, label %60, label %20, !llvm.loop !10

20:                                               ; preds = %.critedge.thread
  %21 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %3, i32 noundef 61) #5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load ptr, ptr @stderr, align 8, !tbaa !11
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str, ptr noundef nonnull %3) #6
  br label %60, !llvm.loop !10

26:                                               ; preds = %20
  store i8 0, ptr %21, align 1, !tbaa !5
  br label %27

27:                                               ; preds = %.critedge4, %26
  %.051 = phi ptr [ %3, %26 ], [ %29, %.critedge4 ]
  %28 = load i8, ptr %.051, align 1, !tbaa !5
  switch i8 %28, label %30 [
    i8 32, label %.critedge4
    i8 9, label %.critedge4
  ]

.critedge4:                                       ; preds = %27, %27
  %29 = getelementptr inbounds i8, ptr %.051, i64 1
  br label %27, !llvm.loop !13

30:                                               ; preds = %27
  %31 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.051) #5
  %32 = trunc i64 %31 to i32
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph68.preheader, label %.critedge6.preheader

.lr.ph68.preheader:                               ; preds = %30
  %34 = and i64 %31, 2147483647
  br label %.lr.ph68

.lr.ph68:                                         ; preds = %.lr.ph68.preheader, %.critedge8
  %indvars.iv77 = phi i64 [ %34, %.lr.ph68.preheader ], [ %indvars.iv.next78, %.critedge8 ]
  %indvars.iv.next78 = add nsw i64 %indvars.iv77, -1
  %35 = getelementptr inbounds i8, ptr %.051, i64 %indvars.iv.next78
  %36 = load i8, ptr %35, align 1, !tbaa !5
  switch i8 %36, label %.critedge6.preheader [
    i8 32, label %.critedge8
    i8 9, label %.critedge8
  ]

.critedge8:                                       ; preds = %.lr.ph68, %.lr.ph68
  store i8 0, ptr %35, align 1, !tbaa !5
  %37 = icmp ugt i64 %indvars.iv77, 1
  br i1 %37, label %.lr.ph68, label %.critedge6.preheader, !llvm.loop !14

.critedge6.preheader:                             ; preds = %.critedge8, %.lr.ph68, %30
  br label %.critedge6

.critedge6:                                       ; preds = %.critedge6.backedge, %.critedge6.preheader
  %.pn = phi ptr [ %21, %.critedge6.preheader ], [ %.054, %.critedge6.backedge ]
  %.054 = getelementptr inbounds i8, ptr %.pn, i64 1
  %38 = load i8, ptr %.054, align 1, !tbaa !5
  switch i8 %38, label %39 [
    i8 32, label %.critedge6.backedge
    i8 9, label %.critedge6.backedge
  ]

.critedge6.backedge:                              ; preds = %.critedge6, %.critedge6
  br label %.critedge6, !llvm.loop !15

39:                                               ; preds = %.critedge6
  %40 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.051, ptr noundef nonnull dereferenceable(1) @.str.1) #5
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %54, label %42

42:                                               ; preds = %39
  %43 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.051, ptr noundef nonnull dereferenceable(1) @.str.2) #5
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %54, label %45

45:                                               ; preds = %42
  %46 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.051, ptr noundef nonnull dereferenceable(1) @.str.3) #5
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %54, label %48

48:                                               ; preds = %45
  %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.051, ptr noundef nonnull dereferenceable(1) @.str.4) #5
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %54, label %51

51:                                               ; preds = %48
  %52 = load ptr, ptr @stderr, align 8, !tbaa !11
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.5, ptr noundef nonnull %.051) #6
  br label %60, !llvm.loop !10

54:                                               ; preds = %48, %45, %42, %39
  %.050 = phi ptr [ %0, %39 ], [ %7, %42 ], [ %6, %45 ], [ %5, %48 ]
  %55 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.050, ptr noundef nonnull dereferenceable(1) %.054) #5
  %.not60 = icmp eq i32 %55, 0
  br i1 %.not60, label %60, label %56

56:                                               ; preds = %54
  %57 = load ptr, ptr @stderr, align 8, !tbaa !11
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.6, ptr noundef %.050, ptr noundef nonnull %.054) #6
  %59 = add nsw i32 %.05271, 1
  br label %60

60:                                               ; preds = %54, %56, %.critedge.thread, %51, %23
  %.2 = phi i32 [ %.05271, %23 ], [ %.05271, %51 ], [ %.05271, %.critedge.thread ], [ %59, %56 ], [ %.05271, %54 ]
  %61 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef %1)
  %.not = icmp eq ptr %61, null
  br i1 %.not, label %.thread, label %8

.thread:                                          ; preds = %60, %.critedge, %2
  %.052.lcssa = phi i32 [ 0, %2 ], [ %.05271, %.critedge ], [ %.2, %60 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #4
  ret i32 %.052.lcssa
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

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

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

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }
attributes #6 = { cold 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !6, i64 0}
!13 = distinct !{!13, !9}
!14 = distinct !{!14, !9}
!15 = distinct !{!15, !9}


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