; LLVM IR from csviragh/robotsim :: src/utilities (output_utils)

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

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ReadOutputModes(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [256 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp eq ptr null, %11
  br i1 %12, label %13, label %16

13:                                               ; preds = %2
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  call void @SetDefaultOutputModes(ptr noundef %14)
  %15 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %200

16:                                               ; preds = %2
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  call void @SetDefaultOutputModes(ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  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 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %198, %16
  %19 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call ptr @fgets(ptr noundef %19, i32 noundef 256, ptr noundef %20)
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %199

23:                                               ; preds = %18
  %24 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %25 = call ptr @RStrip(ptr noundef %24)
  %26 = call ptr @LSkip(ptr noundef %25)
  store ptr %26, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp eq i32 %29, 59
  br i1 %30, label %36, label %31

31:                                               ; preds = %23
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = sext i8 %33 to i32
  %35 = icmp eq i32 %34, 35
  br i1 %35, label %36, label %37

36:                                               ; preds = %31, %23
  br label %198

37:                                               ; preds = %31
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = call ptr @FindCharOrComment(ptr noundef %38, i8 noundef signext 61)
  store ptr %39, ptr %7, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 61
  br i1 %43, label %44, label %53

44:                                               ; preds = %37
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 0, ptr %45, align 1, !tbaa !11
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call ptr @RStrip(ptr noundef %46)
  store ptr %47, ptr %8, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = call ptr @LSkip(ptr noundef %49)
  store ptr %50, ptr %9, align 8, !tbaa !5
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = call ptr @FindCharOrComment(ptr noundef %51, i8 noundef signext 0)
  store ptr %52, ptr %7, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %44, %37
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = call i32 @strcmp(ptr noundef %54, ptr noundef @.str.6) #6
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %75

57:                                               ; preds = %53
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = call i32 @strcmp(ptr noundef %58, ptr noundef @.str.7) #6
  %60 = icmp eq i32 %59, 0
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.output_modes_t, ptr %61, i32 0, i32 0
  %63 = zext i1 %60 to i8
  store i8 %63, ptr %62, align 4, !tbaa !12
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = call i32 @strcmp(ptr noundef %64, ptr noundef @.str.7) #6
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %74

67:                                               ; preds = %57
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = call i32 @strcmp(ptr noundef %68, ptr noundef @.str) #6
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %67
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.8) #5
  br label %74

74:                                               ; preds = %71, %67, %57
  br label %197

75:                                               ; preds = %53
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = call i32 @strcmp(ptr noundef %76, ptr noundef @.str.9) #6
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %97

79:                                               ; preds = %75
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = call i32 @strcmp(ptr noundef %80, ptr noundef @.str.7) #6
  %82 = icmp eq i32 %81, 0
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.output_modes_t, ptr %83, i32 0, i32 1
  %85 = zext i1 %82 to i8
  store i8 %85, ptr %84, align 1, !tbaa !15
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = call i32 @strcmp(ptr noundef %86, ptr noundef @.str.7) #6
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %96

89:                                               ; preds = %79
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = call i32 @strcmp(ptr noundef %90, ptr noundef @.str) #6
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %96

93:                                               ; preds = %89
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.10) #5
  br label %96

96:                                               ; preds = %93, %89, %79
  br label %196

97:                                               ; preds = %75
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = call i32 @strcmp(ptr noundef %98, ptr noundef @.str.11) #6
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %107

101:                                              ; preds = %97
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = call i32 @CheckSaveMode(ptr noundef %102, ptr noundef %103)
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.output_modes_t, ptr %105, i32 0, i32 5
  store i32 %104, ptr %106, align 4, !tbaa !16
  br label %195

107:                                              ; preds = %97
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = call i32 @strcmp(ptr noundef %108, ptr noundef @.str.12) #6
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %117

111:                                              ; preds = %107
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = call i32 @CheckSaveMode(ptr noundef %112, ptr noundef %113)
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.output_modes_t, ptr %115, i32 0, i32 4
  store i32 %114, ptr %116, align 4, !tbaa !17
  br label %194

117:                                              ; preds = %107
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = call i32 @strcmp(ptr noundef %118, ptr noundef @.str.13) #6
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %127

121:                                              ; preds = %117
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = call i32 @CheckSaveMode(ptr noundef %122, ptr noundef %123)
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.output_modes_t, ptr %125, i32 0, i32 3
  store i32 %124, ptr %126, align 4, !tbaa !18
  br label %193

127:                                              ; preds = %117
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = call i32 @strcmp(ptr noundef %128, ptr noundef @.str.14) #6
  %130 = icmp eq i32 %129, 0
  br i1 %130, label %131, label %137

131:                                              ; preds = %127
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = call i32 @CheckSaveMode(ptr noundef %132, ptr noundef %133)
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.output_modes_t, ptr %135, i32 0, i32 6
  store i32 %134, ptr %136, align 4, !tbaa !19
  br label %192

137:                                              ; preds = %127
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = call i32 @strcmp(ptr noundef %138, ptr noundef @.str.15) #6
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %147

141:                                              ; preds = %137
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = call i32 @CheckSaveMode(ptr noundef %142, ptr noundef %143)
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.output_modes_t, ptr %145, i32 0, i32 2
  store i32 %144, ptr %146, align 4, !tbaa !20
  br label %191

147:                                              ; preds = %137
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = call i32 @strcmp(ptr noundef %148, ptr noundef @.str.16) #6
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %157

151:                                              ; preds = %147
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = call i32 @CheckSaveMode(ptr noundef %152, ptr noundef %153)
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.output_modes_t, ptr %155, i32 0, i32 8
  store i32 %154, ptr %156, align 4, !tbaa !21
  br label %190

157:                                              ; preds = %147
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = call i32 @strcmp(ptr noundef %158, ptr noundef @.str.17) #6
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %167

161:                                              ; preds = %157
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = call i32 @CheckSaveMode(ptr noundef %162, ptr noundef %163)
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.output_modes_t, ptr %165, i32 0, i32 7
  store i32 %164, ptr %166, align 4, !tbaa !22
  br label %189

167:                                              ; preds = %157
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = call i32 @strcmp(ptr noundef %168, ptr noundef @.str.18) #6
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %177

171:                                              ; preds = %167
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = call i32 @CheckSaveMode(ptr noundef %172, ptr noundef %173)
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.output_modes_t, ptr %175, i32 0, i32 9
  store i32 %174, ptr %176, align 4, !tbaa !23
  br label %188

177:                                              ; preds = %167
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  %179 = call i32 @strcmp(ptr noundef %178, ptr noundef @.str.19) #6
  %180 = icmp eq i32 %179, 0
  br i1 %180, label %181, label %187

181:                                              ; preds = %177
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = call i32 @CheckSaveMode(ptr noundef %182, ptr noundef %183)
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.output_modes_t, ptr %185, i32 0, i32 10
  store i32 %184, ptr %186, align 4, !tbaa !24
  br label %187

187:                                              ; preds = %181, %177
  br label %188

188:                                              ; preds = %187, %171
  br label %189

189:                                              ; preds = %188, %161
  br label %190

190:                                              ; preds = %189, %151
  br label %191

191:                                              ; preds = %190, %141
  br label %192

192:                                              ; preds = %191, %131
  br label %193

193:                                              ; preds = %192, %121
  br label %194

194:                                              ; preds = %193, %111
  br label %195

195:                                              ; preds = %194, %101
  br label %196

196:                                              ; preds = %195, %96
  br label %197

197:                                              ; preds = %196, %74
  br label %198

198:                                              ; preds = %197, %36
  br label %18, !llvm.loop !25

199:                                              ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #5
  br label %200

200:                                              ; preds = %199, %13
  ret void
}

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

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

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

declare ptr @LSkip(ptr noundef) #3

declare ptr @RStrip(ptr noundef) #3

declare ptr @FindCharOrComment(ptr noundef, i8 noundef signext) #3

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

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 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 = { 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 1, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!13, !14, i64 1}
!16 = !{!13, !10, i64 16}
!17 = !{!13, !10, i64 12}
!18 = !{!13, !10, i64 8}
!19 = !{!13, !10, i64 20}
!20 = !{!13, !10, i64 4}
!21 = !{!13, !10, i64 28}
!22 = !{!13, !10, i64 24}
!23 = !{!13, !10, i64 32}
!24 = !{!13, !10, i64 36}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ReadOutputModes(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [256 x i8], align 16
  %4 = icmp eq ptr %1, null
  tail call void @SetDefaultOutputModes(ptr noundef %0)
  br i1 %4, label %5, label %7

5:                                                ; preds = %2
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %105

7:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #5
  %8 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 256, ptr noundef nonnull %1)
  %.not67 = icmp eq ptr %8, null
  br i1 %.not67, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %7
  %9 = getelementptr inbounds i8, ptr %0, i64 36
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = getelementptr inbounds i8, ptr %0, i64 28
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = getelementptr inbounds i8, ptr %0, i64 12
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = getelementptr inbounds i8, ptr %0, i64 1
  br label %19

19:                                               ; preds = %.lr.ph, %103
  %.069 = phi ptr [ undef, %.lr.ph ], [ %.2, %103 ]
  %.05868 = phi ptr [ undef, %.lr.ph ], [ %.260, %103 ]
  %20 = call ptr @RStrip(ptr noundef nonnull %3) #5
  %21 = call ptr @LSkip(ptr noundef %20) #5
  %22 = load i8, ptr %21, align 1, !tbaa !5
  switch i8 %22, label %23 [
    i8 59, label %103
    i8 35, label %103
  ]

23:                                               ; preds = %19
  %24 = call ptr @FindCharOrComment(ptr noundef nonnull %21, i8 noundef signext 61) #5
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = icmp eq i8 %25, 61
  br i1 %26, label %27, label %32

27:                                               ; preds = %23
  store i8 0, ptr %24, align 1, !tbaa !5
  %28 = call ptr @RStrip(ptr noundef nonnull %21) #5
  %29 = getelementptr inbounds i8, ptr %24, i64 1
  %30 = call ptr @LSkip(ptr noundef nonnull %29) #5
  %31 = call ptr @FindCharOrComment(ptr noundef %30, i8 noundef signext 0) #5
  br label %32

32:                                               ; preds = %27, %23
  %.159 = phi ptr [ %28, %27 ], [ %.05868, %23 ]
  %.1 = phi ptr [ %30, %27 ], [ %.069, %23 ]
  %33 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.6) #6
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %45

35:                                               ; preds = %32
  %36 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %37 = icmp eq i32 %36, 0
  %38 = zext i1 %37 to i8
  store i8 %38, ptr %0, align 4, !tbaa !8
  %39 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %.not65 = icmp eq i32 %39, 0
  br i1 %.not65, label %103, label %40

40:                                               ; preds = %35
  %41 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str) #6
  %.not66 = icmp eq i32 %41, 0
  br i1 %.not66, label %103, label %42

42:                                               ; preds = %40
  %43 = load ptr, ptr @stderr, align 8, !tbaa !12
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.8) #7
  br label %103

45:                                               ; preds = %32
  %46 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.9) #6
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %58

48:                                               ; preds = %45
  %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %50 = icmp eq i32 %49, 0
  %51 = zext i1 %50 to i8
  store i8 %51, ptr %18, align 1, !tbaa !14
  %52 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %.not63 = icmp eq i32 %52, 0
  br i1 %.not63, label %103, label %53

53:                                               ; preds = %48
  %54 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str) #6
  %.not64 = icmp eq i32 %54, 0
  br i1 %.not64, label %103, label %55

55:                                               ; preds = %53
  %56 = load ptr, ptr @stderr, align 8, !tbaa !12
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.10) #7
  br label %103

58:                                               ; preds = %45
  %59 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.11) #6
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %63

61:                                               ; preds = %58
  %62 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %62, ptr %17, align 4, !tbaa !15
  br label %103

63:                                               ; preds = %58
  %64 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.12) #6
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %68

66:                                               ; preds = %63
  %67 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %67, ptr %16, align 4, !tbaa !16
  br label %103

68:                                               ; preds = %63
  %69 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.13) #6
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %68
  %72 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %72, ptr %15, align 4, !tbaa !17
  br label %103

73:                                               ; preds = %68
  %74 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.14) #6
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %73
  %77 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %77, ptr %14, align 4, !tbaa !18
  br label %103

78:                                               ; preds = %73
  %79 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.15) #6
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %82, ptr %13, align 4, !tbaa !19
  br label %103

83:                                               ; preds = %78
  %84 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.16) #6
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %88

86:                                               ; preds = %83
  %87 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %87, ptr %12, align 4, !tbaa !20
  br label %103

88:                                               ; preds = %83
  %89 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.17) #6
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %93

91:                                               ; preds = %88
  %92 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %92, ptr %11, align 4, !tbaa !21
  br label %103

93:                                               ; preds = %88
  %94 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.18) #6
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %93
  %97 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %97, ptr %10, align 4, !tbaa !22
  br label %103

98:                                               ; preds = %93
  %99 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.159, ptr noundef nonnull dereferenceable(1) @.str.19) #6
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %98
  %102 = call i32 @CheckSaveMode(ptr noundef %.1, ptr noundef %.159)
  store i32 %102, ptr %9, align 4, !tbaa !23
  br label %103

103:                                              ; preds = %19, %19, %42, %40, %35, %61, %71, %81, %91, %98, %101, %96, %86, %76, %66, %48, %53, %55
  %.260 = phi ptr [ %.05868, %19 ], [ %.159, %42 ], [ %.159, %40 ], [ %.159, %35 ], [ %.159, %55 ], [ %.159, %53 ], [ %.159, %48 ], [ %.159, %61 ], [ %.159, %66 ], [ %.159, %71 ], [ %.159, %76 ], [ %.159, %81 ], [ %.159, %86 ], [ %.159, %91 ], [ %.159, %96 ], [ %.159, %101 ], [ %.159, %98 ], [ %.05868, %19 ]
  %.2 = phi ptr [ %.069, %19 ], [ %.1, %42 ], [ %.1, %40 ], [ %.1, %35 ], [ %.1, %55 ], [ %.1, %53 ], [ %.1, %48 ], [ %.1, %61 ], [ %.1, %66 ], [ %.1, %71 ], [ %.1, %76 ], [ %.1, %81 ], [ %.1, %86 ], [ %.1, %91 ], [ %.1, %96 ], [ %.1, %101 ], [ %.1, %98 ], [ %.069, %19 ]
  %104 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 256, ptr noundef nonnull %1)
  %.not = icmp eq ptr %104, null
  br i1 %.not, label %._crit_edge, label %19, !llvm.loop !24

._crit_edge:                                      ; preds = %103, %7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #5
  br label %105

105:                                              ; preds = %._crit_edge, %5
  ret void
}

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

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

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

declare ptr @LSkip(ptr noundef) local_unnamed_addr #4

declare ptr @RStrip(ptr noundef) local_unnamed_addr #4

declare ptr @FindCharOrComment(ptr noundef, i8 noundef signext) local_unnamed_addr #4

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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) }
attributes #7 = { 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 = !{!9, !10, i64 0}
!9 = !{!"", !10, i64 0, !10, i64 1, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!10 = !{!"_Bool", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!9, !10, i64 1}
!15 = !{!9, !11, i64 16}
!16 = !{!9, !11, i64 12}
!17 = !{!9, !11, i64 8}
!18 = !{!9, !11, i64 20}
!19 = !{!9, !11, i64 4}
!20 = !{!9, !11, i64 28}
!21 = !{!9, !11, i64 24}
!22 = !{!9, !11, i64 32}
!23 = !{!9, !11, i64 36}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass